how can I Create 5 Functional UPDATE Statements? Relational schema The primary key is bold and the foreign key is italic Region(regionID, regionName, director) StateOfRegion(stateCode, stateName, statePopulation, RegionID) Store(StoreID, phone, manager, address, regionID) Employee(empID, storeID, empName, hireDate, birthDate, socSecNum) Supplier(supplierID, SupplierName, contact, email, phone) StoreSupplier(storeID, supplierID, startDate) Meta dataThe metdata for each table from the given ER diagram is as below Table Name Attribute Data Type Constraint Region regionID INT PK regionName VARCHAR NOT NULL director VARCHAR StateOfRegion stateCode CHAR(2) PK stateName VARCHAR Not NULL statePopulation double regionID int FK Region(RegionID) Store storeID int PK phone VARCHAR Not Null manager int Not Null address VARCHAR Not Null regionID int FK Region(RegionID) Employee empID Int PK storeID int FK Store(StoreID) empName VARCHAR Not Null hireDate Date Not Null birthDate Date socSecNum Int Supplier supplierID INT PK supplierName VARCHAR Not null contact VARCHAR Not null email VARCHAR Not null phone VARCHAR Not null StoreSupplier storeID Int PK, FK store(StoreID) supplierID int PK, FK Supplier(SupplierID) startDate Date Not null
how can I Create 5 Functional UPDATE Statements?
- Relational schema
The primary key is bold and the foreign key is italic
Region(regionID, regionName, director)
StateOfRegion(stateCode, stateName, statePopulation, RegionID)
Store(StoreID, phone, manager, address, regionID)
Employee(empID, storeID, empName, hireDate, birthDate, socSecNum)
Supplier(supplierID, SupplierName, contact, email, phone)
StoreSupplier(storeID, supplierID, startDate)
- Meta dataThe metdata for each table from the given ER diagram is as below
Table Name |
Attribute |
Data Type |
Constraint |
Region |
|
|
|
|
regionID |
INT |
PK |
|
regionName |
VARCHAR |
NOT NULL |
|
director |
VARCHAR |
|
|
|
|
|
StateOfRegion |
|
|
|
|
stateCode |
CHAR(2) |
PK |
|
stateName |
VARCHAR |
Not NULL |
|
statePopulation |
double |
|
|
regionID |
int |
FK Region(RegionID) |
|
|
|
|
Store |
|
|
|
|
storeID |
int |
PK |
|
phone |
VARCHAR |
Not Null |
|
manager |
int |
Not Null |
|
address |
VARCHAR |
Not Null |
|
regionID |
int |
FK Region(RegionID) |
|
|
|
|
Employee |
|
|
|
|
empID |
Int |
PK |
|
storeID |
int |
FK Store(StoreID) |
|
empName |
VARCHAR |
Not Null |
|
hireDate |
Date |
Not Null |
|
birthDate |
Date |
|
|
socSecNum |
Int |
|
|
|
|
|
Supplier |
|
|
|
|
supplierID |
INT |
PK |
|
supplierName |
VARCHAR |
Not null |
|
contact |
VARCHAR |
Not null |
|
|
VARCHAR |
Not null |
|
phone |
VARCHAR |
Not null |
|
|
|
|
StoreSupplier |
|
|
|
|
storeID |
Int |
PK, FK store(StoreID) |
|
supplierID |
int |
PK, FK Supplier(SupplierID) |
|
startDate |
Date |
Not null |
- The create table script:
DROP
CREATE DATABASE RegionStore;
USE RegionStore;
CREATE TABLE Region
(
regionID VARCHAR(10),
regionName VARCHAR(50),
supervisor VARCHAR(50),
CONSTRAINT PRIMARY KEY (regionID)
);
CREATE TABLE Store
(
storeID VARCHAR (10),
storeAddress VARCHAR (50),
phone VARCHAR (10),
Manager VARCHAR (10),
regionID_FK VARCHAR (10),
CONSTRAINT PRIMARY KEY (storeID),
CONSTRAINT FOREIGN KEY (regionID_FK)
REFERENCES REGION (regionID)
);
CREATE TABLE Employee
(
empNum VARCHAR (10),
empName VARCHAR (50),
hireDate DATE,
birthDate Date,
socSecNum CHAR(9),
storeID_FK VARCHAR(10),
CONSTRAINT PRIMARY KEY (empNum),
CONSTRAINT FOREIGN KEY (storeID_FK)
REFERENCES Store(storeID)
);
CREATE TABLE Supplier
(
supplierID VARCHAR (10),
supplierName VARCHAR (50),
contact VARCHAR (50),
phone CHAR (10),
email VARCHAR (50),
CONSTRAINT PRIMARY KEY (supplierID)
);
CREATE TABLE Supplies
(
supplierID_FK VARCHAR (10),
storeID_FK VARCHAR (10),
startDate DATE,
CONSTRAINT PRIMARY KEY (supplierID_FK,storeID_FK )
);
CREATE TABLE StateOfRegion
(
stateCode CHAR(2),
stateName VARCHAR(50),
regionID_FK VARCHAR(10),
statePopulation INT,
CONSTRAINT PRIMARY KEY (stateCode),
CONSTRAINT FOREIGN KEY (regionID_FK )
REFERENCES REGION(regionID)
);
![regionID
statecode
M
stateName
regionName
Region
in
State OfRegion
statePopulation
director
1
RegionID_Fk
contain
storelD FK
Store ID
M
empID
phone
1
M
store
employ
employee
empName
manager
hireDate
address
1
birthDate
RegionID_FK
manages
M
socsecNum
storelD FK
supplierlD FK
Supplies
startDate
supplierlD
supplierName
contact
Supplier
email
phone
0000](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff1af8048-5532-4d73-a0da-0cea6f25518f%2F3916066d-693e-4dc0-a79a-733a7d8f1525%2Fqmt742_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)