Live data from Hacker News

Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

github.com

11–20 of 82 posts

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#12
post #8

Thank you for sharing My perspective is that writing this kind of system in a language such as Python is actually a great thing because for myself Python is more widely readable and approachable compared to C++ or C which is what databases are often programmed in. If someone wants to be serious they can port it to a low level language . As it stands it's educational and useful for studying. I wrote a distributed pseu…

This is why you see a community of pure Java RDBMSs (Hypersonic, H2, Derby, etc), if you don't need the big iron scale it's easier to ship/use the database or even embed it in memory if needed.

Yes. It's an interesting area, irrespective of implementation language.

I had tried out one or two Java-based RDBMSes back in the day, via programs written in Java, for fun.

I think one was HSQLDB.

https://en.m.wikipedia.org/wiki/HSQLDB

There was also another interesting one called PointBase, which was developed by Bruce Scott, an Oracle founder, and others.

https://en.m.wikipedia.org/wiki/PointBase

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#13
Thanks to this post I learned about Lark, which looks like a really nice parser library for Python.

The JSON tutorial on their site is excellent - shows how to build a basic parser for JSON, then goes into some great detail about how to improve its performance: https://lark-parser.readthedocs.io/en/latest/json_tutorial.h...

Here's the grammar used for the RDBMS project: https://github.com/spandanb/learndb-py/blob/master/learndb/l...

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#14

Thank you for sharing My perspective is that writing this kind of system in a language such as Python is actually a great thing because for myself Python is more widely readable and approachable compared to C++ or C which is what databases are often programmed in. If someone wants to be serious they can port it to a low level language . As it stands it's educational and useful for studying. I wrote a distributed pseu…

Cool stuff. I had similar intuitions- Python allow me to focus on the high-level concepts. Albeit, there were times where I wished I had gone with a statically-typed + compiled language.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#15

Kudos, i bet that was a fun and rewarding experience. I know this was never meant to be fast, but could you produce some benchmarks for shits and giggles?

It would be a fun exercise to implement something like TPC-C for learndb and see how this done.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#17

Thank you for sharing My perspective is that writing this kind of system in a language such as Python is actually a great thing because for myself Python is more widely readable and approachable compared to C++ or C which is what databases are often programmed in. If someone wants to be serious they can port it to a low level language . As it stands it's educational and useful for studying. I wrote a distributed pseu…

I totally agree with that. I loved the ugit [1] build Git from scratch in Python series for that.

[1] https://www.leshenko.net/p/ugit/

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#19

Okay this seems like the perfect project to test out the various AI repo update solutions. Anyone want to do this for fun, you can have your own agenda, I'm just bored! https://github.com/paul-gauthier/aider https://www.mentat.codes/ https://www.gitwit.dev/ https://www.second.dev/

Why would you downvote this? Ive already turned it into a viable sqlite competitor. Shame on you.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#20
post #13

Thanks to this post I learned about Lark, which looks like a really nice parser library for Python. The JSON tutorial on their site is excellent - shows how to build a basic parser for JSON, then goes into some great detail about how to improve its performance: https://lark-parser.readthedocs.io/en/latest/json_tutorial.h... Here's the grammar used for the RDBMS project: https://github.com/spandanb/learndb-py/blob/mas…

DSL in a string? Is that 'really nice'? I haven't used or needed this in Python that I can think of, but surely we can do better than that?

Even a dict with expected keys and construction via the bitwise or operator (which would roughly match the form of a lot of the grammar) would be better wouldn't it? Imports could be imports, just mixed in somehow.

This is just first thoughts at a glance, maybe I'm missing something.

Post reply on HN