22 comments

  • faangguyindia 9 minutes ago

    I went from thinking “SQLite is a toy product, not reliable for real data" to "lets use SQLite for almost everything"

    SQLite is very good if you can fit into the single writer, multiple readers pattern; you'll never lose data if you use the correct settings, which takes a minute of Google search to figure out.

    Today, most of my apps are simply go binary + SQLite + systemd service file.

    I've yet to lose data. Performance is great and plenty for most apps

  • rmunn an hour ago

    > As of this writing (2018-05-29) ...

    So this news is nearly <del>six</del> EIGHT years old. But I didn't happen to know about it until now, so that's not a complaint at all; rather, this is a thank-you for posting it.

    (Thanks for the correction. Brief brain malfunction in the math department there).

    • frollogaston 4 minutes ago

      Was going to say, was having deja vu reading this

    • tehlike an hour ago

      Sir, it's 2026. It's 8 years old.

      • rmunn an hour ago

        Corrected; thanks.

  • alexpotato 4 hours ago

    I have always loved SQLite.

    I have also heard that some firms ban its use.

    Why?

    Because it makes it SO easy to set up a database for your app that you end up with a super critical component of your application that looks exactly like a file. A file that can have any extension. And that file can be copied around to other servers. Even if there is PII in that file. Multiply this times the number of applications in your firm and you can see how this could get a little nuts.

    DevOps and DBA teams would prefer that the database be a big, heavy iron thing that is very obviously a database server. And when you connect to it, that's also very obvious etc etc.

    I still love SQLite though.

    • Fwirt 3 hours ago

      The question is, do the same firms ban Excel? Excel spreadsheets often end up as shadow databases in unlikely places.

      • hermitShell 3 hours ago

        The sane thing would be to ban Excel and promote SQLite. Excel is often used for tabulated text (issue tracking) not calculations. Perfect use case for a relational db

        • frollogaston 2 hours ago

          Excel is made for calculations. But if you make it hard to make a DB, people will abuse Excel as a DB.

      • Spooky23 2 hours ago

        They generally cannot. But they do banish Access.

      • DeathArrow 27 minutes ago

        Do companies ban text files? Text files are used to store data.

    • tehlike an hour ago

      There are interesting uses for sqlite, like this one: https://sqlite.org/sqlar.html

    • ai_slop_hater 3 hours ago

      That's so dumb

    • slopinthebag 3 hours ago

      > DevOps and DBA teams

      Ah so two teams nobody should listen to.

      • frollogaston 2 hours ago

        At least would take it with a grain of salt when the DBA wants you to depend more on the DBA.

        • slopinthebag 2 hours ago

          Same with devops tbh.

          "Hey everyone, we need to chose the option that involves us the most and provides us the most job security"

  • srcreigh 3 hours ago
  • tombert 22 minutes ago

    On a recent project I have needed to use exFAT. exFAT is terrible for a number of reasons, but in my case the thing I had to deal with was the lack of journaling, which had the possibility to corrupt files if there were a power interruption or something.

    I initially was writing a series of files and doing some quasi-append-only things with new files and compacting the old one to sort of reinvent journaling. What I did more or less worked but it was very ad hoc and bad and was probably hiding a lot of bugs I would eventually have to fix later.

    And then I remembered SQLite. I realized that ACID was probably safe enough for my needs, and then all the hard parts I was reinventing were probably faster and less likely to break if I used something thoroughly audited and tested, so I reworked everything I was doing to SQLite and it worked fine.

    I wish exFAT would die in a fire and a journaling filesystem would replace it as the "one filesystem you can use everywhere", but until it does I'm grateful SQLite exists.

  • akihitot 2 hours ago

    For public-sector data preservation, it may be one of the best options.

    The specification is publicly available

    - It is widely adopted - It is likely to remain readable in the future - It has little dependency on specific operating systems or services - It carries low patent risk

    From the perspective of long-term continuity, avoiding dependence on any particular company or service is extremely important.

    • Spooky23 2 hours ago

      Archivists also love formats close to native. SQLite lets the relational relationships be present in a way that csv cannot.

      • akihitot 2 hours ago

        That's certainly true. The ability to define table relationships is a major difference from CSV.

  • ray_v 2 hours ago

    It's so funny, because I was JUST telling a colleague of mine - another librarian - this exact fact about sqlite!