Cardinality Examples – Class Activity 4
• Map the following examples using the Chen Notation of ERD
49
Cardinality Examples - Class Activity 4 (cont.)
• Map the following examples using the Chen Notation of ERD
50
Cardinality Examples – Class Activity 4 Solution
• Map the following examples using the Chen Notation of ERD
51
Cardinality Examples – Class Activity 4 Solution(cont.)
• Map the following examples using the Chen Notation of ERD
52
Cardinality Examples - Class Activity 4 Solution (cont.)
• Map the following examples using the Chen Notation of ERD
53
Cardinality Examples - Class Activity 4 Solution (cont.)
• Map the following examples using the Chen Notation of ERD
54
Practice Question
Identify all possible entities & relationship from the following case study
A university may have some departments. All these departments employ various
lecturers and offer several programs. Some courses make up each program. Students
register in a particular program and enroll in various courses. A lecturer from the
specific department takes each course, and each lecturer teaches a various group of
students.
21
Practice Question - Solution
Identify all possible entities & relationship from the following case study
A university may have some departments. All these departments employ various lecturers and
offer several programs. Some courses make up each program. Students register in a particular
program and enroll in various courses. A lecturer from the specific department takes each
course, and each lecturer teaches a various group of students.
Entities:
A university may have some departments. All these departments employ various lecturers and
offer several programs. Some courses make up each program. Students register in a particular
program and enroll in various courses. A lecturer from the specific department takes each
course, and each lecturer teaches a various group of students.
Relationships:
A university may have some departments. All these departments employ various lecturers and
offer several programs. Some courses make up each program. Students register in a particular
program and enroll in various courses. A lecturer from the specific department takes each
course, and each lecturer teaches a various group of students.
22
Example 2 - Creating an ERD (cont.)
Draw an E-R diagram according to the following CASE STUDY
1. A company “Noor Corporation” deals in selling products to its
customers after purchasing products from different vendors. Vendors have
attributes like; Vendor lD, Vender Name, Address, Phone etc.
2. Company sends purchase order to a vendor and provides the list of items to
purchase by the company.
3. A Item (product) may be purchased from different vendors.
4. Items are stored in the stock after they are received from vendor.
5. Customers send Noor Corporation, Sales orders with the list of
products to buy from Noor Corporation.
6. Products are sent to customers with the invoice after receiving sales order from
customer. Invoice has attributes; Invoice-No, Date etc.
7. Customers make the payments according to invoice after receiving the invoice
and make payments on some date.
92
Example 2- Creating an ERD (cont.)
93
ERD - Practice Questions
Exercise # 1
For example, an inventory software used in a retail shop will have a database that
monitors elements such as purchases, item, item type, item source and item price.
94
ERD - Practice Questions (cont.)
Exercise # 1 - Solution
For example, an inventory software used in a retail shop will have a database that
monitors elements such as purchases, item, item type, item source and item price.
95
ERD - Practice Questions (cont.)
Exercise # 2
UPS prides itself on having up-to-date information on the processing and current
location of each shipped item. To do this, UPS relies on a company-wide information
system. Shipped items are the heart of the UPS product tracking information system.
Shipped items can be characterized by item number (unique), weight, dimensions,
insurance amount, destination, and final delivery date. Shipped items are received
into the UPS system at a single retail center. Retail centers are characterized by their
type, uniqueID, and address. Shipped items make their way to their destination via
one or more standard UPS transportation events (i.e., flights, truck deliveries). These
transportation events are characterized by a unique scheduleNumber, a type (e.g,
flight, truck), and a deliveryRoute.
Please create an Entity Relationship diagram that captures this information about
the UPS system. Be certain to indicate identifiers and cardinality constraints.
96
ERD - Practice Questions (cont.)
Exercise # 2 - Solution
97
ERD - Practice Questions (cont.)
Exercise # 3
98
ERD - Practice Questions (cont.)
Exercise # 3 - Solution
99