A command-line application built with Python and SQLite
| Name | Role |
|---|---|
| Nak | Database Architect & Admin Module |
| Dara | User Module & Testing |
Course: Computer Science Survey
University: American University of Phnom Penh (AUPP)
Year: 2026
This is a Course Final Project submitted by 2 students from the American University of Phnom Penh (AUPP).
The Student Management System is a terminal-based application that allows an admin to manage students, attendance, and assignments, while students (users) can view their own profile, attendance, and assignments after logging in.
All data is stored locally in an SQLite database — no internet or external server required.
Student_management__CSSurvey_project/
│
├── main.py ← Run this file to start the program
├── db.py ← Database connection + table setup
├── auth.py ← Login system for admin and user
├── seed.py ← Run once to load sample data
│
├── admin/
│ ├── __init__.py ← Marks folder as a Python package
│ ├── student_crud.py ← Add, Delete, Search, List students
│ ├── attendance.py ← Add and view all attendance
│ └── assignment.py ← Add and view all assignments
│
├── user/
│ ├── __init__.py ← Marks folder as a Python package
│ ├── profile.py ← View and update own profile
│ ├── attendance.py ← View own attendance
│ └── assignment.py ← View own assignments
│
└── data/
└── student_management.db ← SQLite database (auto-created)
| Table | Description |
|---|---|
accounts |
Stores login credentials (username, password, role) |
students |
Stores student info (name, major, age, email) |
attendance |
Stores attendance records (date, Present/Absent) |
assignments |
Stores assignments (subject, title, score) |
| Feature | Admin | User |
|---|---|---|
| Login | ✅ | ✅ |
| Add Student | ✅ | ❌ |
| Delete Student | ✅ | ❌ |
| Search Student | ✅ | ❌ |
| List All Students | ✅ | ❌ |
| Add Attendance | ✅ | ❌ |
| View All Attendance | ✅ | ❌ |
| Add Assignment | ✅ | ❌ |
| View All Assignments | ✅ | ❌ |
| View Own Profile | ✅ | ✅ |
| Update Own Profile | ❌ | ✅ |
| View Own Attendance | ❌ | ✅ |
| View Own Assignments | ❌ | ✅ |
- Python 3.x
- No external libraries needed — uses only built-in
sqlite3module
Step 1 — Clone or download the project folder
Step 2 — Open terminal and navigate to the project folder:
cd Student_management__CSSurvey_projectStep 3 — Run seed.py once to set up the database and load sample data:
python seed.pyStep 4 — Run the program:
python main.py| Username | Password | Role |
|---|---|---|
admin |
admin123 |
Admin |
nak |
nak123 |
Student |
dara |
dara123 |
Student |
mia |
mia123 |
Student |
Note: When admin adds a new student, an account is automatically created.
Username = student's name in lowercase
Password = name + "123" (e.g.sokha/sokha123)
python main.py
│
├── [1] Admin Portal
│ Login: admin / admin123
│ ├── Add Student
│ ├── Delete Student
│ ├── Search Student
│ ├── List All Students
│ ├── Add Attendance
│ ├── View All Attendance
│ ├── Add Assignment
│ ├── View All Assignments
│ └── Logout
│
└── [2] Student Portal
Login: nak / nak123
├── View My Profile
├── Update My Profile
├── View My Attendance
├── View My Assignments
└── Logout
- Role-based access — admin cannot log into student portal and vice versa
- 3 login attempts — locked out after 3 wrong passwords
- Parameterized SQL queries — prevents SQL injection attacks
- student_id binding — users can only access their own data
Students:
| ID | Name | Major | Age | |
|---|---|---|---|---|
| 1 | Nak | Artificial Intelligence | 20 | nak@aupp.edu.kh |
| 2 | Dara | Computer Science | 21 | dara@aupp.edu.kh |
| 3 | Mia | Data Science | 19 | mia@aupp.edu.kh |