none
BusinessEntityID - Need help understanding.

    Question

  • So the new AdventureWorks  is an ultra normalized database and the concept is completely new to me and I have a question about how it would work. My understanding is the BusinessEntityID is the primary key for EVERY possible person the company deals with, and the table PERSONS.PERSONS is the table with all the actual information that is associated with a particular BusinessEntityID. Correct me if I am wrong.

    My question is how is the BusinessEntityID created? Is it automatically generated when a new person is made? Or are the BusinessEntityID's premade (in this case there are 27000 or so records) and whenever a new person is made you have to assign them a BusinessEntityID that is availabe.
    Sunday, February 08, 2009 9:56 AM

Answers

  • Howdy, adamus1986. I wouldn't call it "ultra"-normalized. There are still some candidates for normalization... ;-)

    BusinessEntityID is easy; it's an IDENTITY that's created when you create a new record. It was designed to showcase some of the new features of Entity Framework (such as inheritance); unfortunately, EF doesn't yet support all of SQL Server 2008's data types so we can't publish the EF samples that take advantage of the new design.

    Creating a new Person.BusinessEntity is the first step in creating a new retail customer, employee, store, vendor, etc.

    Does that help?
    David Reed
    Monday, February 09, 2009 11:12 PM

All replies

  • Howdy, adamus1986. I wouldn't call it "ultra"-normalized. There are still some candidates for normalization... ;-)

    BusinessEntityID is easy; it's an IDENTITY that's created when you create a new record. It was designed to showcase some of the new features of Entity Framework (such as inheritance); unfortunately, EF doesn't yet support all of SQL Server 2008's data types so we can't publish the EF samples that take advantage of the new design.

    Creating a new Person.BusinessEntity is the first step in creating a new retail customer, employee, store, vendor, etc.

    Does that help?
    David Reed
    Monday, February 09, 2009 11:12 PM
  • How is it today with latest EF version? are we able to take advantage of BusinessEntityID? do we have it as PK in each table to do faster select queries? Can you please explain that with more details or if there is any tutorial, It will be nice. thanks.

    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."


    • Edited by emil_tr Sunday, May 26, 2013 4:57 AM
    Sunday, May 26, 2013 4:53 AM
  • What you said here is false:

    "the BusinessEntityID is the primary key for EVERY possible person the company deals with, and the table PERSONS.PERSONS is the table with all the actual information that is associated with a particular BusinessEntityID."

    Example: Check the records with BusinessEntityIDs 292, 294, 296 , .... Such BusinessEntityIDs do not exist in the person. person table. They, however, do exist in the Sales.Store table. This means BusinessEntityIDs are Entity IDs and not just person IDs. Some of them, for instance, are reserved for non-person entities such as Stores.

    Wednesday, November 23, 2016 11:49 PM
  • @adamus1986, I did a quick search of past questions/answers in this Forum and found a post with a nearly identical question that was answered by (Derrick VanArnam [MSFT] ... Microsoft ... 4,467 Points ... Moderator ).  Although it is for AdventureWorks - SQL2018R2 you may find reading that post helpful to your understanding of BusinessEntityID ... link :

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/dfc1c1f6-cf33-491e-aec1-5803cb406572/explain-businessentity-tables-in-adventureworks2008r2?forum=sqlserversamples


    SOTATS, Inc.

    Thursday, November 24, 2016 12:43 AM