Student Database Management System (C++) π Project Description
This is a simple student database management system written in C++. The project uses a text file (student_data.txt) to store student records.
This project was built to understand:
File handling in C++
Fixed-length record storage
Random file access using seekg() and seekp()
Basic database operations without external libraries
The system currently stores student name and age only.
π Technologies Used
C++
Standard Library (fstream, iostream, iomanip, cstring)
Text File Storage
π Project Structure Student_Database/ β βββ main.cpp β Main source file βββ student_data.txt β Database file (auto-created if not present) βββ README.md
βοΈ Requirements
C++ Compiler (g++)
Windows / Linux / macOS
Recommended terminal (Windows):
Run the following command inside the project directory:
g++ Student_manager.cpp -o student_db.exe
After successful compilation:
./student_db.exe
The program will display a menu with options to:
-
Add a student
-
View all students
-
Search a student
-
Update a student
-
Delete a student
-
Clear the database
π Data Storage Format
Each record is stored using a fixed-length format:
Field Size Name 10 bytes Space 1 byte Age 2 bytes Newline: 2 bytes for windows(/r/n), 1 bytes for linux & mac os(/n)
Total size per record/Line: 15 bytes or 14 bytes
This structure allows direct modification of specific records using file pointer repositioning.
Maximum name length is 10 characters.
Age is limited to 2 digits.
Data is stored in plain text format.
Improper input may cause formatting issues.
The file must not be manually edited to maintain structure consistency.
π― Project Level
This project is suitable for:
Beginner to Intermediate C++ learners
Students learning file handling
Anyone practicing low-level file database logic
π Future Improvements
Add unique student ID
Input validation improvements
Dynamic record length
Sorting functionality
Binary file implementation
Simple GUI version
π¨βπ» Author
Created as a learning project to practice file handling and database logic in C++.