Master database operations with a practical DBMS lab featuring interactive queries and real-world scenarios
Track your learning journey
A simple 3-table structure for managing books, members, and issued books
Stores information about all books in the library
| Column | Type | Constraints |
|---|---|---|
| BookID | INT | PRIMARY KEY AUTO_INCREMENT |
| Title | VARCHAR(100) | NOT NULL |
| Author | VARCHAR(100) | - |
| Publisher | VARCHAR(100) | - |
| YearPublished | INT | - |
| TotalCopies | INT | - |
| AvailableCopies | INT | - |
Enter access code to view this query
Stores information about library members
| Column | Type | Constraints |
|---|---|---|
| MemberID | INT | PRIMARY KEY AUTO_INCREMENT |
| Name | VARCHAR(100) | NOT NULL |
| VARCHAR(100) | UNIQUE | |
| JoinDate | DATE | - |
Enter access code to view this query
Tracks which books are issued to which members
| Column | Type | Constraints |
|---|---|---|
| IssueID | INT | PRIMARY KEY AUTO_INCREMENT |
| BookID | INT | FOREIGN KEY → Books(BookID) |
| MemberID | INT | FOREIGN KEY → Members(MemberID) |
| IssueDate | DATE | - |
| ReturnDate | DATE | - |
| ActualReturnDate | DATE | - |
Enter access code to view this query