Exercise 1: Creating a Database and Table
Write a Python script to create a SQLite database named "mydatabase.db" and a table named "employees" with columns for "id" (integer), "name" (text), and "salary" (real).
Exercise 2: Inserting Data
Write a Python script to insert multiple rows of data into the "employees" table. Prompt the user to input employee details such as name and salary, and insert them into the table.
Exercise 3: Querying Data
Write Python functions to perform the following queries on the "employees" table:
- Retrieve all employees' details.
- Retrieve the details of an employee by their ID.
- Retrieve employees with a salary greater than a specified amount.
Exercise 4: Updating Data
Write a Python script to update the salary of an employee specified by their ID. Prompt the user to input the employee ID and the new salary, and update the corresponding record in the database.
Exercise 5: Deleting Data
Write a Python script to delete an employee record from the "employees" table based on their ID. Prompt the user to input the employee ID to be deleted.