Building Employee: Buildingid Name Place Permitdate Startingdate Enddate Employeeid Name Birthdate Sex Address
Building Employee: Buildingid Name Place Permitdate Startingdate Enddate Employeeid Name Birthdate Sex Address
Employee
Be on
1,1
1,n
EmployeeID
Name
BirthDate
Sex
Address
Work
WorkDay
1,n
1,n
BuildingID
Name
Place
PermitDate
StartingDate
EndDate
Department
DepartmentID
DepartmentName
b. Relational model
Building (BuildingID, Name, Place, PermitDate, StartingDate, EndDate)
Employee (EmployeeID, Name, BirthDate, Sex, Address, DepartmentID*)
Department (DepartmentID, DepartmentName)
Work (WorkDay, BuildingID*, EmployeeID*)
Exercise 3:
a. Entity relationship model
Room
Teach
0,n
RoomID
Function
1,n
1,1
Course
Teacher
Teacher ID
FirstName
LastName
PhoneNumer
Assign
1,n
1,1
CourseID
CourseName
Take place
Belong
1,n
Faculty
FacultyID
1,n
Be
b. Relational model
Name
Teacher (TeacherID, FirstName, LastName, PhoneNumber, FacultyID*)
PhoneNumber
Course (CourseID, CourseName, TeacherID*)
Class (ClassID, Name, #Students, FacultyID*)
Faculty (FacultyID, Name, PhoneNumber)
Room (RoomID, Function)
Teach (TeacherID*, RoomID*)
Take place (CourseID*, ClassID*)
1,1
Class
ClassID
Name
#Students
Exercise 4:
a. Entity relationship model
Customer
Sale employee
EmployeeID
Name
Address
0,n
Sell
Date
Amount
Price
1,n
CustomerID
Name
Address
PhoneNumber
TaxNumber
Product
Order
Date
Amount
Price
1,n
1,n
Account
AccountID
Name
0,n
Pay
Reason
Money
1,n
Accountant
AccountantID
Name
b. Relational model
Sale employee (EmployeeID, Name, Address
Customer (CustomerID, Name, Address, PhoneNumber, TaxNumber
Product (ProductID, Name, Unit
Account (AccountID, Name
Accountant (AccountantID, Name
0,n
ProductID
Name
Unit