Skip to content
Advertisement

SQL – Multiple one-to-many relationships

Is it possible somehow to do multiple one-to-many relationships between 2 tables? Like:

Table abc

  • abcID
  • defID
  • message

Table def

  • defID
  • abcID
  • message

If yes how can I then make a new abc entry with the entity framework?

Advertisement

Answer

You only need a single Many-Many relationship. Simply move QuestionId out of the quiz_answers table and move AnswerId out of the quiz_questions table:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement