PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
Department of Information Systems
IS 220 – Database Fundamentals First Semester 1446
IS 220T Database Fundamentals
LAB SHEET 2 : READING MULTIPLICITY &
DRAWING ERD
Information Systems Department
2024-2025
PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
Department of Information Systems
IS 220 – Database Fundamentals First Semester 1446
OBJECTIVE:
Understand the difference between an entity, an attribute, and an instance
of an entity.
Read a relationship.
Draw ER-diagram.
Question1:
Goal:
The goal of this practice is to learn to make a distinction between an entity, an attribute, and an
instance of an entity.
List which of the following concepts you think is an Entity, Attribute, or Instance. (Give an example).
For the last two rows, find a concept that fits.
Concept E/A/I ? Example Instance OR Entity
Employee
ANIMAL
HEIGHT
Dr. Huda
E-mail
E Car
A Car
PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
Department of Information Systems
IS 220 – Database Fundamentals First Semester 1446
Question2:
Goal
The goal of this practice is to read a relationship.
(1,*)
1. Which text corresponds to the diagram.
Each teacher must teach one t o many courses.
Each teacher teaches exactly one course .
Each course may be taught by one to many teachers.
2. Cardinality Ratios often dictate the detailed design of a database. The cardinality ratio depends
on the real-world meaning of the entity types involved and is defined by the specific application.
For the binary relationships below, suggest cardinality ratios based on common-sense meaning
of the entity types. Clearly state any assumptions you make.
Entity 1 Cardinality Entity 2
Ratio
Book Author
Mother Child
PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
Department of Information Systems
IS 220 – Database Fundamentals First Semester 1446
Question3:
Goal
The goal of this practice is to draw ERD that best captures the information of the following cases. You
should specify the cardinality ratio and participation constraints only.
The Prescriptions-R-X chain of pharmacies has offered to give you a free lifetime supply of
medicine if you design its database. Here’s the information that you gather :
Patients are identified by an SSN, and their names, addresses, and ages must be recorded. Doctors
are identified by an SSN. For each doctor, the name, specialty, and years of experience must be
recorded.
Each pharmaceutical company is identified by name and has a phone number. For each drug, the
trade name and formula must be recorded. Each drug is sold by a given pharmaceutical company,
and the trade name identifies a drug uniquely from among the products of that company. If a
pharmaceutical company is deleted, you need not keep track of its products any longer.
Each pharmacy has a name, address, and phone number.
Each patient may see several doctors and every doctor has at least one patient. Each pharmacy
should sells several drugs and has a price for each. A drug sold at one or several pharmacies, and
the price could vary from one pharmacy to another. Doctors prescribe drugs for patients. A doctor
could prescribe one or more drugs for several patients, and a patient may obtain prescriptions from
several doctors.
PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
Department of Information Systems
IS 220 – Database Fundamentals First Semester 1446
Question4:
Goal
The goal of this practice is to draw ERD that best captures the information of the following cases. You
should specify the cardinality ratio and participation constraints only.
A real estate firm lists property for sale and wishes to establish a database system for its
operation.
The firm has a number of sales offices in several states. Each sales office has office_number and
address: city, state and zip. Each sales office is assigned one or more employees. Every employee
has an employee_id and employee_name. An employee must be assigned to only one sales office. If
an employee is married to another employee of the firm, the date of the marriage and who is married
to whom must be stored; however, no record of marriage is required if an employee’s spouse is not
also an employee. For each sales office, there is always one employee assigned to manage that
office. An employee may manage only the sales office to which he or she is assigned. In other words,
an employee cannot be assigned to one office, yet manage another office.
The firm lists property for sale; which has property_id, and address: city, state and zip. Each property
must be listed with one and only one of the sales offices. A sales office may have any number of
properties listed or may have no properties listed.
Each property has one or more owners. Every owner has an owner_id and owner name. An owner
should own one or more property. The firm wants to keep track of the percentage that a given owner
owns a given piece of property. For example, imagine that Smith and Jones both own property A.
Smith owns 35% of property A and Jones owns 65% of property A. The firm wants to retain this
information and they want to call it percent_owned.