Re: Table Structure ordering of columns



Leslie,

So, you're using a compound Primary key?

The reason I'm asking is this... If you have an inventory system (as
example) that keeps the same items at different locations, I would want the
primary key on the unique item identifier value... (that may be a SKU
number)... But that same SKU may also exist at another location (another
database)... To combine all location databases would then create a
problem...

So, I identify each location with a unique 4 character value... I then
combine this 4 character value with the SKU value to create my primary
key... it is not a "compound key".... but the value in my primary key is
actually the combined value of Location and SKU. This way, I avoid
compound primary Key fields

Now, when seperate databases are compined, there will never be a primary key
conflict.

Do you do it this way, or actually use a compound primary key?

--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney


.



Relevant Pages

  • Re: Table Structure ordering of columns
    ... you're using a compound Primary key? ... Now, when seperate databases are compined, there will never be a primary ... The DatabaseID is the Date and time in numeric format. ...
    (comp.databases.paradox)
  • Re: Using seek to find if a record exists
    ... a compound primary key cannot have Nulls in any of the fields, ... Using a Birthdate field as part of a primary key would not be a poor ...
    (comp.databases.ms-access)
  • Re: not allow for duplicate for a combination of two fields
    ... > I did what you said but the clientid on its own is not unique - it is ... Karl did not suggest a compound Primary Key. ... with its unique property set to yes. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Cascade updates on primary keys..
    ... When the primary key is used as a foreign key in another table, ... >> int identity field and use that as the fk to the other table. ... >3) Primary keys should be immutable, and should never use cascade updates. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cascade updates on primary keys..
    ... When the primary key is used as a foreign key in another table, ... >> int identity field and use that as the fk to the other table. ... >3) Primary keys should be immutable, and should never use cascade updates. ...
    (microsoft.public.dotnet.languages.vb)