Physical Data Modeling BlundersAnd How to Avoid ThemKaren LopezSr. Project Manager
AbstractWhat’s going on in your physical data model? How many people canor will update it to match the reality of what’s g...
Speaker BioKaren López is a principalconsultant at InfoAdvisors. Shespecializes in the practicalapplication of data manage...
AgendaThe ProblemBlunders, FAILs, D’Oh’s, Faults and WTHs?10 Tips PAGE 4
POLL: Who Are You?
POLL: Physical Model Much?
The Problem PAGE 7
Confirmation                               Number     Assuming Numbers are NumbersPAGE 8
D’OH!•Leading Zeros•Non-Numeric•Special Characters•Sorting Issues•Externally Managed Numbers PAGE 9
Avoid it1. Use a numeric-ish datatype when   there’s math involved.2. Do your research3. If it’s externally managed data, ...
Choosing the Wrong Primary KeyPAGE 11
32 + 8 + 32 + 32 + (0 to 22) = A really big key              that only a Data Architect could lovePAGE 12
Avoid it• Establish Primary Key standards and styles• Smaller PKs lead to smaller indexes and  smaller databases. Take adv...
Applying Surrogate Keys IncorrectlyPAGE 14
Applying a Surrogate Key PAGE 15
WTH? PAGE 16
Alternate Key PAGE 17
Avoid it• Establish Primary Key standards and styles• Smaller PKs lead to smaller indexes and  smaller databases. Take adv...
Turning off RI for DevelopmentPAGE 19
Blunder PAGE 20
RI = FK  PAGE 21
Avoid it• Educate team on the risks & nearly universal outcome of turning  off RI• Generate RI in every script            ...
Using the DefaultsPAGE 23
Defaults • Defaults <> Best Practices • Product Defaults aren’t YOUR defaults • Defaults might even be…faulty.  PAGE 24
DefaultingFaults PAGE 25
Avoid it  • Create a DA Test database…and use it.  • Test Generation Options to Test DB with    Data  • Generate Test Scri...
Other Blunders• Using the wrong tool            •   Hand generating scripts• Too much Subtyping              •   Failing t...
10 Tips for Avoiding Physical Modeling Blunders1. Understand cost, benefit and risk2. Get formal training on target techno...
10 Tips for Avoiding Physical Modeling Blunders6. Profile Source Data7. Build Test Databases, with Data8. Test Scripts9. C...
Summary    1.Don’t assume that             numbers are….numbers           2.Choose the right primary             key      ...
Questions?Feedback, questions,comments are always                     Karen@InfoAdvisors.comappreciated.http://www.speaker...
Upcoming SlideShare
Loading in …5
×

5 physical data modeling blunders 09092010

909 views
819 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
909
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

