Help with this SQL questions, please! below the tables, you will see the questio
ID: 3698628 • Letter: H
Question
Help with this SQL questions, please!
below the tables, you will see the questions.
Questions:
Table name: EMPLOYEE EMP CODE? EMP TITLE EMP?LNAME | EMP FNAME I EMP INITIAL I EMP DOB | STORE CODE 1 Mr 2 MS 3 Ms Williamson John Ratula Greenboo Lottie Rumpersfro Jennie 21-May-64 09-Feb-69 02-Oct-61 01 Jun-71 4 Mrs 5 Mr 6 Mr 7 Mr 8 Ms 9 Mr 10 Mrs 11 Mr 12 Mr 13 Mr 14 MS 15 Mr 16 Mr 17 MS 18 Mr 19 Mr 20 Mr 21 Ms Renselaer Ogallo 31-Jul-62 10-Sep-68 19-Apr-55 06-Mar-66 21-Oct-72 08-Sep-74 25-Aug-64 25-May-66 24-May-64 03-Sep-60 12-Nov-7 24-Jan-71 Elizabeth Broderick Tom ashington Alan Clenko Archialo Andrew Peter Rosten Mckee Baumann 06-Mar-70 11-Dec-74 Table name: STORE STORE CODE STORE NANE ? STORE YTD SALES ? REGION CODE I EMP CCCE 1 Access Junction 2 Database Corner 3 Tuple Charge 1003455.76 1421987.39 986783.22 12 Attribute Alley 5 Primary Key Point 2930098.45 Table name: REGION REGIONCODE REGIONDESCRIPT - - 1 East 2 WestExplanation / Answer
2.1
Table
Primary Key
Foreign Key
Employee
Emp_code
Store_code
Store
Store_code
Region_code, Emp_code
Region
Region_code
NONE
2.2
Yes above tables exhibit referential integrity. There exist referential integrity between:
1. Store_code field in Employee which is a foreign key is referring to the Store_code of Store which is primary key of Store.
2. Emp_code field in Store which is a foregin key is referring to Emp_code of Employee which is primary key.
1. Region_code in Store table is a foreign key referring to Region_Code of Region which is a primary key in Region.
So every time value in the primary key is updated, the changes must be applied to all the foreing keys referring to this primary key.
Table
Primary Key
Foreign Key
Employee
Emp_code
Store_code
Store
Store_code
Region_code, Emp_code
Region
Region_code
NONE
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.