Saturday, September 17, 2022

Construct an ER diagram for the Library management system(DBMS)?

Problem

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.

Solution

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 −

  • Book

  • Publisher

  • Member

  • Section

  • Granter

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 −


https://www.tutorialspoint.com/construct-an-er-diagram-for-the-library-management-system-dbms


No comments:

Post a Comment

Class 12 Computer Science MCQ set

  Class 12 Computer Science MCQ set According to the new curriculum and grid of NEB, there is an abrupt change in question pattern. Computer...