Merge pull request 'init' (#2) from init into main

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-06-20 18:40:22 +02:00
22 changed files with 91 additions and 3 deletions
+46 -3
View File
@@ -12,14 +12,51 @@ set(CMAKE_CXX_EXTENSIONS OFF) # -std=c++20 statt -std=gnu++20
# ---------------------------------------------------------------------------
# Conan-generierte Pakete einbinden (CMakeDeps-Finder liegen im build-Ordner)
# ---------------------------------------------------------------------------
# find_package(fmt REQUIRED) # Beispiel - einkommentieren wenn dep da ist
# find_package(spdlog REQUIRED) # Beispiel
# find_package(fmt REQUIRED) # einkommentieren wenn dep da ist
# find_package(spdlog REQUIRED)
# ---------------------------------------------------------------------------
# Schicht 1 - Storage Engine (C)
# Hinweis: neue .c-Dateien hier manuell eintragen (kein GLOB)
# ---------------------------------------------------------------------------
set(STORAGE_SOURCES
src/storage/page.c
src/storage/heap.c
src/storage/btree.c
src/storage/buffer_pool.c
src/storage/free_space_map.c
src/storage/arena.c
src/storage/wal.c
)
# ---------------------------------------------------------------------------
# Schicht 2 - Engine Logic (C++)
# ---------------------------------------------------------------------------
set(ENGINE_SOURCES
src/engine/query_router.cpp
src/engine/delta_merge.cpp
src/engine/mvcc.cpp
src/engine/executor.cpp
)
# ---------------------------------------------------------------------------
# Schicht 3 - SQL Frontend (C++)
# ---------------------------------------------------------------------------
set(SQL_SOURCES
src/sql/tokenizer.cpp
src/sql/parser.cpp
src/sql/ast.cpp
src/sql/planner.cpp
)
# ---------------------------------------------------------------------------
# Hauptprogramm
# ---------------------------------------------------------------------------
add_executable(pauldb
src/main.cpp
${STORAGE_SOURCES}
${ENGINE_SOURCES}
${SQL_SOURCES}
)
target_include_directories(pauldb
@@ -31,6 +68,12 @@ target_include_directories(pauldb
# target_link_libraries(pauldb PRIVATE fmt::fmt spdlog::spdlog)
# ---------------------------------------------------------------------------
# Installationsregeln (für package() in conanfile.py)
# Tests (CTest)
# ---------------------------------------------------------------------------
enable_testing()
# add_subdirectory(test) # einkommentieren sobald erste Tests da sind
# ---------------------------------------------------------------------------
# Installationsregeln (fur package() in conanfile.py)
# ---------------------------------------------------------------------------
install(TARGETS pauldb DESTINATION bin)
+17
View File
@@ -0,0 +1,17 @@
# ADR-001: HTAP via Delta-Merge (HANA-inspired)
**Status:** Accepted
## Decision
PaulDB implements HTAP through a Delta (Row-Store) + Main (Column-Store) split,
merged periodically - mirroring SAP HANA's architecture.
## Rationale
Single-store systems force a choice between OLTP and OLAP performance.
The Delta-Merge pattern allows both: fast writes land in Delta (row-optimized),
analytics scan Main (column-optimized, compressed).
## Consequences
- Every query must union Delta + Main results.
- A merge worker must run periodically.
- The C ABI boundary (storage.h) cleanly separates both stores.
View File
+1
View File
@@ -0,0 +1 @@
/* delta_merge.cpp - Engine Logic (C++) */
+1
View File
@@ -0,0 +1 @@
/* executor.cpp - Engine Logic (C++) */
+1
View File
@@ -0,0 +1 @@
/* mvcc.cpp - Engine Logic (C++) */
+1
View File
@@ -0,0 +1 @@
/* query_router.cpp - Engine Logic (C++) */
+6
View File
@@ -0,0 +1,6 @@
#include <cstdio>
int main() {
std::printf("PaulDB starting...\n");
return 0;
}
+1
View File
@@ -0,0 +1 @@
/* ast.cpp - SQL Frontend (C++) */
+1
View File
@@ -0,0 +1 @@
/* parser.cpp - SQL Frontend (C++) */
+1
View File
@@ -0,0 +1 @@
/* planner.cpp - SQL Frontend (C++) */
+1
View File
@@ -0,0 +1 @@
/* tokenizer.cpp - SQL Frontend (C++) */
+2
View File
@@ -0,0 +1,2 @@
/* arena.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* btree.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* buffer_pool.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* free_space_map.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* heap.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* page.c - Storage Engine (C) */
#include "pauldb/storage.h"
+2
View File
@@ -0,0 +1,2 @@
/* wal.c - Storage Engine (C) */
#include "pauldb/storage.h"
View File
View File
View File