Doubt - Relationship N to N

Asked

Viewed 98 times

-1

I’m developing a conceptual model for project management.

A Project can have several phases.
One Phase can be in several projects.

The above relations will generate another table "Projectophase" .
My question is:
I could use the relationship Projectophase as current phase of the project? If not, how could I model the conceptual to identify the current phase of a project?

Qual seria a melhor opção para conseguir identificar uma fase corrente do projeto?

Thank you for your attention! D

  • What fields would have its current phase of a project and as indicated?

  • in addition to foreign keys, a field status

  • So and the Phase table has no status?

  • That’s right, there’s no.

  • Can’t create another table called Fasecorrente? and this would be linked to a Project and a Phase. What values would you be considering modeling in the Status column?

  • 1

    Would the status not indicate what is the current phase of the project? This is which of the instances of the Phase-Project relationship indicates the current phase?

  • @Mauroalmeida, the Fasecorrente table is already being generated with the relation N:M between the Project and Phase tables. In the status column, in the table Fasecorrente, I am considering the values: On time, Out of time, Risk, Closed.

  • Why use English words for some status states and Portuguese for others?

  • I added the image with the conceptual models. Which of the options would be the correct to refer to a current phase of a project?

  • If, as you say, "A Phase can be in multiple projects" your option 1 makes no sense.

Show 5 more comments

1 answer

0


The best model would be option 2, because it would be a relation N to N, and in this case it would be necessary to create a third table to store the values of this relationship, and in this table you would have the status field, containing the status of this relationship.

You can use composite key in this table Faseprojeto, which would be the union of the two fields(idProjeto, idFase).

Below is an image of what the relational model would look like

inserir a descrição da imagem aqui

Browser other questions tagged

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