What is the best schema design for child collection with a "primary" entity

Posted by erg39 on Stack Overflow See other posts from Stack Overflow or by erg39
Published on 2010-05-18T04:13:52Z Indexed on 2010/05/18 4:20 UTC
Read the original article Hit count: 237

Here is the scenario: You have a Persons table with a one-to-many relationship with an Addresses table, where one of the Address rows is the "primary" Address.

Is it better in a normalized schema to

  • Use a Persons.PrimaryAddressID to access the "primary" Address for a Person

or

  • Use an Addresses.IsPrimary bit column to reference the "primary" Address for a Person via Addresses.PersonID

or

  • Other

and why?

© Stack Overflow or respective owner

Related posts about database-design

Related posts about database-schema