本项目斩获华南理工大学计算科学与工程学院的全英班数据库大作业第三名的好成绩! Welcome to the University Course Registration and Grade Management System! This project is a comprehensive database application developed as a university-level assignment. It simulates a real-world system for managing students, instructors, courses, enrollments, and grades.
Built with Python, Flask, and SQLite, this project serves as a practical example of database design principles, web application development, and implementing business logic in a multi-user environment.
This system is designed with three distinct user roles, each with its own set of capabilities:
- Dashboard: View current courses, schedule, and academic history.
- Course Registration: Browse available courses, enroll in sections, and drop courses.
- Prerequisite & Conflict Checks: The system automatically validates prerequisites, time conflicts, and course capacity during enrollment.
- Academic Records: View and export a full academic transcript with an automatically calculated GPA.
- Degree Plan: Check graduation requirements for a specific major.
- Dashboard: View a list of assigned courses for current and past semesters.
- Class Roster: Access the list of students enrolled in each section.
- Grade Management: Enter and update final grades for students.
- Course Statistics: View statistics for each course, including pass rates and GPA distribution.
- Dashboard: Get a high-level overview of the system (total students, courses, pending approvals, etc.).
- User Management: Approve new user registrations (students and instructors).
- CRUD Operations: Full control to Create, Read, Update, and Delete records for:
- Students
- Instructors
- Courses & Prerequisites
- Course Sections
- Request Approvals: Manage and approve student applications for retaking courses.
- Backend: Python 3
- Web Framework: Flask
- Database: SQLite 3
- Frontend: HTML5, CSS3 (with Bootstrap for styling)
- Templating Engine: Jinja2
Follow these steps to get a local copy of the project up and running.
- Python 3.8+
- pip (Python's package installer)
-
Clone the repository:
git clone https://github.com/hhhJB/DataBasePeoject.git cd DataBasePeoject -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python main.py
The application will start, and it will automatically create the
university.dbdatabase file and populate it with test data on the first run. -
Access the application:
python app.py
Open your web browser and navigate to
http://127.0.0.1:5000.
You can use these pre-populated accounts to test the system:
| Role | Username | Password |
|---|---|---|
| Admin | admin |
admin123 |
| Student | zhangsan |
pw123 |
| Instructor | profzhao |
pw789 |
The database is designed to be relational and robust, enforcing data integrity through primary keys, foreign keys, and constraints.
Here is a high-level overview of the main tables:
students: Stores student personal information.instructors: Stores instructor information.courses: Contains course details like name, credits, and type.sections: Represents specific offerings of a course in a semester, taught by an instructor.enrollments: A junction table that links students to sections, storing grades and status.prerequisites: Defines the prerequisite relationships between courses.users: Manages authentication and authorization with distinct roles.
For the detailed schema, please refer to the schema.sql file.
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy exploring the system!