3 ms·
In-memory or local disk databases aren't going to work for any real world use case, regardless of how small or simple your application is. Using Postgres or MyS
by paxys 8y ago
In-memory or local disk databases aren't going to work for any real world use case, regardless of how small or simple your application is. Using Postgres or MySQL is barely more complex than SQLite, and it makes more sense to start with one of them than move everything over once you realize you aren't going to be running on your dev machine forever.
- nouveaux 8y agoAfter developing with Postgres for several years and then moving to sqlite for dev, sqlite is a breath of fresh air. Now our policy is that everything goes into sqlite db unless the data requires multiple writers. The fact that you have to keep a process running and updated is reason enough to not use Postgres if you can help it. For instance, we have processes that fetches and stores data from APIs. It's trivial to share this with other developers for dev purposes. This data is read only and it reduces an annoying step of loading the data into Postgres. This is coming from someone who starts projects with only Postgres for many years and I do love Postgres. Sqlite is an underrated tool in the web dev world.
- Scarbutt 8y agoReally though, I would bet 95% of wordpress websites will make do with sqlite.
- bschwindHN 8y agoI'm using sqlite for a small project but I was kind of disappointed to learn how annoying it is to drop or rename columns. Especially when you write migration scripts with up/down statements, it's kind of a pain compared to postgres. But otherwise it's been fine to use, a good starting point for internal projects.
- h1d 8y agoHow do you browse the data on the remote server with any GUI tools? Last time I checked not even DataGrip could do it.
- int_19h 8y ago> In-memory or local disk databases aren't going to work for any real world use case, regardless of how small or simple your application is. You'll have to provide some proof for that assertion, especially given that there are numerous examples of apps doing exactly that. For example, Firefox stores bookmarks and history in an SQLite database.
- y4mi 8y agoI'm pretty sure he's taking about web application... Sqlite is only really viable if you don't have an undefined amount of nodes pushing commits into the DB That's a challenge desktop applications don't have
- int_19h 8y agoFor many web apps it's true simply because of the expected usage, or sometimes because of access patterns (e.g. when most clients are read-only, or when most users don't author anything). From https://www.sqlite.org/whentouse.html https://www.sqlite.org/whentouse.html: "The SQLite website (https://www.sqlite.org/ https://www.sqlite.org/) uses SQLite itself, of course, and as of this writing (2015) it handles about 400K to 500K HTTP requests per day, about 15-20% of which are dynamic pages touching the database. Dynamic content uses about 200 SQL statements per webpage. This setup runs on a single VM that shares a physical server with 23 others and yet still keeps the load average below 0.1 most of the time."
- y4mi 8y agoThats a website, not a webapp... Its literally the first sentence. you need interactivity with writes for an actual webapp. sure, you could keep the writes in the browser cache, but then it wouldn't really be a webapp either, more like an app that opens in the browser.
- h1d 8y agoHow can you build and live with a page that runs 200 queries for every access?
- twic 8y agoI have numerous real-world use cases in production and making money that use in-memory and local disk databases. In fact, it's mostly hashmaps and JSON files.