// Authors
db.authors.insertMany([
{ authorId: "A001", firstName: "Jane", lastName: "Austen" },
{ authorId: "A002", firstName: "George", lastName: "Orwell" }
])
// Books (includes books after 2026)
db.books.insertMany([
{ ISBN: "9780141439518", title: "Pride and Prejudice", publicationYear: 1813, authorIds: ["A001"], availableOnline: true, inStore: true, stock: 5, price: 9.99 },
{ ISBN: "9780000000001", title: "Future Tech Trends", publicationYear: 2027, authorIds: ["A002"], availableOnline: true, inStore: true, stock: 10, price: 20.00 }
])
// Members
db.members.insertMany([
{ memberId: "M001", firstName: "Alice", lastName: "Brown", email: "alice@example.com", phone: "0123456789", createdAt: new Date() },
{ memberId: "M002", firstName: "Bob", lastName: "Smith", email: "bob@example.com", phone: "0987654321", createdAt: new Date() }
])
// BorrowedBooks
db.borrowedBooks.insertMany([
{ borrowId: "B001", memberId: "M001", ISBN: "9780141439518", dateBorrowed: ISODate("2026-01-10T00:00:00Z"), dueDate: ISODate("2026-02-10T00:00:00Z"), returnDate: ISODate("2026-02-12T00:00:00Z"), fineAmount: 20, status: "returned" },
{ borrowId: "B002", memberId: "M002", ISBN: "9780000000001", dateBorrowed: ISODate("2026-12-01T00:00:00Z"), dueDate: ISODate("2027-01-01T00:00:00Z"), returnDate: null, fineAmount: 50, status: "overdue" }
])
// BookAuthors (bridge)
db.bookAuthors.insertMany([
{ ISBN: "9780141439518", authorId: "A001" },
{ ISBN: "9780000000001", authorId: "A002" }
])
To embed this project on your website, copy the following code and paste it into your website's HTML: