What are the drawbacks of doing so? What do you need to pay attention? What are the drawbacks of doing so? What do you need to pay attention?
Reply content:
What are the drawbacks of doing so? What do you need to pay attention?
I have never heard of this. it would be better to use redis quickly and easily in terms of performance. the database is always a file, and the memory is much faster than the file.
It depends on the I/O speed of your server disk. if the application and database server are the same, there is no need to do so. why should we discard the advantages of relational databases. Of course, if the data volume is small, you can actually store the data in xml or json.
A major advantage of SQL is its relevance.
If there are two groups of related data, you need to query and assemble the results at the same time, then SQL can be done with a join,
But for file storage, you need to read the entire file and write the associated query statement on your own.
When writing new data, you must write the concepts of update, insert, and delete.
However, if the requirement is simple, for example, a static menu, you can simply use a json file without any pressure. My personal website menu is a json file that stores menu data, and a php file that renders html. For this super-simple requirement, mysql is a small application and a file is used.
Depending on your needs.