How salonig405-hub/sentineldb works
SentinelDB is a command-line database: users enter commands in its console, which tokenizes and parses them before execution and displays results. Its query language covers database and table management, record insert/fetch/update/delete/count, and memory/flush operations. The storage engine coordinates catalog metadata, record serialization, pages, and disk-backed memory management. The source excerpts establish the console and storage interactions; executor-to-storage links are shown as unverified because the executor implementation excerpt was not provided.
Main entry points: main.cpp CLI loop · storage_engine.cpp Storage engine · executor.cpp Execution engine · memory_manager.cpp Memory manager
Components 16
Command interface
- CLI loop
SentinelDB-main/src/main.cpp - Console
SentinelDB-main/src/terminal/console.cpp - Table printer
SentinelDB-main/src/terminal/table_printer.cpp
Query processing
- Lexer
SentinelDB-main/src/query/lexer.cpp - Parser
SentinelDB-main/src/query/parser.cpp - Statement AST
SentinelDB-main/include/query/ast.hpp - Execution engine
SentinelDB-main/src/query/executor.cpp
Database storage
- Storage engine
SentinelDB-main/src/storage/storage_engine.cpp - Catalog manager
SentinelDB-main/src/catalog/catalog_manager.cpp - Table schemas
SentinelDB-main/src/catalog/schema.cpp - Record codec
SentinelDB-main/src/storage/record.cpp - Data pages
SentinelDB-main/src/storage/page.cpp - Disk manager
SentinelDB-main/src/storage/disk_manager.cpp
Memory management
- Memory manager
SentinelDB-main/src/memory/memory_manager.cpp - Fault handler
SentinelDB-main/src/memory/veh_handler.cpp
Other components
- User
Connections 20
- User → CLI loop: enters commands
SentinelDB-main/src/main.cpp - CLI loop → Console: reads input
SentinelDB-main/src/main.cpp - CLI loop → Lexer: tokenizes
SentinelDB-main/src/main.cpp - Lexer → Parser: provides tokens
- CLI loop → Parser: parses tokens
SentinelDB-main/src/main.cpp - Parser → Statement AST: builds statements
- CLI loop → Execution engine: executes statement
SentinelDB-main/src/main.cpp - Execution engine → Storage engine: dispatches operations
- Execution engine → Catalog manager: uses metadata
- Execution engine → Table printer: returns rows
- CLI loop → Table printer: prints results
SentinelDB-main/src/main.cpp - CLI loop → Console: reports results
SentinelDB-main/src/main.cpp - Storage engine → Catalog manager: updates metadata
SentinelDB-main/src/storage/storage_engine.cpp - Storage engine → Memory manager: accesses pages
SentinelDB-main/src/storage/storage_engine.cpp - Storage engine → Disk manager: allocates pages
SentinelDB-main/src/storage/storage_engine.cpp - Storage engine → Record codec: serializes records
SentinelDB-main/src/storage/storage_engine.cpp - Storage engine → Data pages: reads and modifies
SentinelDB-main/src/storage/storage_engine.cpp - Catalog manager → Table schemas: manages schemas
- Memory manager → Disk manager: loads and flushes
SentinelDB-main/src/memory/memory_manager.cpp - Memory manager → Fault handler: registers handler
SentinelDB-main/src/memory/memory_manager.cpp