spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan's comments
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
It doesn't have a notion of atomically batching multiple statements, i.e. transaction. But beyond that, it's a single file database, which can only have a single process (learndb instance) that is operating on the database (file). So you get consistency and isolation via being a single connection database. Durability, you get to the extent that the file system is durable. So it's somewhere on the ACIDity spectrum.
Re: Query planning/optimization
I haven't implemented this; but I've considered where the optimization could module sit: The parser spits out an AST. This or a derived intermediate representation could be optimized,i.e. the AST could be rewritten or nodes deleted, before the VM executes the AST.
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
T̶h̶e̶r̶e̶ ̶m̶a̶y̶ ̶b̶e̶ ̶s̶o̶m̶e̶ ̶p̶o̶s̶t̶ ̶p̶a̶r̶s̶i̶n̶g̶ ̶v̶a̶l̶i̶d̶a̶t̶i̶o̶n̶ ̶t̶h̶a̶t̶ ̶c̶a̶n̶ ̶b̶e̶ ̶d̶o̶n̶e̶ ̶h̶e̶r̶e̶-̶ ̶b̶u̶t̶ ̶t̶h̶a̶t̶ ̶w̶o̶u̶l̶d̶ ̶b̶e̶ ̶s̶o̶m̶e̶t̶h̶i̶n̶g̶ ̶t̶h̶a̶t̶'̶s̶ ̶b̶e̶y̶o̶n̶d̶ ̶t̶h̶e̶ ̶d̶o̶m̶a̶i̶n̶ ̶o̶f̶ ̶t̶h̶e̶ ̶p̶a̶r̶s̶e̶r̶.̶
Edit: I see what you mean. I surveyed a bunch a parser generator libraries, and they also seemed to use a text based DSL- rather than DSL based on python structures. What you're describing would have made the grammar development more ergonomic and simple.
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 2 years ago | on: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
spanspan | 4 years ago | on: B-Trees: More Than I Thought I'd Want to Know
spanspan | 4 years ago | on: B-Trees: More Than I Thought I'd Want to Know
I also did a write-up on why everyone should engage in similar projects: https://www.spandanbemby.com/joys-of-database.html