Consider that the EMPLOYEE tables constraint EMPSUPERFK as specified in Figure 6.2 is changed to read as
Question:
Consider that the EMPLOYEE table’s constraint EMPSUPERFK as specified in Figure 6.2 is changed to read as follows:
CONSTRAINT EMPSUPERFK
FOREIGN KEY (Super_ssn) REFERENCES EMPLOYEE(Ssn)
ON DELETE CASCADE ON UPDATE CASCADE,
Answer the following questions:
a. What happens when the following command is run on the database state shown in Figure 5.6?
DELETE EMPLOYEE WHERE Lname = ‘Borg’
b. Is it better to CASCADE or SET NULL in case of EMPSUPERFK constraint ON DELETE?
Figure 6.2
Transcribed Image Text:
CREATE TABLE EMPLOYEE (... Dno INT NOT NULL DEFAULT 1, CONSTRAINT EMPPK PRIMARY KEY (Ssn), CONSTRAINT EMPSUPERFK FOREIGN KEY (Super_ssn) REFERENCES EMPLOYEE(Ssn) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT EMPDEPTFK FOREIGN KEY(Dno) REFERENCES DEPARTMENT(Dnumber) ON DELETE SET DEFAULT ON UPDATE CASCADE); CREATE TABLE DEPARTMENT (.... Mgr_ssn CHAR(9) NOT NULL DEFAULT '888665555', CONSTRAINT DEPTPK PRIMARY KEY(Dnumber), CONSTRAINT DEPTSK UNIQUE (Dname), CONSTRAINT DEPTMGRFK FOREIGN KEY (Mgr_ssn) REFERENCES EMPLOYEE(Ssn) ON DELETE SET DEFAULT ON UPDATE CASCADE); Figure 6.2 Example illustrating CREATE TABLE DEPT LOCATIONS how default attribute values and referential integrity triggered actions are specified in SQL PRIMARY KEY (Dnumber, Dlocation), FOREIGN KEY (Dnumber) REFERENCES DEPARTMENT(Dnumber) ON DELETE CASCADE ON UPDATE CASCADE);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (9 reviews)
TABLE employee WITH SAMPLE DATA QUESTION a ANSWER What happens when th...View the full answer
Answered By
Dony George
I am Completed B-Tech in computer science and last 2 years worked as tutor in "CHEGG"
0.00
0 Reviews
10+ Question Solved
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Question Posted:
Students also viewed these Computer science questions
-
Consider the EMPLOYEE table's constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN) ON DELETE CASCADE ON...
-
Answer the following questions. a. Office Supplies has assets equal to $137,000 and liabilities equal to $110,000 at year-end. What is the total equity for Office Supplies at year-end? b. At the...
-
This problem is based on the following cash flows and a MARR of 10% per year. Z -800,000 -10,000 Alternative First cost, $ Annual cost, $/year Salvage value, $ X -200,000 -60,000 a. $-102,182 b....
-
When completed submit your assignment to the appropriate area. Company A, an American company, owns Company B, a Canadian subsidiary. Company A borrowed 1,000,000 Canadian dollars as a hedge on its...
-
A psychologist who studies the legal system conducted a study of the effect of defendants' likability and nervousness on willingness to convict the defendant. Each participant read the same...
-
Business processes are composed of three common stages: an initial event, a beginning, and an end. For items a through h listed in Problem 47, identify the applicable initial event, beginning, and...
-
A social venture is a business that seeks to solve a social problem and provide a social good. A social good is a product or service that benefits society. Clean air, clean water, literacy, and...
-
The complexity and uniqueness of the federal government makes it difficult to conduct a meaningful analysis of its financial condition. However, conducting a financial statement analysis does provide...
-
1. How do price levels and the changes in price level determine a country's exch rate? 2. When are the spot and forward currency markets aligned with interest rates? 3. Are changes in exchange rates...
-
A manufacturer of carbon-film resistors specifies a maximum working voltage of 250 V for all its -W resistors. Exceeding 250 V causes internal arcing within the resistor. Above what minimum...
-
Design a relational database schema for a database application of your choice. a. Declare your relations using the SQL DDL. b. Specify a number of queries in SQL that are needed by your database...
-
Describe conceptually how an SQL retrieval query will be executed by specifying the conceptual order of executing each of the six clauses.
-
Refer to Figure 3.8 In Americans Love Their Automobiles (Applied Example 3.4 On p. 128) to answer the following questions: a. Name the two variables used. b. Does the scatter diagram suggest a...
-
Walaa Insurance Company has a surplus reinsurance treaty with Munich Re reinsurance company with retention limit of 1,500,000 SR from the sum insured. The maximum capacity of the surplus treaty is 8...
-
Eddie slick Haskell needs your tax advice regarding a recent stock transaction that didnt turn out the way he planned. On January 20, 2021, Slick purchased 100 shares of Tesla stock (ticker TSLA) for...
-
Trial Balance for the financial year (FY) ended 31st March 2022 of M/s Deepakshi shows following details: Particulars Debit (`) Credit (`) Purchase & Sales 10,00,000 12,00,000 Debtors & Creditors...
-
1. Imagine that you were filming a brief documentary about a political candidate. Which camera angle and camera movement would you use in the opening scene? Why would you select these? 2. Imagine...
-
Ms . Henderson comes to you for advice in February 2 0 2 4 . Last year, 2 0 2 3 was a year of considerable change and turmoil for her. Her job in Ottawa, with Losing Ltd . , evaporated on March 3 1 ,...
-
Computerizing list (in appropriate order) the operations you would need to use to instruct a computer to solve Ax = b by Gauss Jordan elimination: 1. In the 2 ( 2 case, 2. In the 3 ( 3 case The...
-
The purpose of this case is to come up with a contingency plan[s] in order to sustain the program Move With Me, a program that serves thousands of community members throughout Lower Manhattan. The...
-
At which positions of a heap might the largest key be stored?
-
Give an example of a worst-case sequence with n elements for insertion-sort, and show that insertion-sort runs in (n 2 ) time on such a sequence.
-
The min method for the UnsortedPriorityQueue class executes in O(n) time, as analyzed in Table 9.2. Give a simple modification to the class so that min runs in O(1) time. Explain any necessary...
-
Arndt, Incorporated reported the following for 2024 and 2025 ($ in millions): 2024 2025 Revenues $ 918 $ 1,010 Expenses 774 830 Pretax accounting income $144 $ 180 (income statement) Taxable income...
-
A. Distinguish between proposed, temporary, and final Treasury Regulations. b. Distinguish between interpretative and legislative Treasury Regulations. A. Proposed regulations are authoritative, and...
-
Question 1 Refer to the accompanying table. Martha's opportunity cost of making a cake is: Time to Make a Pie Time to Make a Cake Martha Julia A) 60 pies. B) 50 pies. C) 1.33 of pies. D) 0.75 of a...
Study smarter with the SolutionInn App