A HIGLY specific database for travel data (flights, reservations, users, aircrafts, airports, passengers), written in C with GLib and ncurses with great performance to a non practical and not so logical extent. Built for Laboratórios de Informática III (2nd year, Software Engineering — Universidade do Minho).
| Dependency | Notes |
|---|---|
| GCC | compiled mainly in C99 but who cares |
| GNU Make | Standard build toolchain |
| GLib 2.x | Data structures and utilities |
| ncursesw | terminal UI |
From trabalho-pratico/:
makeThis produces three binaries from the same sources:
| Binary | Purpose |
|---|---|
programa-principal |
Batch query executor |
programa-interativo |
Interactive ncurses TUI |
programa-testes |
Automated regression tester |
Reads queries from an input file and writes results to resultados/:
./programa-principal <dataset_path> <input_path>./programa-principal dataset-fase-2/sem_erros inputs_fase2.txt
./programa-principal dataset-fase-1/sem_erros inputs_fase1.txt./programa-interativoLaunches a terminal interface for selecting datasets and running queries interactively.
Runs all queries and diffs results against the expected outputs:
./programa-testes <dataset_path> <input_path> <expected_outputs_dir>./programa-testes dataset-fase-2/sem_erros inputs_fase2.txt resultados-esperadosmake clean # Remove build directory and binaries
make clean-resultados # Remove generated query outputs in resultados/
make clean-resultadosesperados # ⚠ Remove expected outputs — this deletes the regression ground truthtrabalho-pratico/
├── src/
│ ├── main.c
│ ├── program.c
│ ├── controller/ # Query dispatch and execution
│ ├── model/ # Entities: aircraft, airport, flight, passenger, reservation
│ ├── parser/ # Per-entity CSV parsers (threaded)
│ ├── validator/ # Per-entity validation logic
│ ├── view/
│ │ ├── batch.c # Batch output formatting
│ │ ├── csv_errors.c
│ │ └── interactive/ # ncurses TUI (menus, components, terminal)
│ ├── tests/ # Regression test runner logic
│ └── util/ # Shared utilities (date, radix sort, string pool, chunked array)
├── include/ # Public headers mirroring src/ structure
├── assets/ # ASCII art for TUI (logo, about screen)
├── dataset-fase-1/ # Phase 1 dataset (sem_erros/, com_erros/) [gitignored]
├── dataset-fase-2/ # Phase 2 dataset (sem_erros/, com_erros/) [gitignored]
├── resultados/ # Generated batch outputs [gitignored]
├── resultados-esperados/ # Expected outputs for regression (1/, 2/) [gitignored]
├── inputs_fase1.txt # Sample queries — Phase 1 [gitignored]
├── inputs_fase2.txt # Sample queries — Phase 2 [gitignored]
├── inputs_prof.txt # Professor query set [gitignored]
├── relatorio-fase1.pdf # Phase 1 report (Portuguese)
├── relatorio-fase2.pdf # Phase 2 report (Portuguese)
├── enunciado.pdf # Project statement (Portuguese)
├── Doxyfile # Doxygen config
└── Makefile
Note: Gitignored items (datasets, inputs, outputs) are excluded to keep the repository slim. Obtain datasets separately and place them at the paths above before running
Generate HTML API docs with Doxygen:
doxygen DoxyfileOutput is written to docs/html/. Open index.html in a browser.
relatorio-fase1.pdf— Phase 1 design and implementation reportrelatorio-fase2.pdf— Phase 2 design and implementation reportenunciado.pdf— Original project statement and requirements
- Ana Beatriz Rodrigues - A110627
- Guilherme Ferreira - A111042
- Gonçalo Pombal - A110681