This is a Python program that uses SQLite to create a simple ebookstore database and provides a menu-based interface for adding, updating, deleting, and searching books in the database.
Python 3 SQLite
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run the following command to create the database: sqlite3 ebookstore.db < schema.sql.
- Run the program with python bookstore.py.
When you run the program, you will be presented with a menu of options: **** WELCOME TO THE BOOKSHOP ****
Select an option:
- Enter book
- Update book
- Delete book
- Search books
- Exit Enter your choice:
To add a book, select option 1 from the main menu and enter the book details as prompted.
To update a book, select option 2 from the main menu and enter the book ID and the new details for the book.
To delete a book, select option 3 from the main menu and enter the book ID of the book you want to delete.
To search for books, select option 4 from the main menu and enter a keyword to search for. The program will return all books whose title or author contains the keyword.
To exit the program, select option 0 from the main menu. The program will save any changes made to the database and close the database connection.