0% found this document useful (0 votes)
9 views3 pages

Lab6 - ERD

The document describes two case studies for entity relationship diagrams (ERDs). The first case study involves entities for students, courses, departments, and professors and relationships like enrollment and advising. The second case study involves a bank database with entities for banks, accounts, customers, loans, and the weak entity bank branches.

Uploaded by

07dc855dbbb4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Lab6 - ERD

The document describes two case studies for entity relationship diagrams (ERDs). The first case study involves entities for students, courses, departments, and professors and relationships like enrollment and advising. The second case study involves a bank database with entities for banks, accounts, customers, loans, and the weak entity bank branches.

Uploaded by

07dc855dbbb4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Cairo University

Faculty of Computers and Artificial Intelligence


Information Systems Department

Database I, Year 2022/ 2023


Lab - 6
ERD

Case Study 1: University System


Every year at start of each semester a student enrolls in different courses. Courses
may have prerequisites, also student should have grade for each course separately.
Every student has a unique id, name and GPA. For each course there a unique Id, name
and description. Each course must be related to only one department, and is taught by
only one professor. Every Professor has an id, name, email, address and multiple
telephone numbers. Each student has his/her own advisor “Professor” to help in
identifying path of interest, but some advisors mayn't advise any students.
(Write any attributes you though it will be useful for system)

Entity Strong Attributes


Types Or
Weak
Student Strong (SID, SName, GPA)
Course Strong (CID, CName, Description)
Department Strong (DeptID, DeptName)
Professor Strong (PID, PName,Email, Address,
TelephoneNumber)

Relationship Between Cardinality Participation


Type
Enrolls in Student - Course M:N Mandatory - Optional
Requires Course - Course M:N Optional - Optional
Offers Department - Course 1:M Mandatory -Mandatory
Teaches Professor - Course M: 1 Optional - Mandatory
Advises Professor - Student M:1 Optional - Mandatory

1
Entity Relationship Diagram:

Student enrolled in (1,M) Enrolled-in course (0,M)

Advised by (1,1)
Offered
Course(1,1)

advisee (0,M) Offering Department


(1,M)

Case Study 2:
Consider the ER diagram shown in Figure 2 for part of a BANK database. Each
bank can have multiple branches, and each branch can have multiple accounts
and loans. Each BANK has a unique Code, as well as a Name and Address. Each
BANK is related to one or more BANK-BRANCHes, and the BranhNo is unique
among each set of BANK-BRANCHes that are related to the same BANK. Each
BANK-BRANCH has an Address. Each BANK-BRANCH has zero or more LOANS
and zero or more ACCTS. Each ACCOUNT has an AcctNo (unique), Balance, and
Type and is related to exactly one BANK-BRANCH and to at least one
CUSTOMER. Each LOAN has a LoanNo (unique), Amount, and Type and is related
to exactly one BANK-BRANCH and to at least one CUSTOMER. Each CUSTOMER
has an SSN (unique), Name, Phone, and Address, and is related to zero or more
ACCOUNTs and to zero or more LOANs.

2
1. Entity types: BANK, ACCOUNT, CUSTOMER, LOAN
2. Weak entity type: BANK-BRANCH.
Partial key: BranchNo.
Identifying relationship: BRANCHES.

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