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?
Start the sqlite3 program by typing "sqlite3" at the command prompt, optionally followed by the name the file that holds the SQLite database (or ZIP archive). If the named file does not exist, a new database file with the given name will be created automatically.
The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With