mysql - 数据库如何存储小说数据比较好?
巴扎黑
巴扎黑 2017-04-17 15:04:50
0
2
2263

比如我有很多小说。
有两张表:小说信息表和小说章节表。
小说信息表存储了小说的id,标题,字数,作者啊等等。
小说章节表存储所有小说的章节及其内容。该表用小说id+章节id共同作为主键。

我的问题是,这样建表好吗? 要查找一篇小说的所有章节时会不会太慢了?

巴扎黑
巴扎黑

reply all(2)
巴扎黑

It is recommended not to store content in the database. You can write to a file and put it on a certain server, and only the accessible file addresses will be stored in the database.

迷茫

Then vertically split the novel chapters and novel content into separate tables. If it is still slow, consider indexing and full-text indexing.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template