Share via


Contact.AdditionalContactInfo xml 열 정보

Contact 테이블에는 이름, 전화 번호 및 전자 메일 주소와 같은 일반적인 고객 연락 정보가 저장됩니다. 이 테이블에는 또한 AdditionalContactInfo라는 xml 유형의 열이 포함됩니다.

고객은 전화, 휴대 전화, 전자 메일 및 호출기 등 여러 연락처가 있을 수 있습니다. 추가 연락 지점의 정확한 개수는 디자인 타임에 제공되지 않을 수도 있기 때문에 이 정보를 저장하는 데 얼마나 많은 열이 필요한지 알 수 없습니다. 이러한 정보를 포함할 여러 열을 만든 다음 NULL 값을 저장하는 대신 각 고객에 대한 추가 연락 정보를 포함하는 XML 문서를 저장할 단일 XML 유형의 열을 만들 수 있습니다.

AdventureWorks 데이터베이스에서 이 열의 이름은 AdditionalContactInfo로 지정됩니다. 이 추가 연락 정보는 다른 응용 프로그램과 공유될 수 있습니다. 예를 들어 이 정보는 CRM(Customer Relations Management) 응용 프로그램에 유용할 수 있습니다.

CRM 응용 프로그램에서는 이 열에 연락 정보를 저장할 수도 있습니다. 여기에는 고객에게 연락한 날짜 및 대화 내용 등과 같은 정보가 포함될 수 있습니다.

이것은 형식화된 xml 열입니다. 이 열에 사용된 스키마는 다음 Microsoft 웹 사이트에서 볼 수 있습니다. 이 열에는 다음과 같은 스키마가 사용됩니다.

  • AdventureWorks ContactInfo 스키마

  • AdventureWorks ContactRecord 스키마

  • AdventureWorks ContactTypes 스키마

이 열에 저장된 예제 XML 인스턴스

다음은 예제 XML 인스턴스입니다.

<AdditionalContactInfo xmlns="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo" xmlns:crm="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactRecord" xmlns:act="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes">
  <act:telephoneNumber>
    <act:number>111-111-1111</act:number>
    <act:SpecialInstructions>
        Call only after 5PM.
     </act:SpecialInstructions>
  </act:telephoneNumber>
  Note that customer has second home at this address.
 <act:homePostalAddress>
   <act:Street>123 Oak</act:Street>
   <act:City>Seattle</act:City>
   <act:StateProvince>WA</act:StateProvince>
   <act:PostalCode>777</act:PostalCode>
   <act:CountryRegion>USA</act:CountryRegion>
   <act:SpecialInstructions>If correspondance to the primary address 
        fail, try this one</act:SpecialInstructions>
 </act:homePostalAddress>
  Customer provided additional email address.          
 <act:eMail>
   <act:eMailAddress>customer1@xyz.com</act:eMailAddress>
  <act:SpecialInstructions>Dont send emails for urgent issues. Instead use
        this emergency contact phone
        <act:telephoneNumber>
          <act:number>112-111-1111</act:number>
        </act:telephoneNumber>.
  </act:SpecialInstructions>
</act:eMail>
<crm:ContactRecord date="2001-06-02Z">This customer is interested in 
            puchasing a high end bicycles for his family. The customer 
            contacted Mike in sales.
  </crm:ContactRecord>
</AdditionalContactInfo>

더 많은 XML 인스턴스를 찾으려면 다음 쿼리를 실행합니다.

select AdditionalContactInfo
from   Person.Contact

참고 항목

개념