Skip to Content
author's profile photo Former Member
Former Member

Cardinality

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 12:45 PM

    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>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 06:35 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Nov 30, 2007 at 06:37 AM

    Hi..

    Go thru this link

    cardinality

    cardinality

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 06:41 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 12:44 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.