4.1) For the following entity relationship diagram write MySQL code for creation of three tables. You can assume reasonable datatypes and lengths for each attribute. PK StaffID STAFF INTEGER StaffName VARCHAR(30) DateOfBirth DATETIME Salary DECIMAL(10,2) manages has +++ 艹 +4 WORK ALLOCATION PK,FK1 StaffID INTEGER PK,FK2 DepartmentID INTEGER PercentageTime DOUBLE involves DEPARTMENT PK DeparmenttID INTEGER DepartmentName VARCHAR(30) Budget FK1 ManagerID DOUBLE INTEGER

icon
Related questions
Question
100%
4.1) For the following entity relationship diagram write MySQL code for creation of three
tables. You can assume reasonable datatypes and lengths for each attribute.
PK StaffID
STAFF
INTEGER
StaffName
VARCHAR(30)
DateOfBirth DATETIME
Salary
DECIMAL(10,2)
manages
has
+++
艹
+4
WORK ALLOCATION
PK,FK1 StaffID
INTEGER
PK,FK2 DepartmentID INTEGER
PercentageTime DOUBLE
involves
DEPARTMENT
PK DeparmenttID INTEGER
DepartmentName VARCHAR(30)
Budget
FK1 ManagerID
DOUBLE
INTEGER
Transcribed Image Text:4.1) For the following entity relationship diagram write MySQL code for creation of three tables. You can assume reasonable datatypes and lengths for each attribute. PK StaffID STAFF INTEGER StaffName VARCHAR(30) DateOfBirth DATETIME Salary DECIMAL(10,2) manages has +++ 艹 +4 WORK ALLOCATION PK,FK1 StaffID INTEGER PK,FK2 DepartmentID INTEGER PercentageTime DOUBLE involves DEPARTMENT PK DeparmenttID INTEGER DepartmentName VARCHAR(30) Budget FK1 ManagerID DOUBLE INTEGER
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer