Podcast
Questions and Answers
What is the primary purpose of active databases?
What is the primary purpose of active databases?
- To store historical data logs for auditing purposes.
- To provide a user interface for manual data entry and validation.
- To optimize query performance for complex analytical queries.
- To automate actions in response to events occurring within or outside the database system. (correct)
Which of the following statements accurately describes the role of triggers in active databases?
Which of the following statements accurately describes the role of triggers in active databases?
- Triggers define the structure and relationships of data within the database.
- Triggers are user-defined functions that extend the functionality of the database system.
- Triggers are predefined actions that are automatically executed when specific situations occur in the database. (correct)
- Triggers are external applications that monitor the database for suspicious activity.
In the context of STARBURST, what does the PROCESS RULES
command allow a client to do during a transaction?
In the context of STARBURST, what does the PROCESS RULES
command allow a client to do during a transaction?
- Begin the rule consideration process while performing a transaction. (correct)
- Define new active rules that apply only to the current transaction.
- Deactivate specified active rules to avoid conflicts.
- Bypass all active rules for the duration of the transaction.
Which of the following components is NOT a part of the Event-Condition-Action (ECA) model used to state active database rules?
Which of the following components is NOT a part of the Event-Condition-Action (ECA) model used to state active database rules?
Which update commands are typically used as events that trigger rules in STARBURST?
Which update commands are typically used as events that trigger rules in STARBURST?
What is the significance of 'transition tables' in the context of active rules?
What is the significance of 'transition tables' in the context of active rules?
What distinguishes a temporal database from a traditional database?
What distinguishes a temporal database from a traditional database?
Which type of temporal database stores data with respect to both valid time and transaction time?
Which type of temporal database stores data with respect to both valid time and transaction time?
Which of the following is an example of an application that benefits most from temporal databases?
Which of the following is an example of an application that benefits most from temporal databases?
What is the primary challenge associated with multimedia databases compared to traditional databases?
What is the primary challenge associated with multimedia databases compared to traditional databases?
What is content-based retrieval in the context of multimedia databases?
What is content-based retrieval in the context of multimedia databases?
In video database management, what is the purpose of pre-processing?
In video database management, what is the purpose of pre-processing?
Which of the following best describes the function of the Storage Manager in a Video Database Management System (VDBMS)?
Which of the following best describes the function of the Storage Manager in a Video Database Management System (VDBMS)?
What role does the buffer manager play in video database management?
What role does the buffer manager play in video database management?
What does real-time buffer management primarily address in multimedia databases?
What does real-time buffer management primarily address in multimedia databases?
What is the purpose of indexing video content in a VDBMS?
What is the purpose of indexing video content in a VDBMS?
Which of the following is a valid consideration for designing active rules in a database system?
Which of the following is a valid consideration for designing active rules in a database system?
Which action can be taken to enforce business rules within a database?
Which action can be taken to enforce business rules within a database?
How does dynamic buffer allocation contribute to memory management within multimedia databases?
How does dynamic buffer allocation contribute to memory management within multimedia databases?
Which of the following statements best describes the trade-off between the valid time and transaction time in temporal databases?
Which of the following statements best describes the trade-off between the valid time and transaction time in temporal databases?
What is the advantage of integrating semantic processing and image analysis in video pre-processing within VDBMS?
What is the advantage of integrating semantic processing and image analysis in video pre-processing within VDBMS?
Given a database of video clips of soccer games, which type of query exemplifies content-based retrieval??
Given a database of video clips of soccer games, which type of query exemplifies content-based retrieval??
You are designing an active database rule that automatically updates a student's GPA when a new grade is entered. What component of the ECA model would handle the actual GPA calculation?
You are designing an active database rule that automatically updates a student's GPA when a new grade is entered. What component of the ECA model would handle the actual GPA calculation?
Consider a temporal database storing data about product prices. How does transaction time affect a query to retrieve the price of a specific product on a given date?
Consider a temporal database storing data about product prices. How does transaction time affect a query to retrieve the price of a specific product on a given date?
In implementing a video database for a security system, what is the role of content-based indexing and retrieval?
In implementing a video database for a security system, what is the role of content-based indexing and retrieval?
Flashcards
Active database system
Active database system
A method that allows you to take action automatically based on events within or outside the database system, including event-driven architecture.
Occurring events
Occurring events
Events that trigger active rules involuntarily, such as updating a database or initiating actions.
Triggers
Triggers
Considered as a component of SQL 99 and later standards; a method that specifies various active rules.
R1S Rule Example
R1S Rule Example
CREATE RULE Total_sal1 ON EMPLOYEE
Signup and view all the flashcards
WHEN clause
WHEN clause
Statements used to specify the events that trigger a rule.
Signup and view all the flashcards
IF clause
IF clause
Clause utilized to state conditions that need to be verified before actions are performed.
Signup and view all the flashcards
THEN clause
THEN clause
Clause used to state the actions (usually SQL statements) that are to be performed.
Signup and view all the flashcards
Update commands
Update commands
Update commands for SQL that trigger rules in STARBURST, including DELETE, INSERT, and UPDATE.
Signup and view all the flashcards
Starburst Keywords
Starburst Keywords
INSERTED, DELETED, NEW-UPDATED, OLD-UPDATED
Signup and view all the flashcards
Statement-level semantics
Statement-level semantics
Refers to transition tables when a rule is triggered; executed once per statement.
Signup and view all the flashcards
Event-Condition-Action (ECA) model
Event-Condition-Action (ECA) model
Model used to state active database rules.
Signup and view all the flashcards
Rule Action
Rule Action
Statements that represent the actions to be performed.
Signup and view all the flashcards
DB2
DB2
A relational model database server developed by IBM, available for various operating systems.
Signup and view all the flashcards
Temporal database
Temporal database
A database that records data referenced by time.
Signup and view all the flashcards
Valid time
Valid time
Time for which a fact is true in the real world.
Signup and view all the flashcards
Transaction time
Transaction time
Time at which a transaction was made.
Signup and view all the flashcards
Historical database
Historical database
A database that stores data with respect to valid time.
Signup and view all the flashcards
Snapshot database
Snapshot database
Stores only a single state of the real world, usually the most recent, using both valid and transaction time.
Signup and view all the flashcards
Multimedia database
Multimedia database
Facilitate to store as well as generate query for retrieving multimedia information.
Signup and view all the flashcards
Content based retrieval
Content based retrieval
Locate video clips based specific activities .
Signup and view all the flashcards
Video Database Management System (VDBMS)
Video Database Management System (VDBMS)
Comprises open source system with extensions for video storage, pre-processing, and query processing.
Signup and view all the flashcards
Key extensions of VDBMS
Key extensions of VDBMS
Managing video storage, pre-processing (content and indexing), image and semantic-based query processing, and real-time buffer management.
Signup and view all the flashcards
Video database management
Video database management
Splits the database buffer zone and streaming zone by using a buffer pool to manage data.
Signup and view all the flashcards
Video Database Management System toolkit
Video Database Management System toolkit
Employ both image and semantic-based query processing to separate raw videos into shots.
Signup and view all the flashcards
Video pre-processing algorithms
Video pre-processing algorithms
Process of identifying the limitations of video scene and cutting the video into significant shots by analyzing color changes.
Signup and view all the flashcardsStudy Notes
Database Applications: Unit 14 Study Notes
- This unit examines applications related to databases, including active databases, temporal databases, multimedia databases, and video database management systems (VDBMS).
- VDBMS gives integrated support for queries on storage management for video, semantic searches, and image query processing.
Objectives
- Explain active databases
- Discuss temporal databases
- Identify and explain text and media databases
- Explain video database management systems
Active Databases
- Active databases don't form distinct classes but define the range of database rule languages.
- Production-style rules in active databases automatically implement database operations in response to events and conditions.
- Unlike conservative databases, active databases identify situations in the database and trigger actions, usually database updates.
Design Principles for Active Rules
- Events trigger rules involuntarily, either by updating the database or initiating actions.
- Active databases contain triggers.
- Triggers can be defined as a method specifying active rules and are part of SQL 99 and later standards.
- DB2, Oracle, and MS SQL Server have trigger versions.
Starburst
-
The following active rules are demonstrated in STARBURST R1S, R2S, and R3S
-
R1S: CREATE RULE Total_sal1 ON EMPLOYEE
-
R2S: CREATE RULE Total_sal2 ON EMPLOYEE
-
R3S: CREATE RULE Total_sal3 ON EMPLOYEE
-
Rule structure is studied using rule R1S with the CREATE RULE statement to name a rule and the ON clause to define the relation.
-
The WHEN clause specifies events that trigger a rule, the IF clause states conditions, and the THEN clause states the actions.
-
STARBURST uses SQL update commands like DELETE, INSERT, and UPDATE as triggers.
-
Transition tables, including INSERTED, DELETED, NEW-UPDATED, and OLD-UPDATED, refer to transition tables related to keywords.
-
For statement-level semantics, designers can refer to transition tables, modifying rules for row-level semantics.
-
For R1S, the condition to check is: EXISTS (SELECT * FROM INSERTED WHERE Dno IS NOT NULL)
-
The action updates the DEPARTMENT tuple linked to inserted employees by totaling their income to the Total_sal characteristic.
-
The SUM aggregate function ensures that every salary is added.
-
The UPDATE function is used to trigger rule R2S for updating employee salaries.
-
Trigger R3S by updating the Dno attribute in EMPLOYEE when employees are shifted from one department to another.
-
R3S updates both old and new departments related to reassigned employees by totaling new salaries and deducting old salaries from Total_sal.
-
STARBURST implements delayed consideration for active rules, keeping triggered rules in a conflict set assessed upon transaction completion using the COMMIT WORK command.
-
The PROCESS RULES command allows clients to begin rule consideration during a transaction, essential for evaluating multiple rules.
-
Rule declaration syntax in STARBURST allows ordering rules by educating the system.
-
Transition tables (INSERTED, DELETED, etc.) include total operations, influencing every table due to multiple operations applied.
Oracle
-
Uses the Event-Condition-Action (ECA) model, containing three elements.
-
Events generate rules for DB updates.
-
The second element decides whether the generated rule is executed based on defined conditions.
-
The third element explains the rule action as a set of SQL statements or an external program.
-
Active rules can be applied on Total_sal to maintain salaries of each employee
-
CREATE TRIGGER Total_sal1 AFTER INSERT ON EMPLOYEE FOR EACH ROW WHEN (NEW.Dno IS NOT NULL ) UPDATE DEPARTMENT SET Total_sal = Total_sal + NEW.Salary WHERE Dno = NEW.Dno;
-
CREATE TRIGGER Total_sal2 AFTER UPDATE OF Salary ON EMPLOYEE
-
CREATE TRIGGER Total_sal3 AFTER UPDATE OF Dno ON EMPLOYEE FOR EACH ROW BEGIN UPDATE DEPARTMENT SET Total_sal = Total_sal + NEW.Salary WHERE Dno = NEW.Dno; UPDATE DEPARTMENT SET Total_sal = Total_sal – OLD.Salary WHERE Dno = OLD.Dno; END;
-
CREATE TRIGGER Total_sal4 AFTER DELETE ON EMPLOYEE FOR EACH ROW WHEN (OLD.Dno IS NOT NULL ) UPDATE DEPARTMENT SET Total_sal = Total_sal – OLD.Salary WHERE Dno = OLD.Dno;
-
CREATE TRIGGER Inform_supervisor1 BEFORE INSERT OR UPDATE OF Salary, Supervisor_ssn ON EMPLOYEE FOR EACH ROW WHEN ( NEW.Salary > ( SELECT Salary FROM EMPLOYEE WHERE Ssn = NEW.Supervisor_ssn ) ) inform supervisor(NEW.Supervisor_ssn, NEW.Ssn );
-
Triggering rules happen after the triggering rule events.
-
The ON clause explains the relation, and FOR EACH ROW explains the rule triggered for every row.
-
The WHEN keyword is optional.
-
Action is defined as a PL/SQL block with SQL statements or calls to external procedures.
-
Events are SQL commands: INSERT, DELETE, UPDATE.
DB2
-
IBM developed DB2, a relational model database server.
-
It has three similar products: DB2 for LUW (Linux, Unix, and Windows), DB2 for z/OS (mainframe), and DB2 for iSeries.
-
The DB2 LUW product runs on Linux and UNIX distributions, like Red Hat Linux, SUSE Linux, AIX, HP/UX, Solaris, and Windows systems.
-
CREATE TRIGGER
{BEFORE I AFTER} < trigger-event> ON [REFERENCING ] FOR EACH {ROW I STATEMENT} WHEN (<SQL-condition>) <SQL-procedure-statements> : INSERT I DELETE I UPDATE [ON ] : OLD AS I NEW AS I OLD_TABLE AS I NEW_TABLE AS
Application of Active Databases
- Active databases can announce conditions to happen, like observing the physical property of an organizational heating system.
- Active rules trigger when physical property records from sensors indicate a physical property increase to risk level.
- Active rules entail integrity constraints, assessing the conditions that assure constraints are not despoiled.
- Composite application constraints, known as business rules, might be enforced.
- Rules might notice the Average of Grade (AG) of pupils when a new grade is inserted
- Assure that subject requirements are fulfilled before permitting a pupil to apply for a subject.
Temporal Databases
-
Temporal databases record time-referenced data.
-
Applications include record keeping, banking, weather monitoring, and scheduling.
-
They are suitable for organizing information on time constraints, aiding in the development of concepts for application developers and designers.
-
Time is a factor in storing information for:
-
Insurance to keep accident records and claims
-
Healthcare to maintain patient histories
-
Reservation systems to check availability
-
Scientific databases to store time tracked experiments
-
It may be desirable to keep PROJECT, JOB and SALARY histories of all the employees.
-
The details about the YEAR, SEMESTER, COURSE and each SECTION are also included in the database.
-
Temporal information is stored by many database applications, but the temporal feature is ignored.
-
Temporal database types:
-
Historical databases store data with respect to valid time.
-
Rollback databases store data with respect to transaction time.
-
Bitemporal databases store data with respect to both valid time and transaction time.
-
Snapshot databases store a single real-world state usually the most recent.
-
TimeDB databases store the history of data with respect to both valid time and transaction time
Multimedia Databases
-
Multimedia databases facilitate storing and querying multimedia information.
-
Information can demand for:
-
Documents (like articles/books/journals)
-
Images (like drawings/pictures)
-
Video clips (like newsreels/ movies/home videos)
-
Audio clips (like speeches/ phone messages/songs)
-
The primary type of database query generally tries to locate multimedia sources
-
Another scenario may be as of someone willing to retrieve video clips grounded on specific activities
-
These types of queries are mentioned as content based retrieval
-
Multimedia databases use models to index and manage sources grounded on contents.
-
Two approaches to accomplish this task:
-
Automatic analysis of the media sources
-
Manual analysis of the objects and activites within
Video Database Management
- Video database management system is an open source system
- The extensions of the key database consists of store management for video, video pre-processing for representation of content and indexing, image and semantic-based query processing, real time buffer management.
Storage management for video
- Massive amount of data with real-time restrictions are carried by the buffer managers
- The database buffer zone and the streaming zone are split by the buffer pool.
- Stream manager are taken care of by the extended buffer management
- Interface direct buffer caching
- Storage manager assists buffer caching
Video Pre-Processing for Content Representation and Indexing
- Indexes take disk space.
- High-dimensional characteristic data are gathered for all video frames and shots.
- Problems occur in indexing and searching due to metadata extent and storage as multi-dimensional vectors.
- Increase potential indexing by including GiST v2.0.
- The predator's layer of query processing is changed for utilising the index of the Shore or GiST.
- The following statement is implemented with VDBMS inserted vector ADT.
- CREATE GSR INDEX <?eldname>
- for generating an example of GiST SR-tree for utilising all fields as access path in the queries
- Visual characteristic extraction and image resemblance are managed by multi-dimensional structure of indexing.
- Interface checks different indexing within VDBMS.
- Video query in addition operators were concerned with video query
- Video DBMS considers video techniques, the process of providing nearest queries to the access path performs image resemblance search.
- Uses image and semantic-based query processing for separating raw videos into shots
- Combines shots, visuals, and semantic signifiers
- Content based search is supported by continuous media servers and main memory
- Studies buffer for media streaming like Chang and Garcia-Molina’s prefetching
- Dynamic buffer allocation reduces memory requirement
- Buffer for delay-sensitive multimedia data
- Buffer allocation is goal-oriented for various DB
- Caching media streams enhances performance by decreasing addresses and minimizing wait time.
- Streaming is grounded on query outcomes, and buffer manager employs prefetching and caches pages
- VDBMS caching media streams incorporating data info while reducing initial latency and disk I/O.
- Active rules must be triggered automatically when events occur.
- The ECA model states the active database rules.
- The application inserts temperature readings from sensors, with active, triggered rules.
- Locating multimedia sources consists of certain objects of interest.
- Video pre-processing toolkit divides raw streams.
- Active database: Takes action automatically to events
- Active rules: Automatically trigger the active rules when events take place
- Dynamic buffer allocation: Minimizes requirements for concurrent media streams.
- ECA: Event condition action
- Multimedia database: Lets users store and query more multimedia information
- VDBMS: Video Database Management Systems
Image and Semantic-Based Query Processing
Real-Time Buffer Management
Summary
Glossary
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.