relational database DER

1

Hi, I have a question with databases of an application that I am doing I am just going through the DER and I have a doubt the matter is: A user can have many channels from 1 to N

a user can be subscribed to many channels and the channel can have many subscribers from N to N.

My question is how do I do this in the der? Did I get two relationships from the user entity to the channel entity? Help please

    
asked by Emanuel Mamani 01.07.2016 в 17:22
source

1 answer

1

If a user has many channels and one channel can have many users as well you say it is a N to N relationship, so you should create a weak entity, in which you would have two foreign keys the user_id and the channel_id, in addition to in this table you could add additional information such as the period of the subscriber. among other things.

So in summary you would have to create the table subscribers_channels with the fields user_id, channel_id, etc.

    
answered by 01.07.2016 / 18:17
source