
The SQLite Database File Format - s16h
https://www.sqlite.org/fileformat2.html
======
jevinskie
[http://permalink.gmane.org/gmane.comp.db.sqlite.general/9054...](http://permalink.gmane.org/gmane.comp.db.sqlite.general/90549)

Apparently the latest and greatest SQLite is sometimes 50% faster than 3.7.17
released in July of last year. Impressive!

I also love using SQLite for testing compiler optimization passes. Their TCL
test suite coverage is quite good. Unfortunately, I think you have to splurge
tens of thousands of dollars to get the C-based test suite. I believe you can
only test full branch coverage with the C test suite.

------
whitten
Is SQLite used as the internal database for some popular systems?

~~~
qewrffewqwfqew
In case you've been living under a rock ..
[https://www.sqlite.org/mostdeployed.html](https://www.sqlite.org/mostdeployed.html)

~~~
Zecc
That text needs an update. There's no mention of Android and Symbian is all
but dead.

------
sauere
[http://howfuckedismydatabase.com/sqlite/](http://howfuckedismydatabase.com/sqlite/)

~~~
lazyant
by "concurrent users" the site means "concurrent users for writes" because for
reads concurrent users is fine in sqlite.

------
rckclmbr
This is an odd, random thing to be on the front page. Did any event in
particular happen to make this come up?

~~~
ushi
There was this submission[0] yesterday. Probably someone wanted to learn more
about it and stumbled upon this amazing document.

[0]
[https://news.ycombinator.com/item?id=8378894](https://news.ycombinator.com/item?id=8378894)

~~~
dr_zoidberg
The format _is_ amazing, however the document is not well written. You have to
read about half of it to begin to understand how the format works. I had to
read it whole for a project and it was really time consuming, though I don't
think I could write it any better than it is right now.

There were some blog posts that were far clearer to understand the file
format, but unfortunately I lost track of them.

~~~
dunham
As a pedagogical exercise, to help me understand the design, I wrote some Go
code to read a sqlite database and dump table contents. I remember having to
peek at the source code to figure out a few things that weren't explained well
in that document.

I'd previously written code to read the lucene database format (python code
that time), which was also a good learning experience. I ended up leveraging
some of that knowledge for a work project.

And I've also played around with reading/writing git archives.

~~~
SQLite
I'd like to improve the document so that reference to the SQLite source code
is not required. Can you explain (perhaps via private email) what the file
format document did not describe sufficiently for you to implement a reader in
Go?

~~~
dunham
It was over a year ago, so my memory is a little fuzzy. I do remember that
near the end of the process I looked at the source code to answer a question
or two. I'll skim over the docs again and see if I can remember what I was
confused about.

------
tscherno
Also very interesting:
[http://www.sqlite.org/testing.html](http://www.sqlite.org/testing.html)

------
jpswade
The problem with SQLite is that there's no official RFC, it's a pseudo
database.

When you're weighing up what to implement, it certainly helps when there is an
agreed upon technical specification.

~~~
erikb
This seems to be a valid comment, but I'm not sure I understand it. Can you
show some examples from other databases? How are they doing it right?

~~~
personZ
I assume that they're referring to the great browser wars, where Web SQL was
abandoned in favor of IndexedDB because the former was essentially a call out
to use SQLite as it is. Many argued against a single implementation because it
didn't have an underlying high level specification that would allow for other
implementations.

~~~
erikb
Why are you assuming I am referring to anything? I simply said I don't
completely understand the parent comment and would like some examples. Maybe
you intended to respond to another comment?

~~~
personZ
And I was obviously trying to address your question, speculating what jpswade
was talking about.

If you fail to get the basic context of a thread, maybe the internet isn't for
you.

