This Python application allows users to perform basic CRUD operations on a PostgreSQL database of student records using a command-line interface.
- Retrieve and display all student records.
- Add a new student record.
- Update a student's email address.
- Delete a student record.
- Python 3.x
- psycopg2 library
- Once you've cloned the repository, navigate to the project directory:
cd 3005a3
- Install
psycopg2
.pip install psycopg2
- Set up your PostgreSQL database and create the
students
table using the provided schema inschema.sql
. - Open
main.py
and replace the placeholder values with your actual connection details for the database. - Run the application
python main.py