0% found this document useful (0 votes)
20 views6 pages

ERD Exercises - Chapter 3

The document outlines various scenarios for creating Entity-Relationship Diagrams (ERDs) in different contexts, including automotive sales, banking, movie production, education, and construction. Each scenario specifies entities, attributes, relationships, and cardinalities that need to be identified and drawn in the ERD. Additionally, it includes questions related to ERD concepts and business rules governing the relationships between entities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

ERD Exercises - Chapter 3

The document outlines various scenarios for creating Entity-Relationship Diagrams (ERDs) in different contexts, including automotive sales, banking, movie production, education, and construction. Each scenario specifies entities, attributes, relationships, and cardinalities that need to be identified and drawn in the ERD. Additionally, it includes questions related to ERD concepts and business rules governing the relationships between entities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

INFORMATION TECHNOLOGY DEPARTMENT

COLLEGE OF COMPUTING AND INFORMATION SCIENCES

Exercises (ERD)
Draw an E-R diagram for the following scenarios. Identify entities,
attributes of each entity, relationships, relationship attribute (if
any), keys, and the minimum and maximum relationship
cardinalities.

1. Bahwan automotive has an online system that store information about


their EMPLOYEE’s, CAR’s, CUSTOMER’s, and INVOICE’s. For each CAR the
following information is stored: Car_ID to identify each car, Serial
Number, and Model (which consists of ModelNo, Color and Year). For
the CUSTOMER CustomerID(identifier), Name, Phone number, Address,
City, and Country is stored. An EMPLOYEE is identified by EmpID.
Employee information like Name, Address, Degree (some employees
may have more than one degree) is also stored in the database. An
INVOICE is generated when a customer buys a car. The Invoice details
are InvoiceID (identifier) and Date. The following are the business rules:
a. An employee may sell many cars or may not, but each car is sold
by one and only one Employee.

b. A customer may buy one or more cars or may not, but each car
is bought by only one customer.

c. An employee writes one or more invoices, but an invoice is


written by one and only one employee.

d. A customer receives one or more invoices, but an invoice is


issued to one and only one customer.

2. An item may contain many other different items or may not contain any
item. An item may be contained in many items or may not be contained
in any item. Attributes of ITEM include ItemID as identifier, ItemName
and Price.

3. A bank is interested to record information of its CUSTOMERs, ACCOUNTs,


and TRANSACTIONs performed on each account. A customer may have
one or more accounts and account is related to exactly one customer.

Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES

Each account may have one or more transactions and each transaction is
associated to only one account.
The attributes of ACCOUNT are acno, actype, date_opened, and balance.
The attribute of CUSTOMER includes custno, cname, and phone.
The attribute of TRANSACTION includes tno, ttype, tamt and tdate. Unique
tno is given to transactions performed on a particular account. Same tno
may be given to transaction on different accounts.

4. Suppose that you are designing a database to store information about


Movies on OTT.
For each MOVIE, data recorded are Movie_ID (identifier), Title, and Cast
(there may be multiple casts). A movie may have zero or more sequel
movies, and a sequel movie must have exactly one prequel movie.
For each PRODUCER, record the Producer_ID (identifier), Name, and Email.
A movie is produced by at least one producer. And, one producer produces
one or more movies.
For each OTT, the details recorded are Name (identifier), Start_Year, and
Office_Address (which is composed of Street, and City). An OTT may
stream one or more movies. While each movie is streamed by exactly one
OTT.
For each MOVIE and PRODUCER association, the Producer’s Share is
recorded.

5. In a teaching and learning organization wants to keep track of


LECTURERs, COURSEs, and OFFICEs. A Lecturer has a unique Lectno,
Lectname, Rank and Hiredate. Course is identified by Coursecode and
Coursename. Office is uniquely identified by Officeno, Officephone and
Officetype. A lecturer may teach many courses or may not teach any
course. A course is taught one or more lecturers. Each lecturer has one or
more office, and each office belongs to exactly one lecturer. For each
Lecturer’s office Day and time is recorded.

Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES

6. Mohsin Hyder Darwish is a construction company which deals with


