3 ms·
Ask HN: Writing my own Relational Database
I’d like to learn more about relational databases and was wondering if there are any Norvig-style tutorials or textbooks that guide you through a naive implementation.
Do you have any pointers? How would you go about it?
- gjvc 9y agoTry reading the SQLite source and tests. The postgres source is also surprisingly accessible.
- andreasgonewild 9y agoIf you really mean relational, and not SQL; then all you need is columns, tables and records. Just do it, once you have a stupid implementation of your ideas running you'll know what information to look for. I've been cooking my own relational persistence engines for quite a while now, here is the latest incarnation if anyone is interested in seeing the idea cut down to its core with optional encryption on top: https://github.com/andreas-gone-wild/snackis/tree/master/src/snackis/db https://github.com/andreas-gone-wild/snackis/tree/master/src...
- segmondy 9y agohttps://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf https://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf https://www.amazon.com/Relational-Model-Database-Management-Version/dp/0201141922 https://www.amazon.com/Relational-Model-Database-Management-...
- jwilliams 9y agoThis is a really great idea. I wrote my own (very domain-specific database) 7-8 years ago and it was a really fulfilling project. Good luck with it. If you do find anything or start your own, please report back.
- brett40324 9y agoIf this is a serious undertaking, you should read 'the red book' http://www.redbook.io http://www.redbook.io