SlideShare a Scribd company logo
1 of 19
Download to read offline
Seven Deadly Sins
Seven Deadly Sins
of Database Design
                g
 Speaker: Solomon Waters
  Embarcadero Technologies
    b    d       h l i

  San Francisco SQL Server User Group
  San Francisco SQL Server User Group
               June 2010




     Mark Ginnebaugh, User Group Leader 
           mark@designmind.com
           mark@designmind com
Seven Deadly Sins of
    Database Design

    Solomon Waters
    Manager, Software Consulting
    Embarcadero Technologies
    solomon.waters@embarcadero.com




2
Common Mistakes
    Seven Deadly Sins of
    Designing Databases

    Solomon Waters
    Manager, Software Consulting
    Embarcadero Technologies
    solomon.waters@embarcadero.com




3
Agenda

    • Topic
     – Seven Deadly Sins Common Mistakes of Designing Databases


    • What we’ll learn
     –   Pitfalls of a poor database design
                       p                 g
     –   Basics of normalization
     –   How to communicate a database design effectively
     –   How to avoid some of the most common mistakes made when designing databases


    • Q&A




4
7 Deadly Sins Common Mistakes

    1. Poor or no documentation for database(s) in production
    2.
    2 Little or no normalization
    3. Not treating the data model like a living, breathing
       organism
    4. Improper storage of reference data
    5. Not using foreign keys, check constraints, and/or
       defaults in the database
    6. Not using domains and naming standards
    7. Not choosing and/or indexing keys properly




5
7 Deadly Sins Common Mistakes

    1. Poor or no documentation for database(s) in production

    • Problems
       – No central documentation of database structure(s)
       – Inaccurate documentation of database structure(s)
                                                         ( )
       – No documentation at all of database structure(s)

    • Ramifications
       – Developers, DBAs, architects, etc. are not on the same page
       – Inability to respond to change
       – No communication between developers, DBAs and architects

    • Solution
       – Start from the bottom-up, i.e. reverse engineer database(s) to build
         documentation
       – Validate models prior to publishing them
       – Use HTML reporting and Portal to communicate to users

6
7 Deadly Sins Common Mistakes

    2. Little or no normalization

    • Problems
       – Database denormalized unnecessarily (i.e. too much)
       – One large table has been built to store “everything”
                 g                                    y    g
       – Multiple values in one column or repeating values in a table

    • Ramifications
       – Performance may be better, but maintenance can become a nightmare and
         expensive
       – Lots of NULLs if specific columns don’t have values for specific rows
       – Unneeded application code needed to parse out specific values

    • Solution
       – Understand the basics of database normalization
       – Know when and how to normalize when needed
       – Industry models can help as a reference or templates

7
7 Deadly Sins Common Mistakes

    2. Little or no normalization (cont’d)

    • First Normal Form:
       – Eliminate duplicative columns and repeating values in columns

    • Second Normal Form:
       – Remove redundant data that apply to multiple columns

    • Third Normal Form:
       – Each column of a table should be dependent on the primary key




8
7 Deadly Sins Common Mistakes

Len Silverston UDM




 9
7 Deadly Sins Common Mistakes

     3. Not treating the data model like a living, breathing
          g
        organism

     • Problems
        – Modeling is done upfront then never updated once the database changes
        – Design is not completed/reviewed for flaws before moving to production
        – Changes made in production/database without updating data model

     • Ramifications
        – Implementing changes becomes problematic and expensive
        – Undocumented data can lead to security and regulatory issues
        – Design missing functionality that the business needs
              g        g             y

     • Solution
        – Plan out the design of the database conceptually, logically and physically
        – Review the design with both technical AND non-technical stake holders
                                                    non technical
        – Update the models as changes occur or better yet, update the model first!

10
7 Deadly Sins Common Mistakes
3. Not treating the data model like a living, breathing organism
   (cont’d)

• Uncontrolled Changes
      – Models become out-of-date and no one uses
        them
      – Reports from out-of-date models are useless
      – No understanding what has changed




 11
7 Deadly Sins Common Mistakes
3. Not treating the data model like a living, breathing
   organism (cont’d)

• Controlled Change
      – Define a means of communicating
        changes
      – Don't let models get out of date
      – Build a process to update models
      – Automate the process
      – Ultimately drive changes from the
        model
      – Define a means of archiving/tracking
        changes




 12
7 Deadly Sins Common Mistakes

     4. Improper storage of reference data

     • Problems
        – Reference data (codes, lists, valid values) stored in more than one place
        – Reference data stored in application, not in the database
                                     pp
        – Constraints not placed in the database

     • Ramifications
        – More work is needed when code values change
        – Database can’t enforce consistency and accuracy of values
        – Problems when data is sourced from another place

     • Solution
        – Leverage data models to store data values
        – Keep them up to date with the database




13
7 Deadly Sins Common Mistakes

     5. Not using foreign keys, check constraints, and/or
        defaults in the database

     • Problems
        – Legacy system with check constraints and foreign keys enforce by application
        – Inconsistent data because lack of constraints
        – Using NULLs instead of defaults

     • Ramifications
        – Incredibly difficult to document system for other users
        – Special code becomes the norm, not the exception
        – Poor data quality can result if standards are not followed
                     q      y

     • Solution
        – If it can be enforced in the DDL at creation time do it
        – Use tools to infer relationships


14
7 Deadly Sins Common Mistakes

     6. Not using domains and naming standards

     • Problems
        – The “same” columns defined with different data types in different tables
        – The “same” column named differently in different tables
                                              y
        – Cryptic or non-descriptive names that don’t identify the use of a column

     • Ramifications
        – Inconsistent and/or poor data quality
        – Confusion and wasted time for future developers, DBAs, architects, etc
        – Inaccurate use of column

     • Solution
        – Define a common list of domains users can leverage
        – Have a common naming standard dictionary to abbreviate logical to/from
          physical names



15
7 Deadly Sins Common Mistakes

     7. Not choosing and/or indexing keys properly

     • Problems
        – Using surrogate keys that don’t uniquely identify the data
        – Poorly choosing a p
               y         g primary key (
                                   y y (too many columns, column is updated frequently)
                                                  y                  p         q     y)
        – Not indexing foreign keys

     • Ramifications
        – Each row is unique but not the data which leads to redundant data
        – Updating or changing primary keys is not trivial
        – Performance issues when updating data or accessing related data often

     • Solution
        – Use a combination of natural and surrogate keys where applicable
        – Follow the SUM rules when choosing PKs: 1. Static 2. Unique 3. Minimal
          Columns
        – Use model validation wizard to enforce rules

16
About the Speaker

     • Solomon Waters
      – Manager, Software Consulting
      – solomon.waters@embarcadero.com


     • Resources
      –   COMPANY: http://www.embarcadero.com
      –   BLOG: http://datamodel.wordpress.com
      –   PRODUCT INFO: http://www.embarcadero.com/products/er-studio
      –   DOWNLOAD: https://downloads.embarcadero.com/free/er_studio




17
Thank you!




18
To learn more or inquire about speaking opportunities, please contact:

                             g            p
                Mark Ginnebaugh, User Group Leader
                      mark@designmind.com

More Related Content

What's hot

requirements analysis and design
requirements analysis and designrequirements analysis and design
requirements analysis and designPreeti Mishra
 
Non functional requirements framework
Non functional requirements frameworkNon functional requirements framework
Non functional requirements frameworkwweinmeyer79
 
Requirement analysis and UML modelling in Software engineering
Requirement analysis and UML modelling in Software engineeringRequirement analysis and UML modelling in Software engineering
Requirement analysis and UML modelling in Software engineeringsnehalkulkarni74
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineeringRupesh Vaishnav
 
OOAD - System Analysis and Design
OOAD - System Analysis and Design OOAD - System Analysis and Design
OOAD - System Analysis and Design Murugeswari Ravi
 
Chapter1 conventional softwaremanagement (1)
Chapter1 conventional softwaremanagement (1)Chapter1 conventional softwaremanagement (1)
Chapter1 conventional softwaremanagement (1)Jkumararaja
 
Software Project Management lecture 7
Software Project Management lecture 7Software Project Management lecture 7
Software Project Management lecture 7Syed Muhammad Hammad
 
eUnit 2 software process model
eUnit 2  software process modeleUnit 2  software process model
eUnit 2 software process modelPreeti Mishra
 
Introduction To Software Concepts Unit 1 & 2
Introduction To Software Concepts Unit 1 & 2Introduction To Software Concepts Unit 1 & 2
Introduction To Software Concepts Unit 1 & 2Raj vardhan
 
Software development planning and essentials
Software development planning and essentialsSoftware development planning and essentials
Software development planning and essentialsRajesh P
 
Software Requirement Specification
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement SpecificationNiraj Kumar
 
Introduction to Software Engineering SE1
Introduction to Software Engineering SE1Introduction to Software Engineering SE1
Introduction to Software Engineering SE1koolkampus
 
Software requirements engineering
Software requirements engineeringSoftware requirements engineering
Software requirements engineeringAbdul Basit
 

What's hot (19)

requirements analysis and design
requirements analysis and designrequirements analysis and design
requirements analysis and design
 
Non functional requirements framework
Non functional requirements frameworkNon functional requirements framework
Non functional requirements framework
 
Requirement analysis and UML modelling in Software engineering
Requirement analysis and UML modelling in Software engineeringRequirement analysis and UML modelling in Software engineering
Requirement analysis and UML modelling in Software engineering
 
Introduction
IntroductionIntroduction
Introduction
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
 
OOAD - System Analysis and Design
OOAD - System Analysis and Design OOAD - System Analysis and Design
OOAD - System Analysis and Design
 
Chapter1 conventional softwaremanagement (1)
Chapter1 conventional softwaremanagement (1)Chapter1 conventional softwaremanagement (1)
Chapter1 conventional softwaremanagement (1)
 
Software Project Management lecture 7
Software Project Management lecture 7Software Project Management lecture 7
Software Project Management lecture 7
 
Lect3
Lect3Lect3
Lect3
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
 
Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
eUnit 2 software process model
eUnit 2  software process modeleUnit 2  software process model
eUnit 2 software process model
 
Introduction To Software Concepts Unit 1 & 2
Introduction To Software Concepts Unit 1 & 2Introduction To Software Concepts Unit 1 & 2
Introduction To Software Concepts Unit 1 & 2
 
Sr. Teradata DBA
Sr. Teradata DBASr. Teradata DBA
Sr. Teradata DBA
 
Software development planning and essentials
Software development planning and essentialsSoftware development planning and essentials
Software development planning and essentials
 
Software Requirement Specification
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement Specification
 
Gururajan_new
Gururajan_newGururajan_new
Gururajan_new
 
Introduction to Software Engineering SE1
Introduction to Software Engineering SE1Introduction to Software Engineering SE1
Introduction to Software Engineering SE1
 
Software requirements engineering
Software requirements engineeringSoftware requirements engineering
Software requirements engineering
 

Viewers also liked

Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke LonerganLuke Lonergan
 
MDM Mistakes & How to Avoid Them!
MDM Mistakes & How to Avoid Them!MDM Mistakes & How to Avoid Them!
MDM Mistakes & How to Avoid Them!Alan Lee White
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams SimplifiedPuneet Arora
 
Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3) Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3) Aey Unthika
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
GENERATIONS OF COMPUTER
GENERATIONS OF COMPUTERGENERATIONS OF COMPUTER
GENERATIONS OF COMPUTERRajat More
 

Viewers also liked (8)

ER/Studio Data Architect Datasheet
ER/Studio Data Architect DatasheetER/Studio Data Architect Datasheet
ER/Studio Data Architect Datasheet
 
Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke Lonergan
 
MDM Mistakes & How to Avoid Them!
MDM Mistakes & How to Avoid Them!MDM Mistakes & How to Avoid Them!
MDM Mistakes & How to Avoid Them!
 
Logical DB Design (OOP)
Logical DB Design (OOP)Logical DB Design (OOP)
Logical DB Design (OOP)
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3) Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3)
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
GENERATIONS OF COMPUTER
GENERATIONS OF COMPUTERGENERATIONS OF COMPUTER
GENERATIONS OF COMPUTER
 

Similar to Microsoft SQL Server Seven Deadly Sins of Database Design

Data modeling tips from the trenches
Data modeling tips from the trenchesData modeling tips from the trenches
Data modeling tips from the trenchesTerry Bunio
 
Relational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsRelational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsIke Ellis
 
Blackboard DevCon 2011 - Developing B2 for Performance and Scalability
Blackboard DevCon 2011 - Developing B2 for Performance and ScalabilityBlackboard DevCon 2011 - Developing B2 for Performance and Scalability
Blackboard DevCon 2011 - Developing B2 for Performance and ScalabilityNoriaki Tatsumi
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)Ben Stopford
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systemselliando dias
 
5 physical data modeling blunders 09092010
5 physical data modeling blunders 090920105 physical data modeling blunders 09092010
5 physical data modeling blunders 09092010ERwin Modeling
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011Mark Ginnebaugh
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Vijayananda Ratnam Ch
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And DesignLijo Stalin
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineImaginet
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentKristine Hejna
 
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...DataStax
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programmingJuggernaut Liu
 
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey Kharlamov
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey KharlamovRUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey Kharlamov
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey KharlamovBig Data Spain
 
Net essentials6e ch13
Net essentials6e ch13Net essentials6e ch13
Net essentials6e ch13APSU
 
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve ThemCase study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve ThemRed Gate Software
 
Techniques for Automated Software Evolution
Techniques for Automated Software EvolutionTechniques for Automated Software Evolution
Techniques for Automated Software EvolutionRaffi Khatchadourian
 
Software Engineering an Introduction
Software Engineering an IntroductionSoftware Engineering an Introduction
Software Engineering an IntroductionAjit Nayak
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineeringAlonzee Tash
 

Similar to Microsoft SQL Server Seven Deadly Sins of Database Design (20)

Data modeling tips from the trenches
Data modeling tips from the trenchesData modeling tips from the trenches
Data modeling tips from the trenches
 
Relational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsRelational data modeling trends for transactional applications
Relational data modeling trends for transactional applications
 
Blackboard DevCon 2011 - Developing B2 for Performance and Scalability
Blackboard DevCon 2011 - Developing B2 for Performance and ScalabilityBlackboard DevCon 2011 - Developing B2 for Performance and Scalability
Blackboard DevCon 2011 - Developing B2 for Performance and Scalability
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
5 physical data modeling blunders 09092010
5 physical data modeling blunders 090920105 physical data modeling blunders 09092010
5 physical data modeling blunders 09092010
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And Design
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom Line
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability Assessment
 
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...
Tales From the Field: The Wrong Way of Using Cassandra (Carlos Rolo, Pythian)...
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programming
 
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey Kharlamov
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey KharlamovRUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey Kharlamov
RUNNING A PETASCALE DATA SYSTEM: GOOD, BAD, AND UGLY CHOICES by Alexey Kharlamov
 
Net essentials6e ch13
Net essentials6e ch13Net essentials6e ch13
Net essentials6e ch13
 
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve ThemCase study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
 
Techniques for Automated Software Evolution
Techniques for Automated Software EvolutionTechniques for Automated Software Evolution
Techniques for Automated Software Evolution
 
Software Engineering an Introduction
Software Engineering an IntroductionSoftware Engineering an Introduction
Software Engineering an Introduction
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineering
 

More from Mark Ginnebaugh

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Mark Ginnebaugh
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Mark Ginnebaugh
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataMark Ginnebaugh
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMark Ginnebaugh
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerMark Ginnebaugh
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsMark Ginnebaugh
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Mark Ginnebaugh
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMark Ginnebaugh
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopMark Ginnebaugh
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMark Ginnebaugh
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Mark Ginnebaugh
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMark Ginnebaugh
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Mark Ginnebaugh
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012Mark Ginnebaugh
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Mark Ginnebaugh
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesMark Ginnebaugh
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Mark Ginnebaugh
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMark Ginnebaugh
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMark Ginnebaugh
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMark Ginnebaugh
 

More from Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Microsoft SQL Server Seven Deadly Sins of Database Design

  • 1. Seven Deadly Sins Seven Deadly Sins of Database Design g Speaker: Solomon Waters Embarcadero Technologies b d h l i San Francisco SQL Server User Group San Francisco SQL Server User Group June 2010 Mark Ginnebaugh, User Group Leader  mark@designmind.com mark@designmind com
  • 2. Seven Deadly Sins of Database Design Solomon Waters Manager, Software Consulting Embarcadero Technologies solomon.waters@embarcadero.com 2
  • 3. Common Mistakes Seven Deadly Sins of Designing Databases Solomon Waters Manager, Software Consulting Embarcadero Technologies solomon.waters@embarcadero.com 3
  • 4. Agenda • Topic – Seven Deadly Sins Common Mistakes of Designing Databases • What we’ll learn – Pitfalls of a poor database design p g – Basics of normalization – How to communicate a database design effectively – How to avoid some of the most common mistakes made when designing databases • Q&A 4
  • 5. 7 Deadly Sins Common Mistakes 1. Poor or no documentation for database(s) in production 2. 2 Little or no normalization 3. Not treating the data model like a living, breathing organism 4. Improper storage of reference data 5. Not using foreign keys, check constraints, and/or defaults in the database 6. Not using domains and naming standards 7. Not choosing and/or indexing keys properly 5
  • 6. 7 Deadly Sins Common Mistakes 1. Poor or no documentation for database(s) in production • Problems – No central documentation of database structure(s) – Inaccurate documentation of database structure(s) ( ) – No documentation at all of database structure(s) • Ramifications – Developers, DBAs, architects, etc. are not on the same page – Inability to respond to change – No communication between developers, DBAs and architects • Solution – Start from the bottom-up, i.e. reverse engineer database(s) to build documentation – Validate models prior to publishing them – Use HTML reporting and Portal to communicate to users 6
  • 7. 7 Deadly Sins Common Mistakes 2. Little or no normalization • Problems – Database denormalized unnecessarily (i.e. too much) – One large table has been built to store “everything” g y g – Multiple values in one column or repeating values in a table • Ramifications – Performance may be better, but maintenance can become a nightmare and expensive – Lots of NULLs if specific columns don’t have values for specific rows – Unneeded application code needed to parse out specific values • Solution – Understand the basics of database normalization – Know when and how to normalize when needed – Industry models can help as a reference or templates 7
  • 8. 7 Deadly Sins Common Mistakes 2. Little or no normalization (cont’d) • First Normal Form: – Eliminate duplicative columns and repeating values in columns • Second Normal Form: – Remove redundant data that apply to multiple columns • Third Normal Form: – Each column of a table should be dependent on the primary key 8
  • 9. 7 Deadly Sins Common Mistakes Len Silverston UDM 9
  • 10. 7 Deadly Sins Common Mistakes 3. Not treating the data model like a living, breathing g organism • Problems – Modeling is done upfront then never updated once the database changes – Design is not completed/reviewed for flaws before moving to production – Changes made in production/database without updating data model • Ramifications – Implementing changes becomes problematic and expensive – Undocumented data can lead to security and regulatory issues – Design missing functionality that the business needs g g y • Solution – Plan out the design of the database conceptually, logically and physically – Review the design with both technical AND non-technical stake holders non technical – Update the models as changes occur or better yet, update the model first! 10
  • 11. 7 Deadly Sins Common Mistakes 3. Not treating the data model like a living, breathing organism (cont’d) • Uncontrolled Changes – Models become out-of-date and no one uses them – Reports from out-of-date models are useless – No understanding what has changed 11
  • 12. 7 Deadly Sins Common Mistakes 3. Not treating the data model like a living, breathing organism (cont’d) • Controlled Change – Define a means of communicating changes – Don't let models get out of date – Build a process to update models – Automate the process – Ultimately drive changes from the model – Define a means of archiving/tracking changes 12
  • 13. 7 Deadly Sins Common Mistakes 4. Improper storage of reference data • Problems – Reference data (codes, lists, valid values) stored in more than one place – Reference data stored in application, not in the database pp – Constraints not placed in the database • Ramifications – More work is needed when code values change – Database can’t enforce consistency and accuracy of values – Problems when data is sourced from another place • Solution – Leverage data models to store data values – Keep them up to date with the database 13
  • 14. 7 Deadly Sins Common Mistakes 5. Not using foreign keys, check constraints, and/or defaults in the database • Problems – Legacy system with check constraints and foreign keys enforce by application – Inconsistent data because lack of constraints – Using NULLs instead of defaults • Ramifications – Incredibly difficult to document system for other users – Special code becomes the norm, not the exception – Poor data quality can result if standards are not followed q y • Solution – If it can be enforced in the DDL at creation time do it – Use tools to infer relationships 14
  • 15. 7 Deadly Sins Common Mistakes 6. Not using domains and naming standards • Problems – The “same” columns defined with different data types in different tables – The “same” column named differently in different tables y – Cryptic or non-descriptive names that don’t identify the use of a column • Ramifications – Inconsistent and/or poor data quality – Confusion and wasted time for future developers, DBAs, architects, etc – Inaccurate use of column • Solution – Define a common list of domains users can leverage – Have a common naming standard dictionary to abbreviate logical to/from physical names 15
  • 16. 7 Deadly Sins Common Mistakes 7. Not choosing and/or indexing keys properly • Problems – Using surrogate keys that don’t uniquely identify the data – Poorly choosing a p y g primary key ( y y (too many columns, column is updated frequently) y p q y) – Not indexing foreign keys • Ramifications – Each row is unique but not the data which leads to redundant data – Updating or changing primary keys is not trivial – Performance issues when updating data or accessing related data often • Solution – Use a combination of natural and surrogate keys where applicable – Follow the SUM rules when choosing PKs: 1. Static 2. Unique 3. Minimal Columns – Use model validation wizard to enforce rules 16
  • 17. About the Speaker • Solomon Waters – Manager, Software Consulting – solomon.waters@embarcadero.com • Resources – COMPANY: http://www.embarcadero.com – BLOG: http://datamodel.wordpress.com – PRODUCT INFO: http://www.embarcadero.com/products/er-studio – DOWNLOAD: https://downloads.embarcadero.com/free/er_studio 17
  • 19. To learn more or inquire about speaking opportunities, please contact: g p Mark Ginnebaugh, User Group Leader mark@designmind.com