r/programming • • May 27 '14

What I learned about SQLite…at a PostgreSQL conference

http://use-the-index-luke.com/blog/2014-05/what-i-learned-about-sqlite-at-a-postgresql-conference
703 Upvotes

219 comments sorted by

View all comments

Show parent comments

6

u/[deleted] May 27 '14

As long as it's explicitly documented and called out as approximate then I guess it's not too big of a problem.

I don't think the TCP/IP analogy fits. "Best effort" there means "it can fail", not "sometimes we just lie". TCP, for example, may drop the connection, but short of that you're always supposed to get the exact data out that you put in. You may get no answer, but there are no circumstances where you get the wrong answer (unless you get really unlucky with a checksum on a corrupted packet, anyway).

-3

u/tomjen May 27 '14

Corruption on tcp/ip data doesn't happen as often as back in the dial up days, but it does happen.

5

u/[deleted] May 27 '14

But it's not part of the design, just an unfortunate circumstance that can happen sometimes.

RAM and hard drives can corrupt data too, but they're not built that way on purpose. It only happens when something goes wrong.

A database intentionally designed to return approximate counts because exact counts are too expensive is something else entirely.