Application Development and Automation 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: 
Read only

Cardinality Issue

Former Member
0 Likes
673

Hi experts,

Is it possible to have duplicate records in foreign key table for a corresponding record from check table ?

For eg :if i am having check table in which i am storing customer numbers and a foreign key table in which i am storing customer relevant data(name,address etc...) and now  i want to have multiple records in the foreign key table for same customer number in check table .Is it possible..?

I mean what should be the cardinality (N:M) for this scenario ? and also what setting i have to choose in "foreign key field type" while making the foreign key relationship ? Also it will be helpful to me ,if u throw some light on the cardinality concept (n:m).

3 REPLIES 3
Read only

Former Member
0 Likes
631

Hi, you can store multiple same values as long as the key is different and you have that value in check table.

check table value : foreign table value = 1:N.

Read only

0 Likes
631

Ok. I get that.Thanks.But can't we have a case where we can have same key and multiple records in foreign key table ? Is that possible by choosing different cardinality ratio ..?

Read only

0 Likes
631

Hi,

EX: table1 is your check table and field1 is the field for checking the value. Suppose you have a value 123 in field1.   table2 is a foreign table having field2 for which you want foreign key relationship.

Now field2 can have value 123 as many times as it can(depending on the cardinality you specify). But you have to make sure the key value of the foreign key table is unique.

go through here.

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm

and here of how to create foreign keys.

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb95446011d189700000e8322d00/content.htm

for cardinality go through here.

http://help.sap.com/saphelp_nw04s/helpdata/en/b2/fbb859c64611d295dd00a0c929b3c3/content.htm

thanks.

Message was edited by: Aswatha Narayana SA