Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Studying MySQL, SQLite source code to learn about RDBMS implementation [closed]

I know implementing database is a huge topic, but I want to have a basic understanding of how database systems work (e.g. memory management, binary tree, transaction, sql parsing, multi-threading, partitions, etc) by investigating the source code of the database.

Since there are a few already proven very robust open source databases like mysql, sqlite and so on. However, the code are very complicated and I have no clue where to start. Also I find that the old school database textbooks are only explaining the theory, not the implementation details.

Can anyone suggest how I should get started and if there are any books that emphasis on the technology and techniques of building dbms used in modern database industry?

like image 535
Yang Avatar asked Mar 18 '10 09:03

Yang


People also ask

Is coding in SQLite and MySQL same?

MySQL uses a database server to run on a network, which can then be accessed by the client. SQLite, however, is what is known as an embedded database. This means that the structure is stored on the application itself.

Is SQLite open-source?

SQLite is open-source, meaning that you can make as many copies of it as you want and do whatever you want with those copies, without limitation.

Can I learn SQL with SQLite?

You should learn them together since to learn SQL you'll need an SQL engine, and SQLite is just that. Note that SQLite doesn't implement all of the SQL language but it's a great place to start learning it due to the library's simplicity.

Which is better SQLite or MySQL?

MySQL has a well-constructed user management system which can handle multiple users and grant various levels of permission. SQLite is suitable for smaller databases. As the database grows the memory requirement also gets larger while using SQLite. Performance optimization is harder when using SQLite.


1 Answers

I hate to sound like an grumpy, old academic, but the theory really is what you need to study, if you are determined to build your own RDBMS. The implementation details are really just, erh, implementation details. Apart from textbooks, you might also want to study research papers, which tend to cover the subject in higher detail.

When you start implementing your database engine, you could look into existing open-source implementations, but do expect the learning curve to be steep. As you have already discovered, these projects tend to be quite complex. When you have concrete questions to those projects, try posting them on the relevant mailinglists. When you have concrete questions about your own implementation, post them here :)

like image 179
Jørn Schou-Rode Avatar answered Oct 06 '22 00:10

Jørn Schou-Rode