I’m wondering if it’s better to use mysql or use files to store data? What is safer, what is faster? I’m talking about php and mysql.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It completely depends on your requirements and setup.
For small amounts of data that doesn’t require complex querying, files are faster. Site caches are one example.
For larger data sets or sets with more structure, a database will enable you to query your data in more advanced ways.
In terms of safety, files can be protected (using permissions) and stored outside the web root. Databases can be locked to certain hosts and can have users with different roles/permissions.