Programming/ABAP

Cardinality

_syd 2023. 8. 25. 21:20

Cardinality(n:m)는 Foreign key 관계를 설명한다.
가능한 종속 레코드(dependent records ,records of the foreign key table) 수와 관련된 foreign key 관계를 나타내고, 참조된 레코드(records of the check table)의 수를 나타낸다.
 

http://sapjoy.co.kr/abapqna/4925

** check table : 외래키(Foreign Key)로 연결된 테이블
 

https://www.slideshare.net/TELANGANAASTATE/chapter-03-foreign-key-relationships1

Cardinality 왼쪽(n)

●      n=1
foreign key table의 각 레코드에 대해 check table에 정확히 하나의 레코드가 할당됩니다.
●      n=C
foreign key field가 비어 있기 때문에 foreign key table에는 check table의 레코드와 일치하지 않는 레코드가 포함될 수 있다.
foreign key table의 field가 선택 사항인 경우 이러한 문제가 발생할 수 있으며, 이 경우 필드를 채울 필요가 없다.
 

Cardinality 오른쪽(m)

●      m=1
check table의 각 레코드에 대해 정확히 하나의 dependent record(record of the foreign key table)가 있다.
●      m=C
check table의 각 레코드에 대해 dependent record가 최대 하나만 있다.
●      m=N
check table의 각 레코드에 대해 dependent record가 하나 이상 있다.
●      m=CN
check table의 각 레코드에 대해 dependent record가 몇 개든 있을 수 있다.
 
 
참고
https://help.sap.com/doc/saphelp_snc70/7.0/en-US/b2/fbb859c64611d295dd00a0c929b3c3/content.htm?no_cache=true 
 

728x90