Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database Table or XML

I'm in the process of designing a small website and was curious when an XML file can/should be substituted for a database table. There are some cases where I think using a database table may be overkill and was just wondering if anyone else has come across making this decision.

Thanks!

like image 522
Sean Avatar asked Oct 21 '08 12:10

Sean


2 Answers

If you think you'll end up needing more than a tiny amount of CRUD, or your site will grow beyond a handful users, use a database.

Searching or updating XML files can kill performance and future scalability.

like image 195
Galwegian Avatar answered Oct 23 '22 07:10

Galwegian


I'd opt for using database tables when concurrent writes might happen, i.e. in any situation when you cannot guarantee that only a single change to the data will happen at any one time.

Further, if the data is relational, I'd use a database.

For small things which are likely to be low traffic, XML is fine.

like image 29
Dominic Rodger Avatar answered Oct 23 '22 06:10

Dominic Rodger