0% found this document useful (0 votes)
37 views

Building Employee: Buildingid Name Place Permitdate Startingdate Enddate Employeeid Name Birthdate Sex Address

The document contains 4 exercises showing entity relationship diagrams and their corresponding relational models: 1) The first exercise models buildings, employees, departments, and work days with 5 tables. 2) The second exercise models courses, teachers, rooms, classes, and their relationships with 5 tables. 3) The third exercise models customers, products, sales employees, orders, accounts, and accountants with 6 tables. 4) The fourth exercise provides context but no entity relationship diagram or relational model.

Uploaded by

TranNamMai
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Building Employee: Buildingid Name Place Permitdate Startingdate Enddate Employeeid Name Birthdate Sex Address

The document contains 4 exercises showing entity relationship diagrams and their corresponding relational models: 1) The first exercise models buildings, employees, departments, and work days with 5 tables. 2) The second exercise models courses, teachers, rooms, classes, and their relationships with 5 tables. 3) The third exercise models customers, products, sales employees, orders, accounts, and accountants with 6 tables. 4) The fourth exercise provides context but no entity relationship diagram or relational model.

Uploaded by

TranNamMai
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Exercise 2:

a. Entity relationship model


Building

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

You might also like