10-16-2008 6:56 AM
Hi,
I have gone thru all the threads related to my query but i couldnt find the precise answer with an example .
Can anybody explain me the
Types of Foereign key fields and Cardinilities with an example.
Thanks a lot,
Ahmed.
10-16-2008 7:06 AM
hi
check this
http://help.sap.com/saphelp_erp2005/helpdata/en/7a/787e40417c6d1de10000000a1550b0/content.htm
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.
foreignkey
http://help.sap.com/saphelp_nw70/helpdata/EN/cf/21ea77446011d189700000e8322d00/content.htm
10-16-2008 7:06 AM
Hi,
If you want the explanation of Foreign Key fields,just open any table and select the foreing key,Press F1 help on foreign key field type,you will get the clear explanation,and also for cardinality.
Thanks,
Anil.D
10-16-2008 7:15 AM
Hi ahmed,
Check the following links:-
[Types of Foreign Key Fields|http://help.sap.com/saphelp_nw70/helpdata/en/b2/fbb85cc64611d295dd00a0c929b3c3/content.htm]
[Cardinality|http://help.sap.com/saphelp_nw70/helpdata/EN/b2/fbb859c64611d295dd00a0c929b3c3/content.htm]
Goodluck,
Bhumika
10-16-2008 7:59 AM
There are the following kinds of foreign key fields:
Not specified: No information about the kind of foreign key field can be given.
No key fields/candidates: The foreign key fields are neither primary key fields of the foreign key table nor do they uniquely identify a record of the foreign key table (key candidates). The foreign key fields therefore do not (partially) identify the foreign key table.
Key fields/candidates: The foreign key fields are either primary key fields of the foreign key table or they uniquely identify a record of the foreign key table (key candidates). The foreign key fields therefore (partially) identify the foreign key table.
Key fields of a text table: The foreign key table is a text table of the check table, i.e. the key of the foreign key table only differs from the key of the check table in an additional language key field. This is a special case of the category Key fields / candidates.
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:
1) n=1: There is exactly one record assigned to the check table for each record of the
foreign key table.
2)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:
3) m=1: There is exactly one dependent record for each
record of the check table.
4) m=C: There is at most one dependent record for each
record of the check table.
5) m=N: There is at least one dependent record for each
record of the check table.
6) m=CN: There may be any number of dependent records for
each record of the check
table.