TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25253 13
I built a SQL-like relational database engine in C++ from scratch

Hey r/cpp,

I’ve been learning systems programming and database internals, so I started building **Ark** — a SQL-like relational database engine written entirely from scratch in C++.

Current features include:

* Handwritten tokenizer ( lexer )
* Recursive descent parser
* CRUD operations
* INNER / LEFT / RIGHT / FULL joins
* Aggregate functions
* `ALTER TABLE` support
* File persistence
* Custom diagnostics system

Everything is implemented manually:

* no parser generators
* no embedded SQL engines
* no external dependencies

One of the most challenging parts so far has been handling joins, schema evolution, and persistence consistency cleanly.

GitHub:
[https://github.com/kashyap-devansh/Ark](https://github.com/kashyap-devansh/Ark)

I’d especially appreciate feedback around architecture, parser design, query execution, or persistence design.

https://redd.it/1tkrhxq
@r_cpp
GitHub GitHub - kashyap-devansh/Ark: A lightweight SQL-like database engine written from scratch in C++, featuring a hand-written tokenizer… A lightweight SQL-like database engine written from scratch in C++, featuring a hand-written tokenizer, recursive descent parser, typed tables, full CRUD operations, and file persistence — with no ...
More from @r_cpp
  1. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  2. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
  3. Sep 25, 2026myStringStream.str("") Considered Harmful Under C++20 I was recently looking at some (rath…
  4. Sep 20, 2026A clever branch free optimization I'm the developer of memlz which is an extremely fast co…
  5. Sep 15, 2026Inside Boost.PolyCollection https://bannalia.blogspot.com/2026/09/inside-boostpolycollecti…
  6. Sep 11, 2026C++26: Standard Library Hardening Experiments https://www.cppstories.com/2026/hardening-ex…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →