How samrinjenesh-svg/cli-based-database works
A small interactive C++ record manager: it loads records at startup, accepts menu commands to add, search, modify, delete, or display them, and saves changes to Data.txt. The single source file contains the menu, record operations, in-memory table, and file persistence. Relationships below follow calls visible in main.cpp; the README is empty.
Main entry points: main.cpp Menu loop
Components 13
Console interaction
- Menu loop
main.cpp
Record management
- Record model
main.cpp - In-memory table
main.cpp - Initialize records
main.cpp - Add record
main.cpp - Search records
main.cpp - Modify record
main.cpp - Delete record
main.cpp - Display records
main.cpp - Sort by ID
main.cpp
File persistence
- Load and save
main.cpp - Data.txt
Other components
- User
Connections 25
- User → Menu loop: enters commands
main.cpp - Menu loop → Initialize records: initializes
main.cpp - Menu loop → Add record: dispatches
main.cpp - Menu loop → Search records: dispatches
main.cpp - Menu loop → Modify record: dispatches
main.cpp - Menu loop → Delete record: dispatches
main.cpp - Menu loop → Display records: dispatches
main.cpp - Menu loop → Load and save: saves through
main.cpp - Initialize records → Load and save: loads from
main.cpp - Add record → In-memory table: updates
main.cpp - Add record → Sort by ID: sorts via
main.cpp - Search records → In-memory table: searches
main.cpp - Modify record → Search records: finds target
main.cpp - Modify record → In-memory table: updates
main.cpp - Modify record → Sort by ID: sorts via
main.cpp - Delete record → Search records: finds target
main.cpp - Delete record → In-memory table: erases from
main.cpp - Delete record → Sort by ID: sorts via
main.cpp - Display records → In-memory table: reads
main.cpp - Load and save → In-memory table: reads and writes
main.cpp - Load and save → Data.txt: reads and writes
main.cpp - Initialize records → In-memory table: populates
main.cpp - Initialize records → Sort by ID: sorts via
main.cpp - Sort by ID → In-memory table: orders
main.cpp - In-memory table → Record model: stores
main.cpp