I am a newbie when it comes to database design. I was trying to create a blogging application and I ran into a problem. My database consists of the following tables:
User
HasInt (Records which user has which interest)
Interest (category of blogs: Sports, Literature etc)
Follow (Records which user follows which user)
Blog
Comment
From what I realise, I should not have anything to do with knowing how many comments have been made for any particular Interest. But I can see that there is a many to one
relationship between Comment and Interest. Should I still record this information ?
If so, why ?
User has zero to many interests
,user writes zero to many blogs
,user comments on zero to many blogs
etc. If there is no direct relation from comment to interest (although an indirect relation may occur through user) there is no relationship that needs to be defined in your model or diagram.