PHP discuz Theme table and reply table design _php skills
Source: Internet
Author: User
The following extracts are only part of the text:
If we were to design a topic table and a reply form, the usual practice would be as follows.
This allows you to use the paging algorithm to extract topics when you get a list of topics, and to jion links to topics,posts when you view a post.
The disadvantages of this design are:
1. Topics table storage content, its volume will be very large, the large volume table paging, performance is very slow.
2. Display posts content will be a join operation, loss performance
And Discuz's approach is to do the following design.
Will topics content split into the posts, at the same time topics theme posts also as replies to posts inside, so that we solve the above two issues. This is an example of a typical violation of the database design paradigm in exchange for better performance.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service