User 1 wrote an article (ID = article1) Oh, oh, NO, NO. Oh, oh, NO, NO. Oh, oh, NO, NO. Oh, oh, oh, NO, NO. |
User 2: This article is too ugly (comment1) |
User 1: @ user 2: Thank you for your reply (comment 2) |
User 3: @ Use 2: I also come to join in to reply (comment3) |
User 2: @ user 3: reply (comment 4) |
User 4: This article is okay. Reply (comment1) |
User 5: @ user 4: I also reply (comment 4) |
Database ideology: (comments)
1.
All comments and replies are treated as comments to the article.
2.
Representation Method (corresponding to the database)
Comment_id |
Comment_pid |
Comment_uid |
Comment_content |
Comment_parent |
Comment_owner |
Article ID |
Text comment ID |
User ID |
Comment |
Reply |
Which comment does it belong? |
Database example
Article 1 |
Comment 1 |
User2 |
This article is too ugly |
Null |
Null |
Article 1 |
Comment 2 |
User1 |
Thank you. |
Comment1 |
Comment1 |
Article 1 |
Comment 3 |
User3 |
I also come to join in |
Comment1 |
Comment1 |
Article 1 |
Comment 4 |
User2 |
Haha |
Comment3 |
Comment1 |
Article 1 |
Comment 5 |
User4 |
This article is fine. |
Null |
Null |
Article 1 |
Comment 6 |
User5 |
Me too |
Comment5 |
Comment5 |
There are similar attributes such as comment time. You can add them by yourself. Here I only list the core things and understand Long live.