MySQL vs data files

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
mutzimutzi
Forum Newbie
Posts: 1
Joined: Wed Apr 13, 2011 8:55 am

MySQL vs data files

Post by mutzimutzi »

I am building a web site and I want to add a very simple content manager (which I will build myself).
The two ways I know how to do it are:
1. using MySQL to store all of the pages.
2. without using MySQL, storing all of the data in files using fopen, fwrite,...

Which one is better, and why?
User avatar
waytoecommerce
Forum Newbie
Posts: 16
Joined: Tue Apr 12, 2011 11:47 am

Re: MySQL vs data files

Post by waytoecommerce »

see if you will use first one it will be better since Mysql is fast and response very quickly then any other process. If you store data in files may in future it will create problem in opening the file.

As the experience on both the things I will recommend you to go for the first one.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: MySQL vs data files

Post by social_experiment »

It depends on whether you can get mySQL (which these days shouldn't be a problem). If you can get a mySQL database there is no reason why you should go with a flat file system. Each one of these have their own pro's / cons though which will make them more suitable for different applications.

http://www.databasedev.co.uk/flatfile-vs-rdbms.html
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply