Live data from Hacker News

There are over one trillion SQLite databases in active use

sqlite.org

61–70 of 92 posts

Re: There are over one trillion SQLite databases in active use

#61
post #14

They'd have one trillion + 1 if they had better JSON support. I'd be using it in a large healthcare project I'm working on now. Unfortunately, the JSON support is basically "serialize to a string". Postgres is miles ahead with jsonb. Shame, I <3 sqlite.

Could you expand on what Postgres offers that SQLite doesn't in this regard? I'm curious to know what I'm missing out on.

Postgres's JSONB type can essentially turn Postgres into a full NoSQL database. Infact, its so good that it can beat MongoDB at its own game in a lot of benchmarks.

https://www.theguardian.com/info/2018/nov/30/bye-bye-mongo-h...

Example: The Guardian switched from Mongo to Postgres jsonb as a nosql db.

Re: There are over one trillion SQLite databases in active use

#62
post #44

One of the examples of wildly successful "one-man-army" software (conceived of and built by a single person). See also: Redis, Linux, Doom/Quake, Steve Wozniak, jQuery, Python and countless obscure modern SaaS products.

Their extensive test library is proprietary, so they ensure the path of least resistance for companies is to hire themselves to make improvements to the library. That has helped ensure there are no forks given quality would be inferior. It also kept SQLite out of the browser since there are no competing implementations of it.

SQLite is extensively used in web browser codebases. If you check your Firefox profile, it's well-packed with SQLite databases.

Re: There are over one trillion SQLite databases in active use

#63

Love god? What? What an oddly discriminatory thing to have on the code of ethics... EDIT: I'm convinced this must be some sort of forgotten April fool's remnant.

Let's not get distracted by an extraneous provocation. As you can imagine, this has come up frequently when people run into that bit, and tends to lead to the same discussion over and over (and ultimately, religious flamewar).

There's a new site guideline about this actually:

"Please don't pick the most provocative thing in an article and rush to the thread to complain about it. Find something interesting to comment about instead."

https://news.ycombinator.com/newsguidelines.html

We detached this subthread from https://news.ycombinator.com/item?id=29461959.

Re: There are over one trillion SQLite databases in active use

#64
post #17
post #8

Don’t forget to count all the cruise missiles, too!

Those tend to fall out of the “active use” category not long after entering it, so it’s probably not a big factor. On a more serious note, had there been something special about SQLite supporting military use of their project that prompted this? Otherwise that’s the point of free software, people are free to do (mostly) whatever they want with it. Including building weapons. SQLite is so prevalent, it’s almost like p…

I was just making a funny joke about how it was developed originally for cruise missiles. Though it turns out I was misremembering: it was made for guided missile destroyers. And it makes sense! What a great use case. https://en.wikipedia.org/wiki/SQLite#History

Re: There are over one trillion SQLite databases in active use

#65

Love god? What? What an oddly discriminatory thing to have on the code of ethics... EDIT: I'm convinced this must be some sort of forgotten April fool's remnant.

The code of ethics is a 1500 year old "code of ethics" meant to govern the lives of benedictine monks: https://en.wikipedia.org/wiki/D._Richard_Hipp That might provide some context. edit: haha, this is what I get for skimming the wikipedia article. He has a PhD in computer science, but the full "doctorate of philosophy" is written out instead of abbreviation on that wikipedia article. My pattern matcher needs tuning,…

I think you are taking what “Ph.D.” stands for to be his actual area of study.

Re: There are over one trillion SQLite databases in active use

#66

Love god? What? What an oddly discriminatory thing to have on the code of ethics... EDIT: I'm convinced this must be some sort of forgotten April fool's remnant.

It's a reproduction of Saint Benedict's code of conduct for overseeing monks; it's not going to be 1:1.

It might be soft evangelism but it's not being used for discrimination.

Re: There are over one trillion SQLite databases in active use

#67
post #44

One of the examples of wildly successful "one-man-army" software (conceived of and built by a single person). See also: Redis, Linux, Doom/Quake, Steve Wozniak, jQuery, Python and countless obscure modern SaaS products.

Steve Wozniak was a software project?

Re: There are over one trillion SQLite databases in active use

#68
post #51
post #48

Earlier quoted context omitted.

I don't think anyone can reasonably get angry over someone else following these. Good rules.

Haha I’d love to agree but it seems there are plenty of people in this thread that are upset about it nonetheless

You can find that just about any statement will result in plenty of people being upset about it. We in the first world society have made life so resource abundant that people need to invent new ways to be seen as a victim, be offended by anything or oppressed in some way.

Re: There are over one trillion SQLite databases in active use

#69
post #46
post #18

Earlier quoted context omitted.

Not GP, but PostgreSQL offers jsonb fields[1] Since PostgreSQL allows for functional indexes, you can query and index the data in a structured way. For example you have a table t with "id" and "data" where data is a jsonb field like {foo: ..., bar: ...}. You can do SELECT id, data->'foo' FROM t WHERE data->'bar' > 5 Which will yield the value of "foo" (inside the json field) for rows where "bar" (inside the json fiel…

Unless I'm misunderstanding SQLite can do this as well, but with less nice syntax. The above could be written something like: SELECT id, json_extract(data, '$.foo') FROM t WHERE json_extract(data, '$.bar') > 5 in SQLite. You can also add an index on one of these expressions: https://dgl.cx/2020/06/sqlite-json-support

It seems like one thing is that Postgres has two types for JSON: JSON and JSONB.

Both validate syntax on insert. The JSONB datatype (not JSON; note the B on the end) further stores the content in a parsed, binary form so future accesses are faster. The schema author does not have to indicate which columns they would like "fast" access to - queries are free to access any arbitrary path in the JSON, and will get reads that don't require JSON parsing.

It seems like SQLite can achieve something similar but not quite the same. It looks like the user has to specifically enumerate and materialize the columns to which they want fast access.

So it seems like json_extract(...) is comparable to Postgres's JSON type, but there's not quite an analagous thing for Postgres's JSONB type.

Re: There are over one trillion SQLite databases in active use

#70
post #16

i have a feeling that every time SQLite is mentioned on HN it always gets to the frontpage great for them i guess!

They have a lot of fans, of the type of people that haunt HN.

High quality project that is useful for for small hobbyist projects, startups and large companies alike. Persisting data something that is used in probably the majority of software projects across many verticals. It is OSS software that is easy to pick up. It is a values driven project (both technical and ethical). And the team maintaining it has kept it going for a long time, so as it get rediscovered by others it still has relevancy for many.

Basically it is good software, with a wide TAM, and just enough quirks to appeal to the folks here.

Post reply on HN