You are on page 1of 3

1. Create a database called Library Management System in MongoDB.

2. Write a command to create a library collection.

3. Write a command to insert three book documents into the library collection. (e.g.- title, year,
author, availability, isbn and genre)

4. Write a command to retrieve all books published in a specific year.

5. Write a command to retrieve all books written by a specific author.

6. Write a command to retrieve the book with a specific ISBN number.


7. Write a command to retrieve all books available in the library.

8. Write a command to update the availability of a book with a specific ISBN number to false.

9. Write a command to add a new book to the library collection.

10. Write a command to delete a book from the library collection based on its ISBN number.

11. Write a command to retrieve the total count of books in the library collection.
12. Write a command to retrieve all books published between a specific range of years, sorted by
publication year in descending order.

13. Write a command to retrieve the count of books available in each genre.

You might also like