Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cardinality

Former Member
0 Kudos

Hi,

While creating a foreign key we need to specify the cardinality?

What does that cardinality mean?

What are the values that the system allows?

Regards,

Chandru

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

The cardinality (n:m) describes the foreign key relationship with regard to the number of possible dependent records (records of the foreign key table) or referenced records (records of the check table).

The left side (n) of the cardinality is defined as follows:

n=1: There is exactly one record assigned to the check table for each record of the foreign key table.

n=C: The foreign key table may contain records which do not correspond to any record of the check table because the foreign key field is empty. This can occur for example if the field of the foreign key table is optional, in which case it does not have to be filled.

The right side (m) of the cardinality is defined as follows:

m=1: There is exactly one dependent record for each record of the check table.

m=C: There is at most one dependent record for each record of the check table.

m=N: There is at least one dependent record for each record of the check table.

m=CN: There may be any number of dependent records for each record of the check table.

http://help.sap.com/saphelp_nw04/helpdata/en/a7/d50f395fc8cb7fe10000000a11402f/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/b2/fbb859c64611d295dd00a0c929b3c3/frameset.htm

<b>Reward if usefull</b>

6 REPLIES 6

Former Member
0 Kudos

Hi Chandra

Please check the below SAP help regarding cardinality.

____________________________________________________________________

Cardinality of a relationship

The cardinality (n : m) describes the foreign key relationship with regard to the number of possible dependent records involved (records of the foreign key table) or referred records (records of the check table).

The left side of the cardinality has the following significance:

n = 1

For each dependent record there is exactly one record of the check table.

n = C

There can be records in the foreign key talbe which do not reference any record of the check table.

Note:

The definition of a generic foreign key means that the cardinalties (1 : m) and (C : m) actually become (CN : m). There can be several records of the check table for each dependent record. The value n = CN cannot however be specified explicitly in maintenance because

____________________________________________________________________

~ Ranganath

0 Kudos

Hi Chandra

Please check the below SAP help regarding cardinality.

____________________________________________________________________

Cardinality of a relationship

The cardinality (n : m) describes the foreign key relationship with regard to the number of possible dependent records involved (records of the foreign key table) or referred records (records of the check table).

The left side of the cardinality has the following significance:

n = 1

For each dependent record there is exactly one record of the check table.

n = C

There can be records in the foreign key talbe which do not reference any record of the check table.

Note:

The definition of a generic foreign key means that the cardinalties (1 : m) and (C : m) actually become (CN : m). There can be several records of the check table for each dependent record. The value n = CN cannot however be specified explicitly in maintenance because

The right side of the cardinality has the following significance:

m = 1

For each record of the check table there is exactly one dependent record.

m = C

For each record of the check table there is at most one dependent record.

m = N

For each record of the check table there is at least one dependent record.

m = CN

For each record of the check table there are any number of dependent records.

____________________________________________________________________

~ Ranganath

former_member624107
Contributor
0 Kudos

Hi..

Go thru this link

Former Member
0 Kudos

Former Member
0 Kudos

Hi

Cardinality of a relationship

The cardinality (n : m) describes the foreign key relationship with regard to the number of possible dependent records involved (records of the foreign key table) or referred records (records of the check table).

The right side of the cardinality has the following significance:

m = 1

For each record of the check table there is exactly one dependent record.

m = C

For each record of the check table there is at most one dependent record.

m = N

For each record of the check table there is at least one dependent record.

m = CN

For each record of the check table there are any number of dependent records.

Former Member
0 Kudos

Hi

The cardinality (n:m) describes the foreign key relationship with regard to the number of possible dependent records (records of the foreign key table) or referenced records (records of the check table).

The left side (n) of the cardinality is defined as follows:

n=1: There is exactly one record assigned to the check table for each record of the foreign key table.

n=C: The foreign key table may contain records which do not correspond to any record of the check table because the foreign key field is empty. This can occur for example if the field of the foreign key table is optional, in which case it does not have to be filled.

The right side (m) of the cardinality is defined as follows:

m=1: There is exactly one dependent record for each record of the check table.

m=C: There is at most one dependent record for each record of the check table.

m=N: There is at least one dependent record for each record of the check table.

m=CN: There may be any number of dependent records for each record of the check table.

http://help.sap.com/saphelp_nw04/helpdata/en/a7/d50f395fc8cb7fe10000000a11402f/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/b2/fbb859c64611d295dd00a0c929b3c3/frameset.htm

<b>Reward if usefull</b>