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

can i know the detail explanation of cardinality

3 REPLIES 3

Former Member
0 Kudos

Hi

Cordinality comes into picture w.r.t to Transaparent tables . for them the cordinality is 1:1 , means the table exists both in Database and the data dictionary.

where as for other tables it will not be the same.

So cordinality is related the data existence in both database and data dictionary.

A physical table definition is created in the database for the table definition stored in the ABAP Dictionary for transparent tables when the table is activated. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

On the other hand, pooled tables and cluster tables are not created in the database. The data of these tables is stored in the corresponding table pool or table cluster. It is not necessary to create indexes and technical settings for pooled and cluster tables

Regards

Anji

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sekhar

Cardinality describes the relationship between different entities.

Have a look at the example of a family consisting of parents (woman & man or wife & husband) and children:

Relation "is married": man : woman = <b>1:C</b> (meaning a man may or may not be married, but if he is married then only to a single woman)

Some cultures allow the following relation "is married": man : woman = <b>1:CN</b> (meaning a man may be married to several women).

A pair (man & woman) may or may not have children, thus the relation is: man/woman : child = 1:CN

In SAP we can have sales order (VA03) containing several items. What is the cardinality between order and item?

(1) order : item = 1:CN (means an order could exist without having any item -> false)

(2) order : item = <b>1:N</b> (each order must have at least a single item -> right)

The last example should show how important it is to use the right cardinality between your entities.

Regards

Uwe

Clemenss
Active Contributor
0 Kudos

Hi sekhar,

I don't know where Anji Reddy Vang got this definition from.

It is about the ralations of tables in a data model.

The cardinality given for foreign key field relations is more or less an information that can be used to understand the data model: 1:1 means each value matches exactly 1 in the check or foreign key table - that means you could put the information into one table as well.

1:n means you can have any number of dependent entries for 1 entry, i.e. 1 person like zero to any number of alcoholic beverages.

1:m means you must have at least one dependent, this is for example 1 customer has got one or more addresses.

(I hope i don't confuse m and n).

Regards,

Clemens