views:

170

answers:

3

I'm looking at implementing an RDBMS. Are there any good resources out there about how a database works internally, and the kinds of things I'd need to know when starting out to build my own? (Please no comments about whether it's a practical idea or not - just imagine it's for a hobby project or something).

Again - interested in the RDBMS design, not the Database design. And efficiency is very important (it seems like it's reasonably easy to design some kind of relational database like structure if I don't care about speed).

+1  A: 

I'd suggest starting with Introduction to Database Systems and Transactional Information Systems. They should both have bibliographies to take you further.

Jay Kominek
Thanks - those both look like what I'm interested in - deeper knowledge of the theory..
Anthony Rizk
+1  A: 

There are a few textbooks about this sort of stuff out there, when I was in college, we did this for a class project. This book should really help you on your way Database Systems: The Complete Book

I forgot to mention it, but my code is on googlecode here: cs4420-dbase

Please forgive the fact it is written in java, but I was outvoted by my teammates on that decision. but the basic ideas are all still there. It handles file creation and handling as well as a simple SQL parser and optimizer. It handles basic indexing (b-tree) and "memory" management. Please forgive some of the lack of commenting and strange commenting, many late nights were spent on that project.

Chris J
The project looks like it's closed - can I still get the code?
Anthony Rizk
The code is still available, I just put that in case people wanted more info on it or were watching it, It just hasn't been worked on since we finished the course. go to source and get the code anon.
Chris J
Ah, didn't notice (not too familiar with Google code - though I guess it's not too dissimilar from any SVN web interface). +1 then - this is very helpful
Anthony Rizk
That does look like a nice book; thanks for mentioning it.
Jay Kominek
+1  A: 

Building a RDMS is not trival, you need to combine classic CS knowledge from several fields together with deep knowledge about harddrives, OS specifics, filesystems, memory, cpu, caches to make it efficient.

A good article about architecture we are required to read is:

http://www.nowpublishers.com/product.aspx?product=DBS&doi=1900000002

For theoretical knowledge about databases I would recommend to buy a book on this topic, I can only talk about the book I use for this, which is Database Systems an Application-Oriented Approach by Kifer, Bernstein and Lewis.

You might want to look at some opensource databases for ideas.

Tomh