# Why does N:M mean a many-to-many relationship?

Page 1 of 1

## 6 Replies - 3961 Views - Last Post: 26 April 2012 - 12:38 PM

Reputation: -4
• Posts: 16
• Joined: 01-February 12

# Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 11:40 AM

1:1 is one-to-one which makes sense
1:N is one-to-many, 1:M would make more sense but I'm guessing the N is similar to 'nth term' in mathematics
M:N is many-to-many LOL WUT, why isn't it N:N, or M:M
Is This A Good Question/Topic? 0

## Replies To: Why does N:M mean a many-to-many relationship?

### #2 modi123_1

• Suitor #2

Reputation: 13948
• Posts: 55,683
• Joined: 12-June 08

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 11:43 AM

It's to show that the left and right sides do not have to be the same number. If you said "N:N" I would assume that has to be "2:2".. or "69:69"... now when you show me to different variable names I know they do NOT have to be the same... "40:42".. or "101:101"...

Reputation: -4
• Posts: 16
• Joined: 01-February 12

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 11:47 AM

modi123_1, on 26 April 2012 - 11:43 AM, said:

It's to show that the left and right sides do not have to be the same number. If you said "N:N" I would assume that has to be "2:2".. or "69:69"... now when you show me to different variable names I know they do NOT have to be the same... "40:42".. or "101:101"...

I see. So it could be X:Y or A:B either?

Would make far more sense for many-to-many to be represented as M:M and one-to-many to be 1:M really.

### #4 modi123_1

• Suitor #2

Reputation: 13948
• Posts: 55,683
• Joined: 12-June 08

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 11:57 AM

Quote

I see. So it could be X:Y or A:B either?

In theory yes, but M and N are the commonly used notations so I would suggest sticking with it.

Quote

Would make far more sense for many-to-many to be represented as M:M

Again - no, it would not. That would imply both sides have to be the same number and that is patently not true. Break yourself of thinking of variables having to link up to some word.. they are a construct to quickly, and in a succinct short hand, represent the fuzzy idea of "any number of things". What if "many" meant a glaring of cats? Wouldn't that instance make sense to have 'G' or 'C'? You have to be more abstract.

Quote

and one-to-many to be 1:M really.

Again - stop trying press some connection to the word many. What about the Germans? 'many' roughly translates to viele. The French - beaucoup. The Dutch - veel. See not everyone has the same words so everyone agrees in abstract terms are just that and not what you are familiar with!

### #5 baavgai

• Dreaming Coder

Reputation: 7150
• Posts: 14,890
• Joined: 16-October 07

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 11:59 AM

There's always some reasoning to a design choice, even if it looks like wonky reasoning.

While I don't know for sure, if I were to guess, I'd say the M:N is because those variable names are preferred when describing the size of a matrix. Depending on your discipline, the pair might come readily to mind.

### #6 SpartanGuy07

Reputation: 33
• Posts: 149
• Joined: 08-September 11

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 12:25 PM

Rather than using "many" think of M and N as normal variables. They can be any number (or representation), we just don't know which for the particular case so we choose to represent them with an abstract variable.

When you see an equation that says y = 2x, you don't read it as "many equals 2 times many". You understand that the variables x and y are variables (commonly used for coordinates) that we don't know, but we do know the relationship between them.

The same concept applies to your problem.

This post has been edited by SpartanGuy07: 26 April 2012 - 12:28 PM

### #7 jon.kiparsky

• Beginner

Reputation: 11018
• Posts: 18,804
• Joined: 19-March 11

## Re: Why does N:M mean a many-to-many relationship?

Posted 26 April 2012 - 12:38 PM

Saying the same thing yet another way,

1:1 means exactly one item relates to exactly one item.
1:2 means exactly one item relates to exactly two items (we don't see this very often)
1:N means exactly one item relates to exactly N items where N is some particular number which we don't know right at the moment or choose to leave unspecified.
N:N means a relationship of N items to N items - a square matrix. (Again, one we don't see a lot of.)

So I'll leave this one for you:

M:N means what?