0% found this document useful (0 votes)
122 views6 pages

DBMS TW-2

The document describes creating an entity-relationship (ER) diagram for a library management system. It identifies 5 entities (Book, Publisher, Member, Section, Granter), their key attributes, and the relationships between entities. Books have a one-to-many relationship with Publishers and Members, and a many-to-one relationship with Sections. Members have a one-to-many relationship with Granters. The document provides steps to identify the entities, attributes, keys, and relationships to develop the full ER diagram.

Uploaded by

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

DBMS TW-2

The document describes creating an entity-relationship (ER) diagram for a library management system. It identifies 5 entities (Book, Publisher, Member, Section, Granter), their key attributes, and the relationships between entities. Books have a one-to-many relationship with Publishers and Members, and a many-to-one relationship with Sections. Members have a one-to-many relationship with Granters. The document provides steps to identify the entities, attributes, keys, and relationships to develop the full ER diagram.

Uploaded by

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

ER-diagrams for library management system

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 −

 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 −


Example 1 - Library Management System Database Design

As it can be observed in this example, the entities are present with their attributes. At the
same time, the direct relations between the attributes are also shown, such as several CDs and
books are present, so to differentiate, they have specific ISBNs and ISSNs. One key element
to understand here is that proper symbols are used to understand an entity diagram.
Example 2 - Library Management System

Here is a straightforward ER diagram for the Library Management System. You can observe
the entity relations quite clearly, and their attributes are evident as well.
Example 3 - ER Diagram of Library Management

Below is a much more complex example of an ER diagram. As it can be seen, several new
entities are part of this ER diagram. One more exciting thing about this ER diagram is that
one entity is linked to more than one entity.

You might also like