December 1998
DB212: DATABASE MANAGEMENT SYSTEMS

QUESTION 4

Total Marks: 20 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to Question 4

 

(a) In the Entity-Relationshop (E-R) model, what is meant by an existence dependency? What is the name for an entity-type that has an existence dependency? [2]
An existence dependency is where one instance of an entity cannot exist without the existence of an instance of some other related entity (1mark). An entity type that cannot exist independently is called a weak entity (1 mark).

 

[2]
(b) Draw an E-R diagram for each of the following situations:
(i) A company has a number of employees. The attributes of EMPLOYEE include NAME, ADDRESS, and BIRTHDATE. The company has also several projects. Attributes of PROJECT include CODE, DESCRIPTION and START DATE. Each employee may be assigned to one or more projects, or may not be assigned to a project. A project must have at least one employee assigned, and may have several employees assigned. [3]

pic1.gif (3820 bytes)

1 mark for attributes, 2 marks for relation including cardinalities.

 

 

[3]

(ii) A laboratory has several chemists who work on various projects, and who may use certain kinds of equipment on each project. Attributes of CHEMIST include NAME and PHONE NO. Attributes of PROJECT include PROJECT ID and START DATE. Attributes of EQUIPMENT include NUMBER and COST. [3]

pic2.gif (6066 bytes)

1 mark for attributes, 2 marks for relation including cardinalities.

 

 

[3]

(iii) A university has a large number of course available. Attributes of a COURSE include NO, NAME and UNITS. Each course may have one or more other courses as prerequisites, or may have no prerequisites [3]

pic3.gif (3590 bytes)

1 mark for attributes, 2 marks for relation including cardinalities.

 

 

[3]

(c) In the Object-Oriented (O-O) model, what is the difference between an object class and an object instance? [2]
An object instance is a single occurence within an object class (1 mark), while an object class is grouping of similar object instances (1 mark)

 

[2]
(d) Draw a O-O diagram to represent each of the following situations:
(i) In a vehicle-licensing application, there are three types of vehicle: passenger, (but not passenger) vehicles have an attribute named Gross Capacity. The passenger and truck types require a method named PerformSmogCheck. [3]

pic4.gif (5248 bytes)

1 mark for object classes, 1 mark for methods and attributes, 1 mark for exclusive and exhaustive subclass relation.

 

 

[3]

(ii) In a simple banking application, there are exactly three types of account, with the following attributes:

CHECKING Acct No, Date Opened, Balance, Service Charge
SAVING Acct No, Date Opened, Balance, Interest Rate
LOAN Acct No, Date Opened, Balance, Acct Limit

[4]

pic5.gif (5162 bytes)

1 mark for object classes, 1 mark for attributes, 1 mark for exclusive and exhaustive subclass relation. A bonus mark should be awarded for a totally correct diagram.

 

[4]