Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is a Junction-Table basically just the table that sits between two entities that have a M-M relationship?

share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

A junction table is a weak entity, but a weak entity may be a junction table. A junction table is not the same as a weak entity. A junction table is a type of weak entity.

Tables used to resolve repeating groups are also weak entities. These are only junction tables if the repeating group contains a repeated foreign key relationship.

share|improve this answer
    
Should this read, "...but a weak entity may not be..."? –  AirThomas Dec 18 '13 at 22:34
1  
@AirThomas I believe may not would imply likely is which I did not want to do. Similarly I would state A coin may be a quarter rather than A coin may not be a quarter. –  BillThor Dec 19 '13 at 1:07
add comment

Depends how you define a "junction table". ER terminology tends to be somewhat ambiguous when used to describe relational database concepts.

A junction table typically means or can mean any table with two or more foreign keys.

A weak entity on the other hand is represented by a table whose primary key includes at least one foreign key attribute. That doesn't have to be the case for a junction table (i.e. a table with more than one foreign key).

share|improve this answer
add comment

Would it still be considered a "Weak" Entity if the junction table declares its columns with FK constraints and has a composite primary key of those columns? (In other words every row is required to be a valid reference from one table to the other and all such mappings are unique within the junction table).

share|improve this answer
add comment

Yes it is. See Wikipedia

share|improve this answer
    
Okay that's what I figured. Thanks man! –  leeand00 Apr 9 '11 at 14:59
    
A junction table isn't necessarily a weak entity however (not sure which part of the question that bernd was answering "Yes" to). –  sqlvogel Apr 13 '11 at 10:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.