Consider the following EER diagram. Map it into a relational database schema. Hi
ID: 668770 • Letter: C
Question
Consider the following EER diagram. Map it into a relational database schema. Hint: Do not forget to add UNIQUE and NOT NULL in the schema where they needed.
Note: For simplicity, the domain for each attribute can be omitted in the schema.
The database schema should use the following format for each table:
Relation_name (attribute name list), PK: ..., FK (if any): ... references ..., UNIQUE, NOT NULL
For example:
Project (ProjectNo, ProjectName), PK: ProjectNo.
Employee (EmployeeNo, Name, WorksOn), PK: ProjectNo, FK: WorksOn references Project, Workson: UNIQUE, NOT NULL.
* Assume that workson is a 1:1 total relationship for Employee between Employee and Project.
sign Customer pid price buy Product titled ISBN )( title )page number Author Customer year Movie Book write HardcoverAudiobook Paperback Author SSN lastExplanation / Answer
create table Project(projectno integer(11) PK,ProjectName varchar(11));
create table Employee(EmployeeNo integer(11) FK,WorksOn varchar(11) Unique);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.