For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database? For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database?
Reply content:
For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database?
I think it is better to put it in a local file. On the one hand, you can easily create an index and search for it. On the other hand, you can store data in a distributed manner without considering the problems caused by table sharding.
If it is directly stored in the database, it is very inefficient to put the novels of big points into a field, especially in full-text search.
Both are better.
Stored in the database for convenient management, re-editing, search, etc.
Put local files to facilitate direct download
If you do not want to provide direct download services, you can only store them in the database.
However, it is best to do a good job of caching
In my opinion, when I put files on a service provider that provides cloud storage, the database only provides some necessary information and stores a small amount of data, such as the title, type, and author. If you want to provide online reading, it is recommended that you refer to the relevant online reading materials, generally through a variety of plug-ins, may also include some file format conversion, in order to achieve better results.