Database Modeling (Entity Relationship Model)

Asked

Viewed 380 times

-1

In the image below is the modeling of the following problem. I have users where these will belong to modules(Physical module, Portuguese module, chemical module) are 3 modules in total.One and only ONE (1) of the modules can contain from 1 to n groups, these groups are formed by users and each group contains only 1 Administrator.

In the user table I use an attribute to tell if the user is ADM of some group.

My question is in relation to the modeling I did, realize that it is circular. Someone has a better way to model this problem?

inserir a descrição da imagem aqui

  • The direct relationship between user and module is not strictly necessary, since it can be inferred by the participation of the user in a group that belongs to a certain module. But it is also not wrong, it may even be that its business rules require this redundancy - for example, the registration in a module occurs at a time prior to the formation of groups.

1 answer

1

There is no standard for the modeling format, now this missing identification of the relationship between entities, there are good practices to identify them as: id_group for a foreign key of the group entity or id_module for foreign key of the module entity.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.