4 ms·
Using a flat-file based system appeals to me, but one question I've never had a good answer for is at what sort of scale does a certain database make sense? As
by docandrew 6y ago
Using a flat-file based system appeals to me, but one question I've never had a good answer for is at what sort of scale does a certain database make sense?
Aside from questions of ACID, I get the idea that a lot of people jump to databases because they're uncomfortable with file operations, frankly. But obviously they make sense for other use cases - what is the decision matrix? Just a gut feeling?
- klodolph 6y agoIf you’re strictly asking about scale and not features, the breakpoint is just a question of whether the data fits comfortably in RAM and whether the front-end fits on the same machine. Once the dataset is too big for RAM or once you need multiple front-ends, you’re reimplementing ordinary database features in whatever home-grown system you have.
- docandrew 6y agoThat's helpful, thank you.
- omnimus 6y agoFlexibility - most flatfe CMSes ive tried (i am heavy user) model the data in files as yaml documents so it becomes very similar to nosql dbs. So advantages and disadvantages. So it easy to have custom data structures for every page. But its harder to query, sort etc. I wouldnt build ecommerce site with flat-file because there is lot of tabular repeated data like orders, customers, products. But for content sites its perfect. Simpler and flexible. Its awesome for site builders with different blocks of structured content. Worth noting that with flatfile you can use sqlite for those repeated records and other way around many sql dbs support json columns that you could use similarly to flatfile/nosql.