Ternary Relationship cardinality
flag
Messages 1 - 10 of 11 - Collapse all
/groups/adfetch?hl=en&adid=HqRihxEAAABXbo2KYEz3zxD0VorMCcpqFSRgCP-avRN4YT0eROC0jw
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  mikl...@gmail.com  
View profile  
 More options Sep 18 2006, 8:57 pm
Newsgroups: comp.databases.theory
From: mikl...@gmail.com
Date: 18 Sep 2006 11:57:27 -0700
Local: Mon, Sep 18 2006 8:57 pm
Subject: Ternary Relationship cardinality
Hi,

I am working on an assignment which has 2 ternary relationship. I'm
can't figure out their cardinality.

Maybe I am going through one of those mental blocks...

Can someone give me some cardinality examples for N-ary relationships?
all the pics i found on google images don't include this..

My other option is to convert the 3-ary relationship into a weak
entity.. but I'll definitely loose marks on that

Is it ok to have N'ary Relationships which includes recursion? looks
kind of odd to me
eg [person](buyer) trades [item] with [person](seller)

Thanks,

Mike


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  J M Davitt  
View profile  
 More options Sep 19 2006, 2:00 am
Newsgroups: comp.databases.theory
From: J M Davitt <jdav...@aeneas.net>
Date: Tue, 19 Sep 2006 00:00:30 GMT
Local: Tues, Sep 19 2006 2:00 am
Subject: Re: Ternary Relationship cardinality

Recursion?  How so?

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  mikl...@gmail.com  
View profile  
 More options Sep 19 2006, 8:57 am
Newsgroups: comp.databases.theory
From: mikl...@gmail.com
Date: 18 Sep 2006 23:57:19 -0700
Local: Tues, Sep 19 2006 8:57 am
Subject: Re: Ternary Relationship cardinality
sorry I meant recursive relationship .. eg. Person Marries Person


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Jonathan Leffler  
View profile  
 More options Sep 19 2006, 9:10 am
Newsgroups: comp.databases.theory
From: Jonathan Leffler <jleff...@earthlink.net>
Date: Tue, 19 Sep 2006 07:10:11 GMT
Local: Tues, Sep 19 2006 9:10 am
Subject: Re: Ternary Relationship cardinality

mikl...@gmail.com wrote:
> I am working on an assignment which has 2 ternary relationship. I'm
> can't figure out their cardinality.

> Maybe I am going through one of those mental blocks...

> Can someone give me some cardinality examples for N-ary relationships?
> all the pics i found on google images don't include this..

Cardinality = number of { rows, records, tuples } in a relation.

Count the number of 'rows' in the table - that's the cardinality.

Degree = number of { fields, columns, attributes }.

Ternary relations have degree 3 (or 'are of degree 3').

> My other option is to convert the 3-ary relationship into a weak
> entity.. but I'll definitely loose marks on that

You may also lose marks for misspelling 'lose' (and not using plurals,
and using "I'm can't" for "I can't", etc).

 > [...]

--
Jonathan Leffler                   #include <disclaimer.h>
Email: jleff...@earthlink.net, jleff...@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
5.  mikl...@gmail.com  
View profile  
 More options Sep 19 2006, 10:03 am
Newsgroups: comp.databases.theory
From: mikl...@gmail.com
Date: 19 Sep 2006 01:03:22 -0700
Local: Tues, Sep 19 2006 10:03 am
Subject: Re: Ternary Relationship cardinality
I know what cardinality is... and I know how to implement it

My problem is with the notation for a particular Ternary relationship.

(Supertype) [Parent]------[0..*]----- <Breeding>
----[1..1]--------[Child](subtype)
                        |-------------[0..*]------------|

The prob is when I use the N:1 notation..my first reaction would be to
do something like this:

(Supertype) [Parent]------1-----
<Breeding>-----M-------[Child](subtype)
                        |-------------1------------|

However that doesn't make sense since ParentA can be related to Many
ParentB's and viceversa. (don't think of the normal parent-child
scenario.. it's a game and the relationship is the actual act of
breeding)

PS I'm using Chen notation
PS2. After a day at work followed by 2 hours of transaction schedules
.. I really couldn't give a damn about spelling&grammar..


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
6.  Jan Hidders  
View profile  
 More options Sep 19 2006, 10:41 am
Newsgroups: comp.databases.theory
From: "Jan Hidders" <hidd...@gmail.com>
Date: 19 Sep 2006 01:41:29 -0700
Local: Tues, Sep 19 2006 10:41 am
Subject: Re: Ternary Relationship cardinality

mikl...@gmail.com wrote:
> I know what cardinality is... and I know how to implement it

> My problem is with the notation for a particular Ternary relationship.

> (Supertype) [Parent]------[0..*]----- <Breeding>
> ----[1..1]--------[Child](subtype)
>                         |-------------[0..*]------------|

Your ASCII art is a bit unclear so let me tell you how I interpret
this:
- You have a relationship Breeding(Parent1, Parent2, Child)
Your depicted cardinality constraints are as follows:
- Each Child participates in exactly one instance of that relationship.

- Each Parent participates in zero or more instances of that
relationship.

Minor detail: if *every* child has two parents your database will
either be infinite or some will be their own descendants.

> The prob is when I use the N:1 notation..my first reaction would be to
> do something like this:

> (Supertype) [Parent]------1-----
> <Breeding>-----M-------[Child](subtype)
>                         |-------------1------------|

The general rule is as follows: If you have a relationship R(a,b,c)
then you have to ask for each role, say 'a', how its cardinality
depends on the combination of the other two, in this case 'b' and 'c'.
If the upperbound is 1 then you put 1 on the corresponding edge in the
diagram, if there is no upperbound you put N or M there.

So let's look at Child. Given two particular parents what is the upper
bound on the number of children. There is no upperbound so the edge
Breeding--Child is annotated with N. Let's look at Parent1. Given
Parent2 and a child is there un upper bound on the number of associted
Parent1's? Yes, there can be at most one, (in fact, this is already the
case just for Child) so we annotate the edge Breeding--Parent(1) with
1.

Clear?

-- Jan Hidders


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
7.  mikl...@gmail.com  
View profile  
 More options Sep 19 2006, 11:42 am
Newsgroups: comp.databases.theory
From: mikl...@gmail.com
Date: 19 Sep 2006 02:42:24 -0700
Local: Tues, Sep 19 2006 11:42 am
Subject: Re: Ternary Relationship cardinality
Hi Jan,

> The general rule is as follows: If you have a relationship R(a,b,c)
> then you have to ask for each role, say 'a', how its cardinality
> depends on the combination of the other two, in this case 'b' and 'c'.
> If the upperbound is 1 then you put 1 on the corresponding edge in the
> diagram, if there is no upperbound you put N or M there.

Thanks for the insight...

> Minor detail: if *every* child has two parents your database will
> either be infinite or some will be their own descendants.

Care to expand on this? Note that parents can come into existence by
purchase, however since Children are a specialization of 'parent', they
can also breed.

Thanks,

Mike


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
8.  Jan Hidders  
View profile  
 More options Sep 19 2006, 11:54 am
Newsgroups: comp.databases.theory
From: "Jan Hidders" <hidd...@gmail.com>
Date: 19 Sep 2006 02:54:59 -0700
Local: Tues, Sep 19 2006 11:54 am
Subject: Re: Ternary Relationship cardinality

Ah, wait, now I understand your sub/superclass annotation. You say that
Child is a subclass of Parent (btw. letting both be a subclass of Dog
or whatever might be more logical) and a dog is in the class Child iff
it has parents.In that case there is no problem.

-- Jan Hidders


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
9.  mikl...@gmail.com  
View profile  
 More options Sep 19 2006, 12:22 pm
Newsgroups: comp.databases.theory
From: mikl...@gmail.com
Date: 19 Sep 2006 03:22:04 -0700
Local: Tues, Sep 19 2006 12:22 pm
Subject: Re: Ternary Relationship cardinality

> Ah, wait, now I understand your sub/superclass annotation. You say that
> Child is a subclass of Parent (btw. letting both be a subclass of Dog
> or whatever might be more logical) and a dog is in the class Child iff
> it has parents.In that case there is no problem.

I don't think I can generalize both in 1 class... the actual heirarchy
is abit more complex than the parent/child example.

Person
IS A
CoolerPerson(who can take part in breeding)
IS A
ChildPerson OR EvenCoolerPerson

Not using the actual names as they got us all paranoid about this
anti-plagiarism WebBot..which probably doesn't exist..

Thanks Again,

Mike


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
10.  Jan Hidders  
View profile  
 More options Sep 19 2006, 1:47 pm
Newsgroups: comp.databases.theory
From: "Jan Hidders" <hidd...@gmail.com>
Date: 19 Sep 2006 04:47:15 -0700
Local: Tues, Sep 19 2006 1:47 pm
Subject: Re: Ternary Relationship cardinality

mikl...@gmail.com wrote:
> > Ah, wait, now I understand your sub/superclass annotation. You say that
> > Child is a subclass of Parent (btw. letting both be a subclass of Dog
> > or whatever might be more logical) and a dog is in the class Child iff
> > it has parents.In that case there is no problem.

> I don't think I can generalize both in 1 class... the actual heirarchy
> is abit more complex than the parent/child example.

> Person
> IS A
> CoolerPerson(who can take part in breeding)
> IS A
> ChildPerson OR EvenCoolerPerson

It depends a bit on which ER dialect you happen to be using. Strictly
speaking, if you specify that A IS-A C and B IS-A C this only means
that every A is a C, and every B is a C. So it does not mean that A and
B are disjoint (i.e., there can be entities in both A and B) or that
every C is either an A or a B. Usually there are special combined
isa-edges to denote the latter two constraints. But, again, this may
depend on the dialect your instructor / professor is using, so be sure
to check the IS-A semantics in the notation you have to use.

-- Jan Hidders


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google