ERD Exercises - Chapter 3
ERD Exercises - Chapter 3
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.
b. A customer may buy one or more cars or may not, but each car
is bought by 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.
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.
Semester 1 AY 2024-2025
INFORMATION TECHNOLOGY DEPARTMENT
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
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
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).
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
Semester 1 AY 2024-2025