Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Library Management System

A command-line application for managing a library's books, customers, and borrowings, backed by a local SQLite database.


Features

  • Book Management — add, search, edit, and delete books; track availability
  • Customer Management — register and manage library members
  • Borrowing Management — assign books to customers and record returns
  • Persistent Storage — all data stored in a local library.db SQLite database

Getting Started

Prerequisites

  • macOS (arm64) — the binary is compiled for Apple Silicon
  • No additional runtime dependencies required

Running the Application

./library_management

Usage

The application uses an interactive text menu. Navigate by entering the number of the option you want.

Main Menu

Library Management System
1. Book Management
2. Customer Management
3. Borrowing Management
4. Exit

Book Management

Option Description
1 Add a new book (title, author, ISBN)
2 Get a book by ID
3 List all books
4 List all available (not borrowed) books
5 List all currently borrowed books
6 Edit a book
7 Delete a book
Book Management

1. Add new book
2. Get book by id
3. Get all books
4. Get all available books
5. Get all borrowed books
6. Edit book
7. Delete book
8. Exit

Customer Management

Option Description
1 Add a new customer (name, email, phone)
2 Get a customer by ID
3 List all customers
4 Edit a customer
5 Delete a customer
Customer Management

1. Add new customer
2. Get customer by id
3. Get all customers
4. Edit customer
5. Delete customer
6. Exit

Borrowing Management

Option Description
1 List all borrowing records
2 Assign a book to a customer
3 Return a book
Borrowing Management

1. Get all borrowings
2. Assign book
3. Return book
4. Exit

Database Schema

The application uses SQLite and creates a library.db file on first run.

books

Column Type Description
id INTEGER Primary key
title TEXT Book title
author TEXT Book author
isbn TEXT ISBN number

customers

Column Type Description
id INTEGER Primary key
name TEXT Customer name
email TEXT Email address
phone TEXT Phone number

borrowings

Column Type Description
id INTEGER Primary key
book_id INTEGER Foreign key → books
customer_id INTEGER Foreign key → customers
borrow_date TEXT Date the book was borrowed
return_date TEXT Date returned (null if still out)

Entity Relationship Diagram

erd


Project Structure

library_management/
├── library_management      # Compiled binary (arm64 macOS)
├── library.db              # SQLite database (auto-created on first run)
└── README.md

Notes

  • A customer cannot return a book that belongs to another customer's borrowing record.
  • A book must be available (not currently borrowed) before it can be assigned.
  • The database file library.db is created automatically in the working directory on first run.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages