data are files you can see, copy, etc. You can have them on the same place, disk or wherever you want to.I don't know about Postgres, but every other DB I've ever worked with does have files for the databases- files that you can see, copy, etc.
if any doubts about speed, my systems have won the race over the other options being used, so it's not on the table for discussion
It sucks trying to work with git or whatever version management, you have full control of your code but data needs extra steps.
The main difference about flat file databases is one has to build the system and features
LifeinAsia: I don't know about Postgres, but every other DB I've ever worked with does have files for the databases- files that you can see, copy, etc.
Martinibuster: So am I correct in asserting that the advantage doesn't lie in the file being flat or otherwise but in the quality of being idiosyncratic?
graeme: I usually do not want the data version controlled, and if you do write a dump/reload script, or use a framework that has one. I do want the schema version controlled, but that is easy with a modern framework with some sort of support for migrations.
graeme: To a large extent you are asking "if we ignore the biggest advantages of using a database, then how does an RDBMs compare to flat files"?
once your code/files have been compromised is very easy to get the username and pass of the database if one knows the system, per example WP, even Drupal and Symfony because that data is indeed stored on a config file.
Nope. Apps depend on tools, code and implementations, a lot of apps won't use the whole set of features a database is offering
It's up to good practices, but not saying this or that one-man-band-tool is superior to msyql or alike
It's easier to adopt a database than a framework, and many times it's just not possible due to the company guidelines.
[edited by: phranque at 11:11 pm (utc) on Jul 14, 2014]
[edit reason] no personal urls please [/edit]
For DBs, a system crash means you only lose the data since your last transaction log backup (which is commonly done much more often than a full backup). And transaction log backups are much faster than full backups, taking less time and consuming fewer resources.
ust make sure you've scoped the project properly and flat files truly give you everything you need
Firstly, why do you pick the weakest database to compare against? MySQL is better than it used to be
We have not even discussed NOSQL databases yet....
A downside to roll-you-own code is, especially if you're paying someone like an employee to do it for you, is that any new hires won't be able to apply their previous knowledge with "whatever" CMS and will have to learn how your previous/lead developer does things.
The question is, what is the advantage of using flat files? What is the trade-off for the extra work and risk?
[edited by: incrediBILL at 6:43 am (utc) on Aug 16, 2014]
If you only need to make a file that stores setup date for instance, putting it in a database takes longer to build the code than simply writing an .ini file in a text editor, saving it to the disk, and loading it and putting it into a multi-dimensional hashed array with a few lines of code.
Where do people come up with this garbage?
Because of all this crap, many people don't use flat files because the Apache/PHP configuration creates a ton of problems just to do simple things like writing and editing the files
Coolest thing about text based flat files? You can load 'em up in your favorite text editor for quick edits/updates/fixes.
You can reroll fields, expand/shrink fields, strip data, search & replace, count occurrences
sort the data in ways you would only dream of in a sql'like db.
Many sites don't need all of the capability a modern RDBMS provides. Depending on how you implement things, flat files can be insanely fast compared to a RDBMS. We're talking about being able to host a popular site on one or two servers as opposed to sixteen.
[edited by: incrediBILL at 6:44 am (utc) on Aug 16, 2014]
[edit reason] fixed auto-correct typo [/edit]
To summarize my unanswered questions: what would I gain if I started developing using flat files instead of PostgreSQL?
What you have not done is put forward any reason to use flat files.
[edited by: incrediBILL at 12:56 am (utc) on Aug 18, 2014]
What you have not done is put forward any reason to use flat files.
I'm pretty sure I said speed and ease of implementation, esp. for things such as a config file, takes about 5 min. vs and hour+, which you called a "straw man" when faced with a straightforward reason.
I even included the fact that WebmasterWorld itself uses flat files and uses the OS as an indexing system and it runs faster than hell with millions of records in over a half-million files which could easily tank a SQL server if the database was configured improperly.
Even more critically, most people simply do not possess the programming chops required to execute that kind of code from scratch which is why they use SQL servers in the first place.
In this specific case, I believe WebmasterWorld smokes most comparable sites using SQL for storing threads and the amount of system requirements it takes to run are less.
If a crash occurs, only the single file that crashed is lost, if any. Worse case we just reindex the whole site and all is 100% back, in a couple of minutes tops.
With a database, fixing a crash might involve rollbacks, database restored from backups, all sorts of nonsense.
Try moving data from flat files into a properly designed database: you will probably find a lot of duplicates, inconsistencies and bad data.
Where did that FUD come from?
CVS files from Excel are flat files, so you're saying Excel files are bad data?
Let's keep the discussion serious and professional and not make wild claims that can't be supported please
WordPress caching plugin simply writes every page as a flat file because, get this, it's faster to read when requested. Are you saying those cache files are bad data?
BOTTOM LINE - flat files were used FOREVER before actual databases were available on early PCs and if they didn't work and weren't reliable then personal computers wouldn't be here today as nobody would've bothered using them!
Graeme: If you really think flat files are so superior, would you be happy if you bank stopped using an RDBMS and stored all their data in flat files?
the intention is evident
I guess in some way a lot of webmasters go 100% sure with eyes closed about security because they use frameworks or SQL stuff
I also guess... at the end the thread should be more focused on sanitizing data input and file permissions.
[edited by: graeme_p at 12:20 pm (utc) on Aug 20, 2014]