# Cardinality - I really need help

From: beginner16 <kaja_love160_at_yahoo.com>
Date: Sat, 04 Aug 2007 12:23:28 -0700

hello

Some time ago I made a thread about cardinality and thought I understood it , but today I noticed that I actually misread a post explaining cardinality and realized that the subject still very much confuses me. Below are the original question and a reply ( the one I misread)

>>1)
>>The following quote ( well I shortened it a bit ) is from a chapter
>>briefly describing MARTIN E-R notation:
>>"Say we have entities ORDER and PRODUCT. One ORDER >>must include at least one product, but it can also have more
>>than one product. One PRODUCT can be related to zero or
>>more ORDERS. Thus cardinality of PRODUCT is ( 1, N ) and
>>cardinality of ORDER is ( 0, N )" But to my understanding, the
>>cardinality of ORDER entity should be ( 1,N ) --> where 1
>>means min number of connections and N max number of
>>connections an individual ORDER entity can have. And
>>cardinality of PRODUCT entity should be ( 0,N ). But my book claims just the opposite!

>>

```> I would have said it differently:  the cardinality of the
> PRODUCT-ORDER relationship with respect to ORDERS is
> (1,N).  the cardinality of the PRODUCT-ORDER relationship
> with respect to PRODUCTS is (0,N).  I think  you and I are on
> the same page,  but may need to reread Martin.

```

a)
Here is a picture from my book:

Book claims symbols on the graph show cardinality of E2 --> E2 = (0, 1). Huh?! Symbols on a graph show that E1 instance can be connected to zero or one instance of E2, so shouldn't cardinality of E1 be (0,1)?

b)
We have two entity types A and B:
A1 is an entity instance of type A
B1 is an entity instance of type B

As far as I understand cardinality, if we have two entity types A and B, and if A1 can be connected to one or more instances of type B, while B1 can only be connected to zero or one instances of A entity type, then relationship is 0:N, as depicted in a picture:

Thus to my understanding:
* Cardinality of A1 = (1:N), where 1 tells minimum number of connections ( of some type ) that A1 must have, while N tells max number of connections.

• Cardinality of B1 = (0, 1)

But the following suggests differently:

```> I would have said it differently:  the cardinality of the
> PRODUCT-ORDER relationship with respect to ORDERS is
> (1,N).  the cardinality of the PRODUCT-ORDER relationship
> with respect to PRODUCTS is (0,N).  I think  you and I are on
> the same page,  but may need to reread Martin.

```

If I'd go by the quote above, then cardinality of A1 = (0, 1) and of B1 = (1, N), which doesn't make sense!

thank you Received on Sat Aug 04 2007 - 21:23:28 CEST

Original text of this message