You are on page 1of 2

WIA2001/WIB2001

DATABASE
SEM 1, 2022/2023

Tutorial Week 4

1. Draw the following relationship using a suitable notation. Show the cardinalities.

A doctor can treat many patients but must treat at least 1 patient and a patient
is treated by only one doctor. It is optional for a patient to be given any
medication, but it is also possible for the patient to receive up to 10
medications. A medication can be given to many patients.

2. Based on the following ERD, state TEN possible business rules

3. A manufacturing company produces products. The following product information


is stored: product name, product ID and quantity on hand. These products are
made up of many components. Each component can be supplied by one or more
suppliers. The following component information is kept: component ID, name,
description, suppliers who supply them, and products in which they are used. 
 
Create an ERD to show how you would track this information. Show entity
names, primary keys, attributes for each entity, relationships between the entities
and cardinality.
 
Assumptions can be made:
 A supplier can exist without providing components.
 A component does not have to be associated with a supplier.
 A component does not have to be associated with a product. Not all
components are used in products.
 A product cannot exist without components

4. Draw an Entity Relationship Diagram based on the following statements, using


Chen’s or Crow’s Foot Notation:

An art gallery keep information about artists, their names (which are unique),
birthplace, age and style of art. For each piece of artwork, the artist, the year it
was made, its unique title, its type of art (e.g., painting, sculpture, photograph),
and its price must be stored. Pieces of artwork are also classified into groups of
various kinds, for example, portraits and sculptures (given piece may belong to
more than one group).  Each group is identified by a group name that describes
the group. The gallery keep all the information about customers. For each
customer, the gallery keep that person’s unique name, address, total amount of
ringgit’s spent, and the artists and groups of art that the customer tends to like.

You might also like