SQLite is a bit of an outlier in how it handles...everything, but even more so in query processing. SQLite tends to favor simplicity over performance, which causes it to implement things differently than every other DB I've worked with. You have to understand - SQLite isn't competing with other databases. It's competing with JSON and XML files for persistent storage. This means that how it implements anything tells you practically nothing about how a real database would do something.
> By default, each SQLite table row has a unique rowId, which works like a primary key if one isn’t explicitly defined.
It actually uses rowid even if you have a primary key.
You should try visualizing the primary key index for a WITHOUT ROWID table. Those indexes are my favourite
> Both Indexes look similar, but the second Index, with fewer Pages, should be faster.
Less nodes doesn’t really mean “faster”. The most important is the height of the tree.
The second most important is what happens when you find your value in the index. Do you need to load the rest from a separate table(rowid)? Or is the data just there for you (without rowid)? Especially range queries (aka where 50<= col <=100)
It competes with both. its clearly used for local persistent storage. SO are quite a lot of other things. It also competes with other RDBMSes where a separate server process is not a requirement.
That does mean it serves very different requirements, its just that its use case are a lot wider than just replacing JSON and XML files and similar.
If you casually list off the top DB's either by usage or by recent hotness then almost all of them will have a server, but you'll also find they're basically all not embedded DB's with exception to RocksDB.
This is true with one exception, if you create an INTEGER PRIMARY KEY, SQLite will use this instead [1].
So… large usage, but probably not very high on the hotness scale