5 physical data modeling blunders 09092010

  1. 1. Physical Data Modeling BlundersAnd How to Avoid ThemKaren LopezSr. Project Manager
  2. 2. AbstractWhat’s going on in your physical data model? How many people canor will update it to match the reality of what’s going on in yourdatabases? Who decides what goes into the physical model? In thispresentation we discuss 5 physical data modeling mistakes that costyou dearly: performance snags, development delays, bugs andprofessional respect. Data Architects are often tasked to preparefirst-cut physical data models, yet these skills usually overlap those ofDBAs and Developers and this overlap can lead to contention,confusion, and complacency.With this presentation, you’ll learn about the 5 blunders, how to findthem, plus many tips on how to avoid them. PAGE 2
  3. 3. Speaker BioKaren López is a principalconsultant at InfoAdvisors. Shespecializes in the practicalapplication of data managementprinciples. Karen is also theListMistress and moderator ofthe InfoAdvisors DiscussionGroups at www.infoadvisors.comand other online communities. PAGE 3
  4. 4. AgendaThe ProblemBlunders, FAILs, D’Oh’s, Faults and WTHs?10 Tips PAGE 4
  5. 5. POLL: Who Are You?
  6. 6. POLL: Physical Model Much?
  7. 7. The Problem PAGE 7
  8. 8. Confirmation Number Assuming Numbers are NumbersPAGE 8
  9. 9. D’OH!•Leading Zeros•Non-Numeric•Special Characters•Sorting Issues•Externally Managed Numbers PAGE 9
  10. 10. Avoid it1. Use a numeric-ish datatype when there’s math involved.2. Do your research3. If it’s externally managed data, its format or composition could change at any time. Anticipate that.4. Anticipate leading zeros.5. Anticipate significant formatting, characters & other tricks. PAGE 10
  11. 11. Choosing the Wrong Primary KeyPAGE 11
  12. 12. 32 + 8 + 32 + 32 + (0 to 22) = A really big key that only a Data Architect could lovePAGE 12
  13. 13. Avoid it• Establish Primary Key standards and styles• Smaller PKs lead to smaller indexes and smaller databases. Take advantage of that• Choose PKs that do not change when data changes• Understand how Identity columns work PAGE 13
  14. 14. Applying Surrogate Keys IncorrectlyPAGE 14
  15. 15. Applying a Surrogate Key PAGE 15
  16. 16. WTH? PAGE 16
  17. 17. Alternate Key PAGE 17
  18. 18. Avoid it• Establish Primary Key standards and styles• Smaller PKs lead to smaller indexes and smaller databases. Take advantage of that.• Don’t forget the Business Key• Choose PKs that do not change when data changes• Understand how Identity columns work PAGE 18
  19. 19. Turning off RI for DevelopmentPAGE 19
  20. 20. Blunder PAGE 20
  21. 21. RI = FK PAGE 21
  22. 22. Avoid it• Educate team on the risks & nearly universal outcome of turning off RI• Generate RI in every script • Develop test data • Develop scripts for loading data • Ensure team has easy access to Data Models PAGE 22
  23. 23. Using the DefaultsPAGE 23
  24. 24. Defaults • Defaults <> Best Practices • Product Defaults aren’t YOUR defaults • Defaults might even be…faulty. PAGE 24
  25. 25. DefaultingFaults PAGE 25
  26. 26. Avoid it • Create a DA Test database…and use it. • Test Generation Options to Test DB with Data • Generate Test Scripts, Varying Options • Review options with DBAs and Developers. • Choose Defaults, don’t default them • Save your Default Set PAGE 26
  27. 27. Other Blunders• Using the wrong tool • Hand generating scripts• Too much Subtyping • Failing to report issues• Logical Flexible hierarchies • Denormalizing too soon• Wrong Datatypes • Failing to use constraints• Dual updates • Making performance more• Forgetting to manage the data important than integrity• Duplicate Indexes • Completely separate logical• Ignoring Clustering model• Using overly generic design • Failing to take into account patterns whole environment.• Column order • Applying surrogate keys where they have no business• Silly Long Names • Not testing your design• Failing to compare • Ignoring reference data design PAGE 27
  28. 28. 10 Tips for Avoiding Physical Modeling Blunders1. Understand cost, benefit and risk2. Get formal training on target technologies3. Work near your DBAs and Developers4. Ask DBAs about trade-offs, not just solutions5. Build portfolio of performance vs. integrity trade-offs PAGE 28
  29. 29. 10 Tips for Avoiding Physical Modeling Blunders6. Profile Source Data7. Build Test Databases, with Data8. Test Scripts9. Compare, Compare, Compare…then Compare some More.10.Get More Training. PAGE 29
  30. 30. Summary 1.Don’t assume that numbers are….numbers 2.Choose the right primary key 3.Apply surrogate keys correctly 4.Keep RI turned on 5.Architect, don’t default PAGE 30
  31. 31. Questions?Feedback, questions,comments are always Karen@InfoAdvisors.comappreciated.http://www.speakerrate.com/karenlopez PAGE 31

×