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.
- 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:
- Book Entity:
- Attributes:
authorbook_ID(Primary Key)titlepriceavailability
book_IDis the unique identifier for each book, andavailabilityindicates whether the book is currently available or checked out.
- Publisher Entity:
- Attributes:
publisher_ID(Primary Key)publisher_addresspublisher_name
publisher_IDuniquely identifies each publisher.
- Member Entity:
- Attributes:
member_ID(Primary Key)member_datemember_typemember_addressmember_nameexpiry_date
member_IDis a unique identifier for each member, andexpiry_datespecifies 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:
- Website/Application Entity:
- Attributes:
domain_nameapp_name
- Customer Entity:
- Attributes:
usernamepasswordemail addressmobile numbercountry namedistrictaddressC_id(Primary Key)
C_id.
- Products Entity:
- Attributes:
product_ID(Primary Key)P_nameP_categoryP_priceP_availability
product_ID.
- Admin Entity:
- Attributes:
usernamepasswordA_id(Primary Key)
- Shopping Cart Entity:
- Attributes:
product_idproduct_nametotal_pricebilling_products
- Registration Entity:
- Attributes:
user_idusernamepasswordforgot_passwordsignup
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:
- 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.
- 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.
- 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.