Map the EER schema design to a relational database schema, and create the tables
ID: 3738328 • Letter: M
Question
Map the EER schema design to a relational database schema, and create the tables corresponding to the relational schema using the ORACLE DBMS (or MySQL). You will add to your report a listing of the CREATE TABLE statements. Specify as many constraints (key, referential integrity) as you can in the relational schema. You should state the choices you made during the EER-to-relational mapping, and the reasons for your choices.
aMe upch ac ?ons Jmase assuoo Bo oKS Publiahin 14 Movie oider clet Pelea ua Ouder Din ed e4 J d Acuthor ?d NamaExplanation / Answer
Customer Table
Customer (Name, IDNo, Address, Email, Username, Password)
IDNo – Primary Key
create table Customer (Name varchar(20), IDNo varchar(10) Primary Key, email varchar(25),
username varchar(15), Password varchar (20));
Items Table
Items (ItemNo)
ItemNo - Primary Key
Create table Items(ItemNo varchar(10) Primary Key);
Payment Table
Payment (Payment, ItemId, CustId, TotalPrice, OrderDate)
ItemId - Foreign Key
CustId – Foreign Key
create table Payment (Payment varchar (20),
ItemId varchar (20) Foreign Key (ItemId) References Items (ItemNo),
CustId varchar (20) Foreign Key (CustId) References Customer (IDNo),
TotalPrice int, OrderDate date);
Books Table
Books (Subject, Image)
create table Books (Subject varchar(20), Image varbinary(MAX));
Publication Table
Publication (Date, Image)
create table Publication ( Dated date, Image varbinary(MAX));
Movie Table
Movies (Name, ReleaseDate)
create table Movies (Name varchar(20), ReleaseDate date);
Author Table
Author (ID, Name)
ID - Primary Key
create table Author ( ID varchar(10) Primary Key, Name varchar(20));
Publisher Table
Publisher (ID, Name)
ID- Primary Key
create table Publisher (ID varchar(10) Primary Key, Name varchar(20));
Divider Table
Divider (ID, Name)
ID - Primary Key
create table Divider (ID varchar(10) Primary Key, Name varchar(20));