Professional Documents
Culture Documents
Tutorial Sheet
Tutorial Sheet
p. 1
Exercise 2: complete the following figures with cardinalities and types of associations
Customer Product
, ,
Order Type:
Quantity
Employee Service
, ,
Appointed Type:
Person Car
, ,
Possess Type:
Town Country
, ,
Capital Type:
p. 2
Management rules:
▪ AHOLA is divided into 5 departments: marketing, design, information system, finance and
store.
▪ Each employee is attached to only one department and it can travel only in one of both classes
suggested by the airline companies (economic or business).It can also only remain in a certain
category of hotel (2 *, 3 *, 4 *).
▪ A travel concerns only one person.
Work to do: complete the entity-association diagram above with the missing cardinalities.
p. 3
Exercise 4: transform the following CMD in relational model (relational schema)
1,1
0,n
Of Type
Contains
1,n
1,n
Provider
Receipt
ProviderCode
ProviderName ReceiptNum
Date
Time
Total
Child School
1,1
1,1
Lives
located
Commune
1,n PostalCode
CName 1,n
p. 4
Product Type Representative
1,n Sells 1,1
ProductCode Code
ProductName Name
FirstName
1,1 Responsible of 0,1
0,n
Concerns
1,1
Expenses
Expenses note
Num 1,n Contains 1,n
Type Num
Amount Total
p. 5
Plane Company
1,n
1,n
Makes
Works for
1,1
1,1
Flight 3,n 1,n
In charge of Personnel
Num
Day Name
DepartureTime Function
ArrivalTime 0,n reserved 1,n
Passenger
FreeSeats Reservation date
1,1 1,1 Name
1,n 1,n
Airport Town
p. 6
Exercise 5: transform the following relational schema in conceptual models of data
p. 7
Exercise 7: technical school
The principal of a technical secondary school wants to establish a database of the teaching activities of
his/her school. The management rules are as follows:
▪ The school is divided in 2 sections: industrial and commercial
▪ Each section has many specialties.
▪ Some specialties start only in the second cycles, some end in the first cycle, and some are
present in both first and second cycle.
▪ The classes are therefore divided according to the specialty and the level
▪ Subjects are also taught according to classes and specialties. The coefficients of those subjects
also vary according to the level of the class, the specialty and the section. E.g.: English is taught
in all classes but with different coefficients.
▪ Each subject has a weekly time allocation depending on the class, the level, and the specialty
of the class.
▪ Subjects are grouped in three categories: general education, professional education, and
complementary subjects.
▪ Teachers teach different subjects according to their specialty of training.
▪ Each student is registered in one and only one class
The principal wants in particular in database able to produce for each class , the subjects taught, their
coefficients and the teachers teaching those subjects. For a particular subject, he wants to know all the
classes in which it is taught, the teachers and the different coefficients.
Work to do:
1. Establish the CMD.
2. Establish the LMD.
3. Establish the relational schema.
p. 8