suppliers, contractors and items. The company would like to maintain a
database of CONTRACTOR, SUPPLIER, and ITEM. SUPPLIER information
includes Sup_id (Identifier), Sup_name (consists of Fname and Lname),
Sup_addr and Sup_Phone. The details of ITEM are Item_code (Identifier),
Item_name, Manufacturer, and price. CONTRACTOR information includes
Contractor_id (Identifier), Contractor_name and Contractor_email (Some
CONTRACTOR’s may have many email addresses).
A SUPPLIER can supply one or more ITEM’s, but one ITEM is supplied by
one and only one SUPPLIER. A CONTRACTOR may purchase many ITEM’s or
may not purchase any ITEM. An ITEM may be purchased by many
CONTRACTOR’s or may not. When an ITEM is purchased by a
CONTRACTOR, the Purchase_date must also be stored in the database.

7. Refer to the ERD below and answer the following questions:

Identify Write your answer on the space given.

1. Attribute on Relationship

2. Composite Attribute
3. Key Identifier

4. Multivalued Attribute

5. Derived Attribute
6. Store Attribute
7. Degree of Relationship
8. Type of Relationship

Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES

8. Refer to the ERD below and answer the following questions:

Questions Write your answer on the space given.


a) What is the degree of relationship of
the has relationship?

b) If an instance of a staff “Ahmed” has


five (5) dependents, then what is the
maximum cardinality?

c) If an instance of a dependent named


“Fatema” must be a dependent of
staff “Ahmed” only, then what is the
minimum cardinality?

d) Can the DEPENDENTS entity exist in


the database if it has no relationship
with the STAFF entity or any other
entities? Why or why not?

e) What are the relationships of the


STAFF Entity?

f) Identify relationship type attribute


in the above ERD.

Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES

9. Companies in Muscat place advertisements in newspapers to hire students for different job
vacancy. The details of a COMPANY are CompanyCode (identifier), CompanyName and
Phone (some companies have more than one Phone). The STUDENT has identifier StudentID,
Name and Highest_Degree. The JOB details are JobCode (identifier), Details (which consists
of Title and Duration), and Salary (which is calculated from JobCode).

The business rules are:

 Each student can apply for many jobs or may not. Many students may apply for a job.
When a student applies for a job, the Application_Date must be recorded in ERD.

 Each company posts one or more job vacancy. A job vacancy is associated with one and
only one company.

10. LuLu Hypermarket, the retail division of the multidimensional and multinational LuLu Group
International. It is maintaining a database to store information about their various ordered
products which provided by different suppliers. Each SUPPLIER is identified with SupplierId,
Suppliername, Address (Address consists of Streetno and City). Each PRODUCT has P_Id as
identifier and Prodcutname. Many orders can be done for various types of products. An
ORDER is identified with OrderNo and Orderdate. Every supplier can make around hundreds
of delivery per day. Each DELIVERY has Delivery_Id as identifier and DeliveryDate

 A Supplier is supplied more than one Products and each Product can be supplied by one
and only one Supplier.
 An Order may or may not consists of more than one Products. Each Product can be within
more than one order. When a product is ordered the Product_Quantity is recorded.
 A delivery belongs to exactly one supplier. Each supplier can make more than one delivery
at a time.

11. A’Seeb International School wants to record about the following important entities and their
attributes:
TEATCHER –TID (identifier), TName, Birthdate, Email (teacher may have multiple emails).
STUDENTS – SID (identifier) and SName,
COURSE – CID (identifier), and CNam

Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES

COMMITTESS- CName, Cdetails.


These are the business rules:
 A TEACHRR must teach at least one COURSE. But a COURSE can be taught with one or
more teacher. For each TEACHER and COURSE, the school wishes to record Time and
venue.
 A STUDENT may register one or more COURSE. But a COURSE may or may not be
registered with one or more STUDENTs.
 A COURSE may have one a PREREQUISITE COURSE or may not and PREREQUISITE COURSE
may be a prerequisite for one or more courses.
 A COMMITTEE can have one or more teacher. A TEACHER May involve in one or more
COMMITTEE. A committee cannot exist without teachers.

Semester 1 AY 2024-2025

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy