Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Developer vs. The Relational Database: How to do it right

510 views

Published on

Presented at Dev Day 2013, Sri Lanka, this presentation focuses on tips and standards an application developer can utilize when interacting with a relational database. (Slide notes included)

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

The Developer vs. The Relational Database: How to do it right

  1. 1. The Developer vs The Relational Database
  2. 2. About me MVP: SQL Server Gogula Aryalingam MCSE: Business Intelligence 6 Author: Chapter 57 Technical Architect 2011 #DevDaySL @gogula
  3. 3. Agenda Database Design Do it right: Defensive Programming Indexing considerations Best Practices Documenting #DevDaySL @gogula Utility objects
  4. 4. What’s wrong with this picture #DevDaySL @gogula
  5. 5. Here’s what… Keys/Uniqueness Constraints Normalization Data Types Naming Convention #DevDaySL @gogula
  6. 6. A better design #DevDaySL @gogula
  7. 7. Database design Code is Agile #DevDaySL Data base is brittle @gogula
  8. 8. Programming defensively 1. Define & understand assumptions 2. Modularize into fully testable and fully tested code 3. Test as many use cases as possible 4. Reuse code when feasible* #DevDaySL @gogula
  9. 9. Indexing for performance A clustered index on a heap (table) is a good idea Unique, narrow, static field Leave small tables as is Non-clustered indexes on fields used in JOINs and WHERE predicates Do not index every field Index based on usage Consider included indexes Consider filtered indexes #DevDaySL @gogula
  10. 10. Use utility objects The Numbers table, for set based: String sorting Extraction of distinct characters Generate time ranges or time slices Even something trivial like Find IDENTITY gaps generating an IP range #DevDaySL @gogula
  11. 11. Document your code Document through code Document the Why apart from the What #DevDaySL @gogula
  12. 12. Do we have time for a demo? Defensive database programming #DevDaySL @gogula
  13. 13. Questions? During the break #DevDaySL @gogula
  14. 14. THANK YOU #DevDaySL @gogula
  15. 15. Contact MVP: SQL Server @gogula Gogula Aryalingam Technical Architect #DevDaySL dbantics.wordpress.com www.sqlserveruniverse.com gogulaa@gmail .com @gogula lk.linkedin.com/i n/gogula

×