Live data from Hacker News

There are over one trillion SQLite databases in active use

sqlite.org

41–50 of 92 posts

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

#41

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.

> No one is required to follow The Rule...[The SQLite developers] view The Rule as their promise to all SQLite users of how the developers are expected to behave. This is a one-way promise, or covenant. In other words, the developers are saying: "We will treat you this way regardless of how you treat us." I don't see a problem here, despite my own disinterest in following the Christian faith or any other. It's not ha…

In fact, that would go against their code of ethics.

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

#43
post #23
post #5

Earlier quoted context omitted.

> Since SQLite is used extensively in every smartphone, and there are more than 4.0 billion (4.0e9) smartphones in active use, each holding hundreds of SQLite database files, it is seems likely that there are over one trillion (1e12) SQLite databases in active use. Sounds reasonable to me.

Hundreds of SQLite files? In active use? Unless iOS itself spawns a few hundred instances and actively uses them all the time I have a hard time thinking of what would use so many databases, much less that they’re actually in active use.

Well. I counted 27 SQLite files in my Chrome profile. On a PC though. But as they are used to store History, Cookie, etc. I guess on iOS/Android situations are similar.

And that's one single app.

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

#45

SQLlite has also got probably the most well-tested code of conduct of any open source project in the world (aside from the other open source projects which use this CoC) https://sqlite.org/codeofethics.html

Isn’t SQLite essentially not accepting outside contributions at all? In such a case this CoC really might work just fine.

As would a red “GO AWAY” banner.

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

#46
post #18
post #14

Earlier quoted context omitted.

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.

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

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

#47

SQLlite has also got probably the most well-tested code of conduct of any open source project in the world (aside from the other open source projects which use this CoC) https://sqlite.org/codeofethics.html

I wonder if they've ever had to enforce "Be not drowsy" or "Be in dread of hell".

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

#48

SQLlite has also got probably the most well-tested code of conduct of any open source project in the world (aside from the other open source projects which use this CoC) https://sqlite.org/codeofethics.html

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

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

#49

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,…

His PhD is in Computer Science.

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

#50
post #20
post #12

Earlier quoted context omitted.

I love PostgreSQL, and would recommend it anytime. Even though jsonb is very powerful, in general if you store JSON in a SQL database you're very likely doing something wrong. (You're breaking first normal form) But if you really wanted to use SQLite to store JSON à la jsonb in PostgreSQL you can use generated fields[1] sqlite> create table t(id integer primary key autoincrement, data text); sqlite> insert into t(dat…

Disagree storing json in databases is often the best thing to do. Clickhouse for example allows you to quickly pull out relevant data and feed materialized views.

Just because its easier doesn't mean its better - json is just one possible materialization for your set.
Post reply on HN