Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAMA - MN 11/20/2002 Designing Your Primary Keys Denise Dykstra DAMA - Minnesota November 20, 2002.

Similar presentations


Presentation on theme: "DAMA - MN 11/20/2002 Designing Your Primary Keys Denise Dykstra DAMA - Minnesota November 20, 2002."— Presentation transcript:

1 DAMA - MN 11/20/2002 Designing Your Primary Keys Denise Dykstra DAMA - Minnesota November 20, 2002

2 DAMA - MN 11/20/2002 Isn’t It Inherently Obvious? n Deliberate design n A variety of options n Pros and Cons

3 DAMA - MN 11/20/2002 Primary Key Rules n Uniquely Identify an object n Ability to Access one object n Link to another table (FK) n No Changes (updates) n Control over Value

4 DAMA - MN 11/20/2002 Considerations n Prevailing Practice at company n Conceptual vs. Surrogate n Control over value u Business supplies u Database control u Programmatic control u Insert method n Discrete vs. Non-discrete n Scope of uniqueness

5 DAMA - MN 11/20/2002 Options n Conceptual 3NF n Single column PK for every table u Surrogate u Generated n Homemade sequence or random number n Intelligent key n Record locator (OID) n High / Low value

6 DAMA - MN 11/20/2002 Surrogate Key Issues n Will it ever have “meaning”? n How is the value determined? n Partitioning ability? n Updates to data: good or bad? n Meaningless to users n Complicates the index strategy n RI could contain both meaningless key and candidate key

7 DAMA - MN 11/20/2002 Consider this…. A primary key strategy using all meaningless (surrogate, generated) keys can lead to PERFECT referential database integrity, while the data itself is meaningless.

8 DAMA - MN 11/20/2002 Using Tools n Logical models should directly support business rules n Physical models reflect the database design decisions n Problem is traceability

9 DAMA - MN 11/20/2002 Database Platforms n Oracle n IBM and DB2 flavors n Sybase n SQL Server n Others?

10 DAMA - MN 11/20/2002 It Depends! n Understanding various methods helps improve your product, whether it is a data model or a database design. n Use knowledge to achieve project objectives: speed, accuracy, abstraction

11 DAMA - MN 11/20/2002 Questions? Denise Dykstra VP Programs - DAMA Iowa d.dykstra@prodigy.net (515) 994 - 2297


Download ppt "DAMA - MN 11/20/2002 Designing Your Primary Keys Denise Dykstra DAMA - Minnesota November 20, 2002."

Similar presentations


Ads by Google