views:

96

answers:

1

Hi,

I want to understand how sqlite is implemented. And, want to read the source code( I have already downloaded the source). Which part of the code I should start looking at?

+3  A: 

The SQLite documentation page has a great section named SQLite Technical/Design Documentation with articles on the internals of SQLite. I think it's essential to read and understand those before you start reading the source code itself.

There are many gems there, but the most interesting for you is probably Architecture of SQLite, as its description says:

An architectural overview of the SQLite library, useful for those who want to hack the code.

That page contains a nice block diagram of SQLite's code:

alt text

And then explains where in the source to find the implementation of each such block.


Another great resource (linked from here) is the Oreilly mini-book ("Short Cut") named "Inside SQLite" which goes into the design and code of SQLite to explain how it works.

Eli Bendersky
superb answer!!
jess