This is a Python-based application that provides a Graphical User Interface (GUI) for managing a Microsoft Access database containing student records. The app allows users to perform CRUD (Create, Read, Update, Delete) operations on the database.
-
Database Connection
- The application connects to a local Microsoft Access database.
- Once connected, it fetches and displays all records from the
Studentitable, ordered by Student ID.
-
Add New Student
- Users can add new student records by entering:
- Student ID: Automatically assigned based on the highest existing ID.
- First Name
- Last Name
- Address: Must start with "Str.".
- Postal Code: Must be exactly 6 digits.
- Phone Number: Must be exactly 10 digits.
- The app validates the input and inserts the data into the database if valid.
- Users can add new student records by entering:
-
Delete Student
- Users can delete a student by entering the Student ID.
- The app ensures that the ID exists in the database before deleting the record.
-
Update Student Information
- Users can update student records, including:
- First Name
- Last Name
- Address
- Postal Code
- Phone Number
- The app checks if the ID exists and ensures the data is valid before updating the record.
- Users can update student records, including:
-
View Student Records
- All student records are displayed in a table with columns for:
- Student ID
- First Name
- Last Name
- Address
- Postal Code
- Phone Number
- The table automatically updates when records are added, updated, or deleted.
- All student records are displayed in a table with columns for:
-
Reset Form
- After performing any operations, the input fields are cleared, allowing the user to add a new student or perform another operation.
- Tkinter: For creating the graphical user interface (GUI).
- PyODBC: For connecting to and interacting with the Microsoft Access database.
- Microsoft Access Database: The backend database used to store student records.
-
Clone the repository:
git clone https://github.com/yourusername/student-database-management.git cd student-database-management -
Install required dependencies: -Ensure that you have Python 3.x installed on your system. You can install the required dependencies using pip:
pip install pyodbc
-
Database Configuration:
- The database file (
Studenti.accdb) should be available at a specific location. By default, the code assumes the database is located at:
C:\Users\win\OneDrive\Desktop\python\Studenti.accdb - The database file (
-
Run the application:
- After setting up the database, you can run the application with the following command:
python app.py
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License is a permissive free software license, meaning you can freely use, modify, and distribute this code, as long as you include the original license notice in all copies or substantial portions of the software.
- You can use the software for personal or commercial purposes.
- You can modify the software as needed.
- The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.
