Do all relational database designs require a junction or associative table for many-to-many relationship?

AdjunctProfessorFalcon

I'm new to databases and trying to understand why a junction or association table is needed when creating a many-to-many relationship.

Most of what I'm finding on Stackoverflow and elsewhere describe it in either highly technical relational theory terms or it's just described as 'that's the way it's done' without qualifying why.

Are there any relational database designs out there that support having a many-to-many relationship without the use of an association table? Why is it not possible to have, for example, a column on on table that holds the relationships to another and vice a versa.

For example, a Course table that holds a list of courses and a Student table that holds a bunch of student info — each course can have many students and each student can take many classes.

Why is it not possible to have a column on each row in either table (possibly in csv format) that contains the relationships to the others in a list or something similar?

Larry Lustig

In a relational database, no column holds more than a single value in each row. Therefore, you would never store data in a "CSV format" -- or any other multiple value system -- in a single column in a relational database. Making repeated columns that hold instances of the same item (Course1, Course2, Course3, etc) is also not allowed. This is the very first rule of relational database design and is referred to as First Normal Form.

There are very good reasons for the existence of these rules (it is enormously easier to verify, constrain, and query the data) but whether or not you believe in the benefits the rules are, none-the-less, part of the definition of relational databases.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Does a many-many relationship in EF6 require the mapping table to be defined and to have a primary key?

From Dev

Spring JPA mapping with OpenJPA entities with junction table (many-to-many)

From Dev

many to many relationship of social network (database)

From Dev

Creating many to many junction table in Entity Framework

From Dev

hibernate not locating junction table in query of many to many relationship

From Dev

One to many relationship table

From Dev

NHibernate - Many to Many Query using Junction/Joiner Table

From Dev

Recursive relationship on a many to many table

From Dev

How to get all entries on a table by many to many relationship

From Dev

How to represent a many-to-many relationship in a relational database?

From Dev

Code first many to many relationship with attributes in relational table

From Dev

One to many relationship with junction table using Entity Framework code first

From Dev

SQL join on junction table with many to many relation

From Dev

Creating one to many relationship with pivot table of many to many relationship

From Dev

MySQL many-to-many junction table: Select all entries from A which contain no values in B not in list

From Dev

How to insert into associative table in many to many relationship by Hibernate?

From Dev

SQL many to many relationship table

From Dev

How to construct a Junction Table for Many-to-Many relationship without breaking Normal Form

From Dev

How to set up relational database tables for this many-to-many relationship?

From Dev

Creating many to many junction table in Entity Framework

From Dev

hibernate not locating junction table in query of many to many relationship

From Dev

How to get all entries on a table by many to many relationship

From Dev

Code first many to many relationship with attributes in relational table

From Dev

Many to many relationship in the same table?

From Dev

One to many relationship with junction table using Entity Framework code first

From Dev

Creating one to many relationship with pivot table of many to many relationship

From Dev

MySQL many-to-many junction table: Select all entries from A which contain no values in B not in list

From Dev

Junction table/many to many relationship

From Dev

How do I define a one-to-one relationship over a one-to-many relationship in a relational database?

Related Related

  1. 1

    Does a many-many relationship in EF6 require the mapping table to be defined and to have a primary key?

  2. 2

    Spring JPA mapping with OpenJPA entities with junction table (many-to-many)

  3. 3

    many to many relationship of social network (database)

  4. 4

    Creating many to many junction table in Entity Framework

  5. 5

    hibernate not locating junction table in query of many to many relationship

  6. 6

    One to many relationship table

  7. 7

    NHibernate - Many to Many Query using Junction/Joiner Table

  8. 8

    Recursive relationship on a many to many table

  9. 9

    How to get all entries on a table by many to many relationship

  10. 10

    How to represent a many-to-many relationship in a relational database?

  11. 11

    Code first many to many relationship with attributes in relational table

  12. 12

    One to many relationship with junction table using Entity Framework code first

  13. 13

    SQL join on junction table with many to many relation

  14. 14

    Creating one to many relationship with pivot table of many to many relationship

  15. 15

    MySQL many-to-many junction table: Select all entries from A which contain no values in B not in list

  16. 16

    How to insert into associative table in many to many relationship by Hibernate?

  17. 17

    SQL many to many relationship table

  18. 18

    How to construct a Junction Table for Many-to-Many relationship without breaking Normal Form

  19. 19

    How to set up relational database tables for this many-to-many relationship?

  20. 20

    Creating many to many junction table in Entity Framework

  21. 21

    hibernate not locating junction table in query of many to many relationship

  22. 22

    How to get all entries on a table by many to many relationship

  23. 23

    Code first many to many relationship with attributes in relational table

  24. 24

    Many to many relationship in the same table?

  25. 25

    One to many relationship with junction table using Entity Framework code first

  26. 26

    Creating one to many relationship with pivot table of many to many relationship

  27. 27

    MySQL many-to-many junction table: Select all entries from A which contain no values in B not in list

  28. 28

    Junction table/many to many relationship

  29. 29

    How do I define a one-to-one relationship over a one-to-many relationship in a relational database?

HotTag

Archive