We read your photo as:
Design a relational schema for a company database based on the following requirements: Entities are DEPARTMENT, EMPLOYEE, PROJECT, DEPENDENT. Relationships: A DEPARTMENT is managed by one EMPLOYEE, a
Computer Science
ScanSolve AI Answer
Based on the requirements for a company database, here is the relational schema:
Requirements Analysis
Here are the entities and their relationships derived from the description:
- Entities:
DEPARTMENT,EMPLOYEE,PROJECT,DEPENDENT. - Relationships:
- A
DEPARTMENTis managed by oneEMPLOYEE. - A
DEPARTMENTcontrols manyPROJECTs. - An
EMPLOYEEworks for oneDEPARTMENT. - An
EMPLOYEEworks on manyPROJECTs, and aPROJECThas manyEMPLOYEEs working on it (Many-to-Many relationship). - An
EMPLOYEEis supervised by anotherEMPLOYEE(Recursive relationship). - An
EMPLOYEEmay have manyDEPENDENTs.
- A
Relational Schema
Here are the tables with their attributes, primary keys (PK), and foreign keys (FK):
-
DEPARTMENT
DeptNumber(PK)DeptNameLocationMgrSSN(FK toEMPLOYEE.SSN)MgrStartDate
-
EMPLOYEE
SSN(PK)FirstNameLastNameAddressSalarySexBirthDateDeptNumber(FK toDEPARTMENT.DeptNumber)SupervisorSSN(FK toEMPLOYEE.SSN)
-
PROJECT
ProjNumber(PK)ProjNameProjLocationDeptNumber(FK toDEPARTMENT.DeptNumber)
-
DEPENDENT
EmpSSN(PK, FK toEMPLOYEE.SSN)DependentName(PK)SexBirthDateRelationship
-
WORKS_ON (Associative Entity for the Many-to-Many relationship between
EMPLOYEEandPROJECT)EmpSSN(PK, FK toEMPLOYEE.SSN)ProjNumber(PK, FK toPROJECT.ProjNumber)Hours
Was this helpful?
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.
Got a different question?Ask your own question
More Computer Science Questions
QExplain referential integrity, the relationship between employees and departments, and how to…QCreate an Entity-Relationship Diagram for Students, Subjects, and LabRoom tables and write a query…QDetermine the primary keys, foreign keys, and composite keys for the given Employee, Emp_Salary, and…QWhat are the primary, foreign, and composite keys for the normalized Employee, Emp_Salary, and…QCreate an Entity-Relationship Diagram (ERD) for an e-commerce database in 3rd Normal Form (3NF).
Browse by topic:SQL

Handwritten Step-by-Step Solution
Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.
Try on WhatsApp