A friend and I were debating about whether he should use MySQL or a flatfile database for his website's backend. I told him to go with MySQL because it was structured, held records well, and was consistent. He on the other hand said that he would rather go for speed. Reading files is a lot quicker than connecting to MySQL and it made me wonder whether he was right. For example, why not just create a folder for each table, like so: users/
groups/
posts/
, within the folders have the files named by ID (1
, 2
, 3
) and then for the data use a format like so: username: John
password: e2fc714c4727ee9395f324cd2e7f331f
email: example@example.com
?
In other words, what are the advantages of MySQL over flatfiles?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…