Question: Need some help with this practice assignment, use the below images (Relational Model) to complete questions. Purpose: How to get familiar with the Relational Model
Need some help with this practice assignment, use the below images (Relational Model) to complete questions.
Purpose: How to get familiar with the Relational Model basics.
1. (3.11 Elmasri-6e) - Suppose each of the following Update operations is applied directly to the database of Figure 3.6-7. Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints (date values are all correct and in appropriate format):
(a) Insert into EMPLOYEE.
(c) Insert into DEPARTMENT.
(e) Insert into DEPENDENT.
(g) Delete the EMPLOYEE tuple with SSN= '987654321'.
(i) Modify the MGRSSN and MGRSTARTDATE of the DEPARTMENT tuple with DNUMBER=5 to '123456789' and '01-OCT-88', respectively.
2. (3.14 Elmasri-6e)- Consider the following six relations for an order-processing database application in a company:
CUSTOMER (Cust#, Cname, City)
ORDER (Order#, Odate, Cust#, Ord_Amt)
ORDER_ITEM (Order#, Item#, Qty)
ITEM (Item#, Unit_price)
SHIPMENT (Order#, Warehouse#, Ship_date)
WAREHOUSE (Warehouse#, City)
Here, Ord_Amt refers to total dollar amount of an order; Odate is the date the order was placed; Ship_date is the date an order (or part of an order) is shipped from the warehouse. Assume that an order can be shipped from several warehouses. Specify the foreign keys for this schema (FORMAT: the table name, for each of the foreign keys (if any), the foreign key name, and the table and column the foreign key references) stating any assumptions you make.


EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr start date DEPT LOCATIONS DnumberDlocation PROJECT Pname Pnumber Plocation Dnum WORKS ON Essn Pno Hours Figure 3.7 Referential integrity constraints displayed on the COMPANY relational database schema. DEPENDENT Essn Dependent name Sex Bdate Relationship | | EMPLOYEE Fname Minit Lname John Franklin 1 wong-1 333445555 | 1955 1 2 081638 Voss, Houston TX 40000 Alicia Zelaya 999887777 1968-01-19 3321 Castle, Spring.TX F 25000 987654321 4 Jennifer S Wallace 987654321 1941-06-20 291 Bery, Bellaire, TX F 43000 8886855554 Ramesh KNarayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 Joyce A English 453453453 1972-07-31 5631 Rice, Houston, TXF 25000 Ahmad V Jabbar 987987987 1969-03-29 980 Dallas, Houston,TX M 25000 9876543214 James E Borg 888665555 1937 11-10 450 Stone, Houston, TX M 55000 NULL Bdate Super_ssn Dno 333445555 | 5 855555 B Smith 1234 456789 1965-01-09 731 Fondren, Houston, TX M 3000o 333445555 5 . 333445555| 5 DEPARTMENT DEPT LOCATIONS Research Administration Headquarters Mgr ssn 333445555 987654321 888665555 Mgr start date 1988-05-22 1995-01-01 1981-06-19 Bellaire Sugarland WORKS ON PROJECT Hours Phumber Plocation Dnum 32.5 7.5 3 40.0 20.0 0.0 10.0 10.0 10 10.0 33445555 20 10.0 30 30.0 1 10.0 0 35.0 5.0 20.0 20 15.0 Productx Producty Productz Computerization10 123456789 23456789 666884444 453453453 53453453 333445555 333445555 33445555 Sugarland 20 30 Houston Newbenefts Stafford DEPENDENT Essn 33445555 Alie 333445555 Theodore 33445555Joy 987654321 Abner 23456789 Michael 23456789 Alice 23456789 Elizabeth Dependent name Ses 999887777 F 1986-04-05 Daught M 1983-10-25 Son F 1958-05-03 Spouse M | 1942-02-28 Spouse M 1988 01-04 Son F 1988-12-30Daughter F 1967-05-05 Spouse 30 987654321 987654321 808665555 20 NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
