If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Many to 2 relationship ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-15-10, 06:27
madushan madushan is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
Post Many to 2 relationship ?

Hi everyone, this is my question
In an ERD, if there is a Many-to-2 relationship, can we represent it as it is in an ERD (if Chen Notation is considered) or do we have to use it as an Many-to-Many relationship?
But if we represent it as Many to Many, we have to create an extra table unnecessarily.
So if I want to stick to creating 2 tables only (in the relational schema), how can we represent it in the ERD.

EX: - A Basket Bass match has 2 teams to play
one team can play many matches
Reply With Quote
  #2 (permalink)  
Old 10-15-10, 06:36
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
You don't represent the M:M relationship with a table in an ERD, only when implementing it in the database. However, Many:2 is exactly the same as M:M anyway; it is the fact that more than one can relate "more than one" to "more than one" that is the key. In other words, they are different flavours of the same relationship type. Anyhoo, you can define the cardinality in your ERD in either case (though I confess I don't know about Chen notation).

However, if you are recording participants in a match then I would have these as two attributes in your match entity (home_team, away_team). Apart from anything else here is no way to enforce a mandatory cardinality in any RDBMS I know, but you can ensure the two columns are NOT NULL.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 10-15-10, 07:34
madushan madushan is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks

Earlier I have drawn that (Match and Team) relationship as Many to many in the ERD. Then in the relational schema, I've broke the M:M relationship as 2 One-to-Many relationships. The linking table was named as Participation. But then I got to know that there is a requirement for the match entity to be identified by its (teams playing and match date). So then i decided to put that 2 teams in the same table (match).

I've implemented it and works fine.

What I want to know is that how can we represent it in the ERD USing "Chen notation".

Shall I put many to many in the ERD? I'm quite sure you can't put many to 2 though
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On