Diagram of Library Management System

Diagram of Library Management System

The library management system has a database that shows the relationships between the entities such as a book, publisher, and member. Since this is a simple system, it has only three entities.

Entities and Attributes

? Book Entity: It has author, book_ID, title, price, and availability.

? Publisher Entity: It has publisher_ID, publisher_address, and publisher_name.

? Member Entity: It has member_ID, member_date, member_type, member_address, member_name, and expiry_date.

  1. ER Diagram of Online Shopping System

Entities and Attributes

? Website/Application Entity: Attributes are domain name and app name.

? Customer Entity: Attributes are username, password, email address, mobile number, country name, district, address, C_id.

? Products Entity: Attributes are product ID, P_name, P_category, P_price, P_availability.

? Admin Entity: Attributes are username, password, A_id.

? Shopping Cart Entity: Attributes are product id, product name, total price, billing products.

? Registration Entity: Attributes are user id, username, password, forgot password, signup.

The Correct Answer and Explanation is :

ER Diagram of Library Management System

Entities and Attributes:

  1. Book Entity:
  • Attributes:
    • author
    • book_ID (Primary Key)
    • title
    • price
    • availability
    The Book entity holds details about books available in the library. book_ID is the unique identifier for each book, and availability indicates whether the book is currently available or checked out.
  1. Publisher Entity:
  • Attributes:
    • publisher_ID (Primary Key)
    • publisher_address
    • publisher_name
    The Publisher entity represents the publisher of books. publisher_ID uniquely identifies each publisher.
  1. Member Entity:
  • Attributes:
    • member_ID (Primary Key)
    • member_date
    • member_type
    • member_address
    • member_name
    • expiry_date
    The Member entity stores information about library members. member_ID is a unique identifier for each member, and expiry_date specifies when the membership expires.

Relationships:

  • A Member can borrow multiple Books, forming a one-to-many relationship from Member to Book.
  • A Publisher can publish multiple Books, forming a one-to-many relationship from Publisher to Book.

ER Diagram of Online Shopping System

Entities and Attributes:

  1. Website/Application Entity:
  • Attributes:
    • domain_name
    • app_name
    Represents the online platform for shopping.
  1. Customer Entity:
  • Attributes:
    • username
    • password
    • email address
    • mobile number
    • country name
    • district
    • address
    • C_id (Primary Key)
    Represents customers who use the online shopping platform. The unique identifier is C_id.
  1. Products Entity:
  • Attributes:
    • product_ID (Primary Key)
    • P_name
    • P_category
    • P_price
    • P_availability
    Contains details about the products available for purchase. Each product has a unique product_ID.
  1. Admin Entity:
  • Attributes:
    • username
    • password
    • A_id (Primary Key)
    Represents administrators who manage the platform.
  1. Shopping Cart Entity:
  • Attributes:
    • product_id
    • product_name
    • total_price
    • billing_products
    Represents the cart where customers add products for purchase.
  1. Registration Entity:
  • Attributes:
    • user_id
    • username
    • password
    • forgot_password
    • signup
    Manages user registration on the platform.

Relationships:

  • A Customer can have many Shopping Carts, representing a one-to-many relationship.
  • A Shopping Cart can contain multiple Products, forming a many-to-many relationship between Products and Shopping Cart.
  • A Customer can make multiple Registrations, which might form a one-to-many relationship if registration details are tracked over time.

Explanation

The Library Management System involves managing books, publishers, and members. Relationships are primarily one-to-many: a publisher can publish many books, and a member can borrow multiple books.

In the Online Shopping System, the relationships are more complex:

  1. The Customer can register, manage a shopping cart, and purchase many products, forming one-to-many or many-to-many relationships with other entities like Products and Shopping Cart.
  2. Products and Shopping Cart have a many-to-many relationship, where each cart can have multiple products, and a product can appear in multiple carts.
  3. Admin manages the platform, ensuring proper admin privileges.

Both systems rely on entities with well-defined relationships to manage various processes efficiently. The Library system is more focused on borrowing books, while the Online Shopping system supports registration, cart management, and product purchases.

Scroll to Top