You are on page 1of 1

DATABASE SYSTEMS

ASSIGNMENT
BENG 18 COE
20 MARKS
QUESTION ONE:
i. Create an ERD, using the following requirements: (5 pts)

a) An invoice is written by a sales representative. Each sales representative can write many invoices,
but each invoice is written by a single sales representative.
b) The invoice is written for a single customer. However, each customer can have many invoices.
c) An invoice can include many detail lines, each of which describes one product bought by the
customer. The firm needs to maintain product information.
d) The products are supplied by the vendors and the firm needs to maintain information about these
vendors.
QUESTION TWO:
Consider a database for a vehicle registration. (10 pts)
A Vehicle OWNER is a person, Bank (holding a lien on an VEHICLE or a COMPANY).
A REGISTERED VEHICLE is originated from super-classes CAR and TRUCK
A REGISTERED VEHICLE is owned by a single ONWER
The following attributes are provided for each entity.
a) A CAR has the following attributes {vehicle_id, Cstyle, Cmake, Cyear, Cmodel} and{licence
_plate_no} when registered
b) A TRUCK has the following attributes {vehicle_id , Tonnage, Tmake, Tyear, Tmodel}
and{licence _plate_no} when registered
c) PERSON has the following attributes {Ssn, name, Driver_licence_no, Address} and when
Owns a Vehicle he possesses {lien_or_regular and purchase_date}
d) BANK has {Bname and Baddress}
e) COMPANY has {Cname and Caddress}
You are required to draw an EERD by
Creating a union type called OWNER to represent a subset of union of the three super-classes
COMPANY, BANK and PERSON and a union type called REGISTERED VEHICLE to represent a
subset of union of the two super-classes CAR and TRUCK

END

You might also like