Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Model cycles

Hi,

 

I'm curious how can one handle cyclic dependencies. Let's say we have four tables: Users, Desktops, Orgunits and Tasks. Each Orgunit has some Desktops assigned and some Users working on those devices. Each Task is being executed by a User on a Desktop BUT there is an option that User can from time to time work for another Orgunit on their Desktops. Now we have to maintain all the informations:

  • what Desktops belong to what Orgunits (*:1)
  • what Users are formally assigned to which Orgunit (*:1)
  • which Users performed certain Task (there may be more than one) (*:1)
  • what Desktop was used while performing the Task (1:1)

So far my model has duplicated Desktop table so there is no cycle but I'd like to avid having the very same table added twice.

 

This is of course very simplified model of my real situation (I've got some more tables between Users and Tasks and the whole model is not finished yet, might happen that cyclic dependency will pop up again later).

 

What are your advices? What are the best practices?

4 Replies