Ask someone to tell me how the messaging board in the QQ space is designed.
Source: Internet
Author: User
How is the database designed for the message board in the QQ space? I don't know the database design of the QQ space? Can any friend reply infinitely ?, Reply ID & nbsp; reply_id?
I don't know the database design of the QQ space? Can any friend receive an unlimited number of replies?
------ Solution --------------------
Reply ID reply_id,
Post ID note_id,
Parent ID parent_id of the reply ID
Not afraid of buildings in the building, as long as the ownership is marked clear
------ Solution --------------------
The adjacent list and the pre-order traversal can all be modified.
------ Solution --------------------
Id, whether posted or replied, each post must be uniquely identified.
Id of the pid to be replied
The link is complete. just traverse the number.
Extension:
Mid Post id, which can narrow the search range
Pre-order: pre-order traversal, also known as left and right values, records the start and end IDs of a post.
Median sorting: it is derived from the "one-foot-length" of Zhuangzi, which takes half a day and is inexhaustible. However, because a computer can only represent a limited number, it cannot be "unlimited"
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