DBMS PBL
DBMS PBL
➢ Introduction Of PBL
➢ Database Design
➢ Database Relationships
➢ ER Diagram
➢ Database Operations
➢ Database Queries
➢ Database Security
➢ Conclusion
Introduction of PBL
An online bookstore database system is a critical component
of an e-commerce platform that enables customers to
browse, search, and purchase books online.
The database system manages the inventory, customer
information, orders, and other relevant data to ensure a
seamless online shopping experience.
Database Design
The online bookstore database system consists of several
interconnected tables that store different types of data. The
main tables are:
1.Books Table:
• Book ID (primary key)
• Title
• Author
• Publisher
• Publication Date
• Price
• Stock Quantity
• Book Description
• Book Image
2.Customers Table:
• Customer ID (primary key)
• Name
• Email
• Password (hashed)
• Address
• Phone Number
3. Orders Table:
• Order ID (primary key)
• Customer ID (foreign key)
• Order Date
• Total Cost
• Status (pending, shipped, delivered, cancelled)
Database Relationships
1. A customer can place many orders (one-to-many).
2. An order is associated with one customer (many-to-one).
3. An order can have many order items (one-to-many).
4. An order item is associated with one order and one book
(many-to-one).
5. A payment is associated with one order (many-to-one).
ER Diagram
Database Operations
1. Insert: When a new book is added to the inventory, a new record
is inserted into the Books table.
Database Queries
1.Retrieve all books by a specific author:
SELECT * FROM Books WHERE Author = 'John Grisham';
2.Retrieve customer information by email:
SELECT * FROM Customers WHERE Email =
‘[email protected]’;
3.Retrieve order details by order ID:
SELECT * FROM Orders WHERE OrderID = 123;
4.Retrieve order items by order ID :
SELECT * FROM OrderItems WHERE OrderID = 123;
5. Retrieve payment information by order ID:
SELECT * FROM Payments WHERE OrderID = 123;
Database Security
1. Encryption: Customer passwords are stored in hashed
format to prevent unauthorized access.
2. Access Control: Only authorized personnel have access to
the database system.
3. Backup and Recovery: Regular backups are performed to
ensure data integrity in case of system failure.
Conclusion
The online bookstore database system is a critical component
of an e-commerce platform that enables customers to
browse, search, and purchase books online. The database
design, relationships, operations, and queries work together
to provide a seamless online shopping experience. By
ensuring data security and integrity, the database system
protects customer information and maintains the trust of
online shoppers. I hope this sample PDF outline helps! Let me
know if you have any further questions or need more details.
References
➢ GOOGLE AI
➢ CHATGPT
➢ OTHER WEBSITES
➢ ETC.