Home > Backend Development > PHP Tutorial > discuz friendly link php discuz theme table and reply table design

discuz friendly link php discuz theme table and reply table design

WBOY
Release: 2016-07-29 08:39:37
Original
1517 people have browsed it
The following content is only an excerpt:
If we design the topic table and reply table, the usual approach is as follows.
 php discuz 主题表和回帖表的设计
In this way, when obtaining the topic list, the paging algorithm is directly used to extract Topics; when viewing a certain post, you also need to jion links to Topics and Posts.
The flaws of this design are:
1. The Topics table stores Content content, and its volume will be very large. The performance of paging a large table will be very slow.
2. When displaying Posts content, a join operation will be performed, which will consume performance.
The approach of Discuz is to design as follows.
 php discuz 主题表和回帖表的设计
                                                                                                  Split the Content in Topics into Posts, and at the same time, the topic posts of Topics are also placed in Posts as replies, thus solving the two problems we raised above. This is a classic example of violating a database design paradigm in exchange for better performance.

The above introduces the design of discuz friendly links php discuz theme table and reply table, including the content of discuz friendly links. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template