- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Construct an ER diagram for the Banking system in DBMS?
Problem
Draw an ER model of the Banking database application considering the following constraints −
A bank has many entities.
Each customer has multiple accounts.
Multiple customers belong to a single branch.
Single customer can borrow multiple loans.
A branch has multiple employees.
Solution
Follow the steps given below to draw an ER model of the Banking database application −
Step 1 − Identify the entity sets
The entity set has multiple instances in a given business scenario.
As per the given constraints the entity sets are as follows −
Customer
Account
Account
Loan
Loan
Step 2 − Identify the attributes for the given entities
Customer − the relevant attributes are customerName, CustomerID, address.
Account − The relevant attributes are AccountNo, balance.
Branch − The relevant attributes are branchID, branchName, address.
Loan − The relevant attributes are loanNo, paymentMode, dateOfLoan, and amount.
Employee − The relevant attributes are empID, empName, dateOfJoin, experience, qualification.
Step 3 − Identify the Key attributes
CustomerID is the key attribute for a customer.
AccountNo is the key attribute for Account entities.
BranchID is the key attribute for branch entities.
LoanNo is the key attribute for a loan entity.
EmpID is the key attribute for an Employee entity.
Step 4 − Identify the relationship between entity sets
One customer is enrolled by multiple accounts and one account for multiple customers. Hence, the relationship is many to many.
Many customers belong to one branch but one branch belongs to many customers. Hence, the relationship between customer and branch is many to one.
One customer can borrow multiple loans in the same way multiple loans can borrow a single customer, hence the relationship between customer and loan is one to many.
One branch has many employees and in the same way the number of employees works in a single branch.
Step 5 − Complete ER diagram
The complete ER diagram is as follows −