Role 특성(연결 SSDL)

EDM(엔터티 데이터 모델)에서 End 요소의 Role 특성은 연결 및 해당 기능과 관련된 엔터티를 지정합니다. 이 항목의 예제에 있는 연결에서는 관리자-직원 관계에 따라 Employee 엔터티를 연결합니다. Type="AdventureWorks.Store.Employee" 할당에 표시된 대로 연결의 두 End는 같은 형식입니다.

Role 특성은 관리되는 직원과 관리자를 구분합니다. Multiplicity 특성은 관리자인 Employee는 0개 이상의 이 연결 인스턴스에 참여할 수 있지만 Employee1은 한 명의 관리자만 가질 수 있으며 이 형식의 연결 하나에만 참여할 수 있도록 지정합니다. 이러한 다중성 지정은 하나의 ManagerID만 포함할 수 있는 Employee 테이블의 외래 키에 포함된 관계에 해당합니다.

  <Association Name="FK_Employee_Employee_ManagerID">
    <End Role="Employee" Type="Adventureworks.Store.Employee" Multiplicity="0..1" />
    <End Role="Employee1" Type="Adventureworks.Store.Employee" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="Employee1">
        <PropertyRef Name="ManagerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

참고 항목

개념

Association 요소(SSDL)
Role 특성(연결 SSDL)
AdventureWorks 전체 모델(EDM)