|
| 1 | +-- Insert Users |
| 2 | +INSERT INTO Users (username, email, password) VALUES |
| 3 | + ('johndoe', 'john@example.com', 'password123'), |
| 4 | + ('janedoe', 'jane@example.com', 'password456'); |
| 5 | + |
| 6 | +-- Insert Books |
| 7 | +INSERT INTO Books (title, author, isbn, published_date, genre) VALUES |
| 8 | + ('The Great Gatsby', 'F. Scott Fitzgerald', '9780743273565', '1925-04-10', 'Classic'), |
| 9 | + ('To Kill a Mockingbird', 'Harper Lee', '9780061120084', '1960-07-11', 'Classic'), |
| 10 | + ('1984', 'George Orwell', '9780451524935', '1949-06-08', 'Dystopian'); |
| 11 | + |
| 12 | +-- Insert Book Instances |
| 13 | +INSERT INTO BookInstances (book_id, status, due_date) VALUES |
| 14 | + (1, 'available', NULL), |
| 15 | + (1, 'checked_out', '2024-07-15'), |
| 16 | + (2, 'available', NULL), |
| 17 | + (3, 'reserved', '2024-07-20'), |
| 18 | + (3, 'available', NULL); |
| 19 | + |
| 20 | +-- Insert Checkouts |
| 21 | +INSERT INTO Checkouts (user_id, instance_id, checkout_date, return_date) VALUES |
| 22 | + (1, 2, '2024-07-01 10:00:00', NULL), -- John Doe checks out a copy of "The Great Gatsby" |
| 23 | + (2, 4, '2024-07-02 11:00:00', NULL); -- Jane Doe reserves a copy of "1984" |
0 commit comments