We are building a website which uses a some static data like “countries, cities related to each country, mountains and so on”.
My friends suggest that its faster to store them in a CSV file and import them using javascript. He says its faster than gettings them from mysql.
Me on the want to stick with mysql so that we have everything in one place. I dont think that 0.00001 sec really matters.
Can you help us?
When should we use mysql and when csv?
- we are talking about static data. We wont change them in future
- The website we are building is in php, angularjs
For static data of that kind the only real incentive for using MySQL (that I can think of) is for database validation. I’d suggest just going with the CSV, particularly if you’re not planning to change it.