Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
bartleby

Concept explainers

bartleby

Videos

Expert Solution & Answer
Book Icon
Chapter 5, Problem 6PE

Explanation of Solution

Triggers:

  • For inserting into the materialized view branch_cust the user must set a database trigger on an insert into depositor and account.
  • Assume that the database system uses immediate binding for rule execution.
  • Further, assume that the current version of a relation is denoted by the relation name itself, while the set of newly inserted tuples is denoted by qualifying the relation name with prefix “inserted”.
  • The active rules for this insertion are given below –

define trigger insert into_branch_cust_via_depositor

after insert on depositor

referencing new table as inserted for each statement

insert into branch_cust

select branch_name, customer_name

from inserted, account

where inserted.account_number = account.account_number

define trigger insert into branch cust via account

after insert on account

referencing new table as inserted for each statement

insert into branch cust

select branch name, customer name

from depositor, inserted

where depositor.account number = inserted.account number

  • In the above statements, if the execution binding was deferred (instead of immediate), then the result of the join of the set of new tuples of account with the set of new tuples of depositor would have been inserted by both active rules, leading to duplication of the corresponding tuples in branch_cust...

Blurred answer
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY