Skip to content

akmalariq/Tugas-4-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Library Management System

A command-line Library Management System (LMS) built with Python and MySQL for managing books, users, and borrowing records.

✨ Features

  • 👤 User Registration - Add new library members
  • 📖 Book Registration - Add new books to inventory
  • 📤 Borrowing - Check out books with automatic return dates
  • 📥 Returns - Process book returns and update stock
  • 🔍 Search - Find books by title
  • 📋 Reports - View all users, books, and active loans

🛠️ Tech Stack

Python MySQL

🚀 Quick Start

# Install dependencies
pip install mysql-connector-python tabulate

# Run the application
python main.py

📋 Menu Options

---------- LIBRARY MANAGEMENT ----------
    1. Pendaftaran User Baru (Register User)
    2. Pendaftaran Buku Baru (Register Book)
    3. Peminjaman (Borrow Book)
    4. Tampilkan Daftar Buku (Show Books)
    5. Tampilkan Daftar User (Show Users)
    6. Tampilkan Daftar Peminjaman (Show Loans)
    7. Cari Buku (Search Books)
    8. Pengembalian (Return Book)
    9. Exit

🗃️ Database Schema

-- Users table
CREATE TABLE users (
    id_user INT AUTO_INCREMENT PRIMARY KEY,
    nama_user VARCHAR(50),
    tgl_lahir DATE,
    pekerjaan VARCHAR(100),
    alamat VARCHAR(300)
);

-- Books table  
CREATE TABLE books (
    id_buku INT AUTO_INCREMENT PRIMARY KEY,
    nama_buku VARCHAR(50),
    kategori VARCHAR(50),
    stock INT
);

-- Borrowing records
CREATE TABLE peminjaman (
    id_user INT,
    id_buku INT,
    nama_user VARCHAR(50),
    nama_buku VARCHAR(50),
    tgl_pinjam DATE,
    tgl_pengembalian DATE
);

📝 License

MIT

About

Tugas untuk penyelesaian Course Python di Pacmann AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages