Earlier quoted context omitted.
>most SQL will carry over between SQLite and Postgres and MySQL, especially if you add ORMs in the mix I think this goes underappreciated, or rather the opposite is overstated. Sure there are some edge cases that don't work the same, but most apps won't hit those. My _biggest_ gripe with SQLite so far is the lack of column reordering like other DBs. And my simplistic understanding is that the others do it exactly the…
> Sure there are some edge cases that don't work the same, but most apps won't hit those. That really depends on your modelling style. If you like things like types, SQL-side processing (eg using functions), or covering indexes, then you’ll hit issues every five minutes in sqlite. SQLite really wants the logic (including consistency logic) in the application, just compare the list of aggregate functions in postgres v…
Distributed SQLite: Paradigm shift or hype?
101–110 of 165 posts
Re: Distributed SQLite: Paradigm shift or hype?
#102Earlier quoted context omitted.
>most SQL will carry over between SQLite and Postgres and MySQL, especially if you add ORMs in the mix I think this goes underappreciated, or rather the opposite is overstated. Sure there are some edge cases that don't work the same, but most apps won't hit those. My _biggest_ gripe with SQLite so far is the lack of column reordering like other DBs. And my simplistic understanding is that the others do it exactly the…
Why would you want to recorder columns? SQLite reads in a whole record at a time to access any column.
Re: Distributed SQLite: Paradigm shift or hype?
#103Earlier quoted context omitted.
> I've implemented GraphQL on top of SQLite and found it to be an amazingly good match Could you give a pointer to the repository, or is this part of Datasette?
Nevermind, found it. Just don't know the license. https://github.com/simonw/datasette-graphql
Re: Distributed SQLite: Paradigm shift or hype?
#104Something I've been thinking about is partitioning my SQLite. Instead of storing all user's data in one mega table, what if I made a SQLite database for each user? Provided users never talk to each other, I think this might work?
You can attach to databases dynamically in queries and join across them. I probably wouldn't (in an ordinary data model) do per-user, but I would consider it for different functional areas.
Re: Distributed SQLite: Paradigm shift or hype?
#105Also I think sqlite would not be a good fit if any sort of slow workers / background jobs are required.
(I'm planning a background job system based around SQLite at the moment)
Re: Distributed SQLite: Paradigm shift or hype?
#106I wonder if SQLite will ever be modified to allow concurrent writes. Right now it locks the whole DB on write [1]. But since SQLite usage is rapidly expanding from its embedded db roots, one has to wonder if the devs have considered creating some sort of SQLite daemon, or if the underlying architecture would have to be changed so drastically it wouldn't be worth it. 1. https://www.sqlite.org/faq.html#q5
Re: Distributed SQLite: Paradigm shift or hype?
#107SQLite is getting a lot heavier. This is becoming more like MySQL or Postgres.
Version 3.26.0 from 2018 is 2286469 bytes.
That's a 20% increase in 6 years, but it's still just 2.6MB of compressed C.
Re: Distributed SQLite: Paradigm shift or hype?
#108The paradigm shift that's going to come with distributed SQLite isn't to the edge, it's going to be to users devices. I believe the DX of building Local-first apps is going to hit the criticality point in the next year or so and its popularity is going to explode. With dynamic partial replication you can synchronise a subset of your database to a SQLite db on your users device, eliminating the network from the ui int…
Re: Distributed SQLite: Paradigm shift or hype?
#109Earlier quoted context omitted.
> Sure there are some edge cases that don't work the same, but most apps won't hit those. That really depends on your modelling style. If you like things like types, SQL-side processing (eg using functions), or covering indexes, then you’ll hit issues every five minutes in sqlite. SQLite really wants the logic (including consistency logic) in the application, just compare the list of aggregate functions in postgres v…
I'm pretty sure SQLite has covering indexes. And the relatively new strict mode should enforce at least basic types (though if you want to enforce your own rules for things like dates you're still on your own).
I checked to be sure I had not missed it, and didn’t find anything. You have expressions and conditions, but no covering. Obviously you can kinda emulate it by adding the columns you want to cover to the key, but…
> though if you want to enforce your own rules for things like dates you're still on your own
That’s what I was talking about, having richer types, and the ability to create more (especially domains).
Strict tables provides table stakes of actually enforcing the all-of-5-types sqlite has built-in. Afaik a strict mode is something that’s still being discussed if it ever becomes reality.
Re: Distributed SQLite: Paradigm shift or hype?
#110The only way I know for doing concurrent writes in sqlite is to open a transaction, accumulate a bunch of writes and then commit them. Otherwise it is dog slow. And it has to be a single process, or you get data corruption. Has this changed somehow?