I am currently developing an ecommerce software using PHP/MySQL for a big company. There are two options for me to get some specificed data:
- DB (for getting huge data, such as PRODUCTS, CATEGORIES, ORDERS, etc.)
- TXT (using YAML -for getting analytical data and some options)
For instance, when a user go to product details page I need to get those TXT files:
- Product summary file (product_hit, quantity_sold, etc.) -approximately max. 90KB
- Langauge and Settings file (such as company_name, translations for template) -approximately max. 300KB
- May be one more file (I don't know right know) -assume that 100KB.
I want to use this way, because data is easily readable by human and portable between programming languages. In addition, if I use DB, I need to connect a couple of tables. But these files GET THEM TOGETHER.
My txt file looks like (YAML):
product_id: 1281
quantity_sold: 12 #item(s)
hit: 1105
hit_avarage: 92 #quantity_sold/hit
vote: 2
...
But, still I am not sure about speed and performance. Using TXT files are good idea? Should I really use this way instead of DB?