Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Answered BusinessEntityID - Need help understanding.

  • 8 февраля 2009 г. 9:56
     
     
    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.

Все ответы

  • 9 февраля 2009 г. 23:12
     
     Отвечено
    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
  • 26 мая 2013 г. 4:53
     
     
    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."


    • Изменено emil_tr 26 мая 2013 г. 4:57
    •