Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9207923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:29:50+00:00 2026-06-18T00:29:50+00:00

I wonder to know why EmailAddress Table in Adventure work database uses composite primary

  • 0

I wonder to know why EmailAddress Table in Adventure work database uses composite primary key(BusinessEntityID,EmailAddressID(Identity))?
if it’s something related to set cluster index for both fields, I would appreciate if tell me how composite primary key physically store(in which order and how data insert)?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:29:51+00:00Added an answer on June 18, 2026 at 12:29 am

    It is because this way, the same e-mail address can be used by multiple Persons as well as the same Person can use multiple e-mail addresses, i.e., it makes the relationship between person and e-mail address many-to-many.

    If the need was merely to enforce that the e-mail address should belong to a person, it would have been enough to make it a foreign key and the column BusinessEntityID not nullable.

    Update:

    There are 2 tables involved here, Person and EmailAddress.

    Each record in Person is identified by a BusinessEntityID. To associate a record from Person with a record in another table T, it is enough to include a column in this table T that refers to BusinessEntityID. Now, if we needed to ensure that all records in T must be associated with some record in Person, then we would place a foreign key constraint on T.BusinessEntityID and make it not nullable. If on top of this, we wanted to ensure that each record in T must be associated with one and only one record in Person, then we could place a uniqueness constraint on the column T.BusinessEntityID.

    When we make 2 columns, A and B part of the primary key of a table, we are telling the database that the values of these two columns together must be unique for all records in that table. It has no bearing on the values in each of those columns and any foreign key relationships.

    To illustrate:

    Person (BusinessEntityID, Name) and PK is BusinessEntityID
    ---------------
    1 | John
    ---------------
    2 | Jane
    ---------------
    3 | Sales Team
    
    
    
    EmailAddress (BusinessEntityID, EmailAddressID, EmailAddress) and PK is [Business EntityID, EmailAddressID] where EmailAddress is auto-incremented
    --------------
    1 | 1 | john@example.com
    ------------------------
    1 | 2 | john@contoso.com
    ------------------------
    2 | 3 | jane@example.com
    ------------------------
    2 | 4 | jane@contoso.com
    ------------------------
    1 | 5 | sales@example.com
    ------------------------
    2 | 6 | sales@example.com
    ------------------------
    3 | 7 | sales@example.com
    

    Data similar to the above is possible to put in the tables in your example. Now what is happening here?

    There are 3 entities, John, Jane and Sales Team.

    John has 2 personal e-mail addresses. Jane also has 2 personal e-mail addresses. In addition, the e-mail address sales@example.com belongs to the Sales Team but also to John and Jane.

    This is a many-to-many relationship.

    Additonally, if the composite key in EmailAddress is clustered, the keys are stored in the order in which they appear. Read this for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder yii works with cassandra. If anybody know how it work. Please post
I wonder if you know how to get hideshow work with new modes. For
I wonder how spring and google app engine work together I know that google
I am using firefox addon builder (Addon kit 1.7) and I wonder to know
As I know Samsung Bada is not operating system but, just wonder if I
I know & is used to create references. But I wonder what having a
wonder what's wrong <table id=tblDomainVersion> <tr> <td>Version</td> <td>No of sites</td> </tr> <tr> <td class=clsversion>1.25</td>
I wonder if we know why the reset to initial map state button /
i only know php and i wonder if you can extend a php web
I dont know a lot of javascript but I wonder if this is possible:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.