我有表格:用户、评论和文章,
- A user can have many posts and comments
- A post can have many comments
- A comment can only be written by one user, and can only be in one post
因此,我如何使这些表格之间的关系,从而不导致任何封闭关系。
这就是我所做的:
tbl_user 1 ------ n Post
tbl_post 1--------n Comments