- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- 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 Library management system(DBMS)?
Draw an ER model for library management application considering the following constraints −
In a library multiple students can enroll.
Students can become a member by paying an appropriate fee.
The books in the library are identified by a unique ID.
Students can borrow multiple books from subscribed libraries.
Follow the steps given below to draw an ER model for the library management 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 −
Step 2 − Identify the attributes for the given entities
Book − The relevant attributes are title, author, price, Isbn.
Member − The relevant attributes are Name, Bday, MID, address, phone, age.
Section − The relevant attributes are Sid, name, phone.
Publisher − The relevant attributes are name, phone, Pid, address.
Granter − The relevant attributes are phone, name, Nic, post, address.
Step 3 − Identify the Key attributes
Sid is the key attribute for the section.
Mid is the key attribute for member entities.
Isbn is the key attribute for a book entity.
Pid is the key attribute for a publisher entity.
Nic is the key attribute for a granter entity.
Step 4 − Identify the relationship between entity sets
Multiple books are arranged in a single section and one section has multiple books. Hence, the relationship between book and section is many to one.
One member borrows multiple books and multiple books can borrow a single person. Hence, the relationship between member and book is one-to-many.
One publisher can supply multiple books and multiple books can be supplied by a single publisher. Hence, the relationship between publisher and book is one-to-many.
One granter can grant multiple members and multiple members can grant a single granter. Hence, the relationship between grantor and member is one-to-many.
Step 5 − Complete ER diagram
The complete ER diagram is as follows −
Kickstart Your Career
Get certified by completing the courseGet Started