DBMS Assignment 2
DBMS Assignment 2
This bank ER diagram illustrates key information about bank, including entities such as branches,
customers, accounts, and loans. It allows us to understand the relationships between entities.
• Bank Entity : Attributes of Bank Entity are Bank Name, Code and Address.
Code is Primary Key for Bank Entity.
• Customer Entity : Attributes of Customer Entity are Customer_id, Name, Phone Number
and Address.
• Customer_id is Primary Key for Customer Entity.
• Branch Entity : Attributes of Branch Entity are Branch_id, Name and Address.
• Branch_id is Primary Key for Branch Entity.
• Account Entity : Attributes of Account Entity are Account_number, Account_Type and
Balance.
• Account_number is Primary Key for Account Entity.
• Loan Entity : Attributes of Loan Entity are Loan_id, Loan_Type and Amount.
• Loan_id is Primary Key for Loan Entity.
• Staff maintains the book catalog with its ISBN, Book title, price(in INR), category(novel,
general, story), edition, author Number and details.
• A publisher has publisher Id, Year when the book was published, and name of the book.
• Readers are registered with their user_id, email, name (first name, last name), Phone no
(multiple entries allowed), communication address.
• Readers can return/reserve books that stamps with issue date and return date. If not returned
within the prescribed time period, it may have a due date too.
• Staff also generate reports that has readers id, registration no of report, book no and
return/issue info.
• Book Entity : It has authno, isbn number, title, edition, category, price. ISBN is the Primary
Key for Book Entity.
• Reader Entity : It has UserId, Email, address, phone no, name. Name is composite attribute
of firstname and lastname. Phone no is multi valued attribute. UserId is the Primary Key for
Readers entity.
• Publisher Entity : It has PublisherId, Year of publication, name. PublisherID is the Primary
Key.
• Authentication System Entity : It has LoginId and password with LoginID as Primary Key.
• Reports Entity : It has UserId, Reg_no, Book_no, Issue/Return date. Reg_no is the Primary
Key of reports entity.
• Staff Entity : It has name and staff_id with staff_id as Primary Key.
• Reserve/Return Relationship Set : It has three attributes: Reserve date, Due date, Return
date.
• A reader can reserve N books but one book can be reserved by only one reader. The
relationship 1:N.
• A publisher can publish many books but a book is published by only one publisher. The
relationship 1:N.
• Staff keeps track of readers. The relationship is M:N.
• Staff maintains multiple reports. The relationship 1:N.
• Staff maintains multiple Books. The relationship 1:N.
• Authentication system provides login to multiple staffs. The relation is 1:N.
• Customer Entity : Attributes of Customer Entity are Name, customerId, Address & Salary.
• customerId is Primary Key for Customer Entity.
• Orders Entity : Attributes of Orders Entity are OrderId, OrderDate.
• OrderId is Primary Key for Orders Entity.
• Item Entity : Attributes of Item Entity are itemCode, unitPrice, description & qtyOnHand.
• itemCode is Primary Key for Item Entity.
• OrderDetail Assosiate Entity : Attributes of OrderDetail Assosiate Entity is qty.
• Each School offers numerous programs and each program contains many courses.
• Lecturers can teach many different courses and even the same course numerous times.
• A student is enrolled in only one program but a program can contain many students.
• Students can been rolled in many courses at the same time and the courses have many
students enrolled.