Sample Header Ad - 728x90

How to avoid a cyclic dependency (circular reference) between 3 tables?

12 votes
3 answers
13721 views
I have 3 tables: - People - Post - Likes When I design the ER model it has a cyclic dependency:
         1:N
People --------


The logic is:

 - 1 people can have many posts.
 
 - 1 post has many likes.
 
 - 1 people can like many posts (created person cannot like his own post).

How can I remove this kind of cyclic design? Or is my db design wrong?
                        
Asked by Ragu (221 rep)
Dec 17, 2015, 05:37 PM
Last activity: Nov 17, 2021, 02:38 AM