0% found this document useful (0 votes)
8 views

Book Table

The document outlines the structure of four database tables related to book sales and inventory management: Book, Sales, Requests, and Inventory. Each table includes fields with specific data types and descriptions, detailing information such as book identifiers, sale transactions, out-of-stock requests, and inventory records. Additionally, a Threshold Alert Table is included to monitor low-stock books and trigger alerts based on predefined thresholds.

Uploaded by

sai713194
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Book Table

The document outlines the structure of four database tables related to book sales and inventory management: Book, Sales, Requests, and Inventory. Each table includes fields with specific data types and descriptions, detailing information such as book identifiers, sale transactions, out-of-stock requests, and inventory records. Additionally, a Threshold Alert Table is included to monitor low-stock books and trigger alerts based on predefined thresholds.

Uploaded by

sai713194
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Book Table

Field Name Data Type Description

BookID INT (Primary Key) Unique identifier for each book.

Title VARCHAR(100) Title of the book.

Author VARCHAR(100) Author of the book.

Publisher VARCHAR(100) Publisher of the book.

ISBN VARCHAR(20) Unique book identifier.

Price DECIMAL(8,2) Price of the book.

Stock INT Number of available copies.

Shelf location of the book in the


RackNumber VARCHAR(10)
shop.

Sales Table
SaleID INT (Primary Key) Unique identifier for each sale transaction.

UserID INT Customer who made the purchase.

BookID INT Book being purchased.

SaleDate DATETIME Date and time of the sale.

Quantity INT Number of copies sold.

TotalAmount DECIMAL(10,2) Total price of the sale.

Requests Table (For Out-of-Stock Books)


Field Name Data Type Description

RequestID INT (Primary Key) Unique request identifier.


Field Name Data Type Description

UserID INT Customer making the request.

BookTitle VARCHAR(100) Name of the requested book.

Author VARCHAR(100) Author of the requested book.

RequestDate DATETIME Date when the request was made.

Status ENUM (‘Pending’, ‘Processed’) Request status.

Inventory Table
Field Name Data Type Description

InventoryID INT (Primary Key) Unique identifier for inventory records.

BookID INT Book linked to inventory.

StockAdded INT Number of books added to inventory.

SupplierName VARCHAR(100) Name of the supplier.

ProcurementDate DATETIME Date when the stock was added.

Threshold Alert Table (To check low-stock books)


Field Name Data Type Description

AlertID INT (Primary Key) Unique identifier for threshold alert.

BookID INT Book running low on stock.

CurrentStock INT Current number of books in stock.

ThresholdValue INT Minimum stock level before alert is triggered.

AlertDate DATETIME Date when the alert was triggered.

You might also like