0% found this document useful (0 votes)
11 views3 pages

Books Table

Uploaded by

crazydino41
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)
11 views3 pages

Books Table

Uploaded by

crazydino41
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/ 3

1.

Books Table

This table will store information about each book in the library.

Field Name Data Type Description

Book_ID INTEGER (Primary Key) Unique identifier for the book.

Title VARCHAR(255) Title of the book.

Author VARCHAR(255) Author of the book.

ISBN VARCHAR(13) International Standard Book Number.

Category VARCHAR(100) Category/Genre of the book.

Publisher VARCHAR(255) Publisher of the book.

Year_Published YEAR Year the book was published.

Copies_Available INTEGER Number of copies available in the library.

Copies_Borrowed INTEGER Number of copies currently borrowed.

2. Members Table

This table stores information about library members.

Field Name Data Type Description

Member_ID INTEGER (Primary Key) Unique identifier for the member.

First_Name VARCHAR(255) First name of the member.

Last_Name VARCHAR(255) Last name of the member.

Address VARCHAR(255) Address of the member.

Phone_Number VARCHAR(15) Phone number of the member.

Email VARCHAR(100) Email address of the member.

Date_Joined DATE Date the member joined the library.

3. Staff Table

This table contains the staff details for the library.

Field Name Data Type Description

Staff_ID INTEGER (Primary Key) Unique identifier for the staff member.

First_Name VARCHAR(255) First name of the staff member.

Last_Name VARCHAR(255) Last name of the staff member.

Position VARCHAR(100) Position of the staff (e.g., Librarian, Assistant).


Field Name Data Type Description

Phone_Number VARCHAR(15) Phone number of the staff member.

Email VARCHAR(100) Email address of the staff member.

4. Transactions Table

This table records book borrow/return transactions.

Field Name Data Type Description

INTEGER (Primary
Transaction_ID Unique identifier for the transaction.
Key)

Member_ID INTEGER (Foreign Key) Reference to the Member table.

Book_ID INTEGER (Foreign Key) Reference to the Books table.

Reference to the Staff table (who processed the


Staff_ID INTEGER (Foreign Key)
transaction).

Borrow_Date DATE Date the book was borrowed.

Return_Date DATE Date the book was returned.

Due_Date DATE The date by which the book should be returned.

Fine_Amount DECIMAL(5,2) Fine charged if the book is returned late.

5. Categories Table (Optional)

This table will hold the various categories/genres of books.

Field Name Data Type Description

Category_ID INTEGER (Primary Key) Unique identifier for the category.

Category_Name VARCHAR(255) Name of the category (e.g., Fiction, Science, History).

6. Book_Copies Table (Optional)

This table is useful if a single book can have multiple copies with different statuses.

Field Name Data Type Description

Copy_ID INTEGER (Primary Key) Unique identifier for the copy.

Book_ID INTEGER (Foreign Key) Reference to the Books table.

Copy_Number INTEGER Unique copy number for the book.

Status VARCHAR(50) The status of the copy (e.g., Available, Borrowed, Damaged).

Relationships Between Tables:

 Books to Transactions: One-to-many (A book can be involved in many transactions, but each
transaction involves one book).
 Members to Transactions: One-to-many (A member can borrow many books, but each
transaction is for one member).

 Staff to Transactions: One-to-many (A staff member can process many transactions).

 Books to Categories: One-to-many (A book can belong to one category, but each category
can contain many books).

LibreOffice Base Example

 Open LibreOffice Base and create a new database.

 Use the above table structures to define fields and set relationships between them.

 After defining the tables, you can enter sample data and create forms for easier data entry,
or reports for book loans, overdue books, etc.

This basic design can be extended further based on additional requirements such as adding book
reservations, tracking book damage, and integrating a search functionality.

4o mini

You might also like