This project contains a MySQL / MariaDB database for managing a library system.
It was exported from phpMyAdmin (v5.2.1) and includes complete SQL scripts to create and populate the database with sample data.
The database is named library_management and includes several tables that store information about:
- Authors β details about book authors
- Books β information about available books
- Borrowings β records of borrowed books
- Additional tables (
authors2,authors3,books2,borrowings2) β for testing or practice purposes
| Table | Description |
|---|---|
authors |
Stores author details such as last name, first name, and nationality |
books |
Contains book titles, publication years, genres, and author references |
borrowings |
Tracks which user borrowed which book and the borrow/return dates |
authors2, authors3, books2, borrowings2 |
Empty duplicates for testing |
- Each book is linked to one author β (
books.author_idβauthors.author_id) - Each borrowing record is linked to one book β (
borrowings.book_idβbooks.book_id)
| author_id | last_name | first_name | nationality |
|---|---|---|---|
| 1 | Hugo | Victor | French |
| 2 | Camus | Albert | French |
| 3 | Tolkien | J.R.R. | British |
| book_id | title | publication_year | genre | author_id |
|---|---|---|---|---|
| 1 | Les MisΓ©rables | 1862 | Novel | 1 |
| 2 | The Myth of Sisyphus | 1942 | Philosophy | 2 |
| 3 | The Lord of the Rings | 1954 | Fantasy | 3 |
| 4 | The Stranger | 1942 | Novel | 2 |
- Open phpMyAdmin
- Create a new database named
library_management - Go to the Import tab
- Select the file
library_management.sql - Click Execute (or Go)
The tables and sample data will be created automatically.
- Learning SQL database design
- Practicing foreign keys and table relationships
- Building a Library Management System using PHP, Python, or Java
- Testing joins, inserts, and queries
- MySQL / MariaDB
- phpMyAdmin
- SQL
βοΈ Created by chadalarabi69-ai