mardi 27 janvier 2015

How to model role and different activities


I am new in the database design and I'm facing this problem, I hope somebody can help me.


In my domain we have 3 roles, Non-Supervisor, Supervisor, Manager.


I created a Person table and a role table for every role and added a table


Person_Role


Pk- PersonId


Pk- RoleId


Pk- StartDate


EndDate


Every role make daily different Activities and a set of activities are called a Journey.


The problem is that because Journey and Activities depend of the role I created the properties for Journey and Activities based on the role but I don't know if this is correct or should I continue with the idea that all Person has a Journey.


Please take a look at my image, I explained better. Thanks a lot


http://ift.tt/15RuETM


enter image description here





Aucun commentaire:

Enregistrer un commentaire