</>
ShikshaCSLearn. Code. Grow.
🔍
☕ Support Us
ShikshaCSâ€ēMini Projects
📚

Library Management System

DBMSIntermediate
SQLER Diagrams

💡 Overview

This project takes CRUD a step further into REAL schema design — multiple related tables, foreign keys, and the kind of many-to-many relationship (members borrowing many books over time) that shows up in almost every serious database.

✅ Features to Build

0/4 done

🧭 Step-by-Step Guide

1

Draw the ER diagram first: Books, Members, and IssuedBooks (with foreign keys to both).

2

Create the three tables with proper PRIMARY KEY and FOREIGN KEY constraints.

3

Insert sample books and members.

4

Write an INSERT into IssuedBooks whenever a book is 'issued', and a query with a JOIN to see who has which book.

5

Write an UPDATE to set a ReturnDate when a book is returned, and a query to find all currently un-returned books.

🚀 Starter Code

CREATE TABLE IssuedBooks (
  IssueID INT PRIMARY KEY,
  BookID INT,
  MemberID INT,
  IssueDate DATE,
  ReturnDate DATE,
  FOREIGN KEY (BookID) REFERENCES Books(BookID),
  FOREIGN KEY (MemberID) REFERENCES Members(MemberID)
);

💡 Pro Tip

Design the ER diagram on paper BEFORE writing any SQL — most schema design mistakes happen because people jump straight to CREATE TABLE without first sketching the relationships.

← Back to all Projects