How yashk2003/blockdb works
SimpleRA is an interactive relational-algebra engine for tables and matrices, designed around block-based storage and memory-conscious query processing. Its main workflow reads a command, parses and semantically validates it, then dispatches execution that reads relations and produces results. The graph also preserves documented matrix operations, relational operators, external sorting/grouping, and indexed mutations. Evidence is strongest for the command loop, SEARCH, DELETE, GROUP BY, and storage helpers; several executor implementations are unsampled, so their documented relationships are attributed to the README rather than inferred from names.
Main entry points: server.cpp Interactive server · search.cpp Search execution · bufferManager.cpp Page buffer · table.cpp Table relations
Components 23
Command Processing
- Interactive server
src/server.cpp - Syntax parser
src/syntacticParser.cpp - Semantic parser
src/semanticParser.cpp - Command dispatcher
src/executor.cpp - Parsed query state
src/syntacticParser.h
Relational Operators
- Relational operators
src/executors - Grouping and aggregates
src/executors/groupby.cpp - Join processing
src/executors/join.cpp - Sort and ordering
src/executors/sort.cpp - Order by
src/executors/orderby.cpp - Matrix commands
src/executors/rotate.cpp
Indexed Operations
- Search execution
src/executors/search.cpp - B+ tree index
src/BPTree.cpp - Index range search
src/BPTree_search.cpp - Index removal
src/BPTree_remove.cpp - Insert update delete
src/executors/delete.cpp
Storage and Matrices
- Table catalogue
src/tableCatalogue.cpp - Table relations
src/table.cpp - Row cursor
src/cursor.cpp - Page buffer
src/bufferManager.cpp - Disk pages
src/page.cpp - Matrix operations
src/matrix.cpp
Other components
- Command user
Connections 21
- Command user → Interactive server: enters commands
src/server.cpp - Interactive server → Syntax parser: parses commands
src/server.cpp - Interactive server → Semantic parser: validates commands
src/server.cpp - Interactive server → Command dispatcher: dispatches valid commands
src/server.cpp - Syntax parser → Parsed query state: sets query fields
src/syntacticParser.cpp - Syntax parser → Relational operators: routes operator syntax
src/syntacticParser.cpp - Search execution → B+ tree index: builds missing index
src/executors/search.cpp - Search execution → Index range search: runs index search
src/executors/search.cpp - Index range search → Search execution: writes matching row locations
src/BPTree_search.cpp - Search execution → Page buffer: reads matched pages
src/executors/search.cpp - Insert update delete → Index range search: finds affected rows
src/executors/delete.cpp - Insert update delete → Index removal: removes index keys
src/executors/delete.cpp - Insert update delete → Page buffer: updates table pages
src/executors/delete.cpp - Page buffer → Disk pages: loads and writes
src/bufferManager.cpp - Grouping and aggregates → Table relations: sorts and writes results
src/executors/groupby.cpp - Join processing → Table relations: reads relations and creates result
src/executors/join.cpp - Sort and ordering → Table relations: sorts relations
- Order by → Sort and ordering: produces ordered tables
- Matrix commands → Matrix operations: performs matrix operations
- Matrix operations → Page buffer: uses block cache
- Table catalogue → Table relations: tracks relations