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

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 7
Syed Muhammad Hammad
 
Introduction to Software Engineering SE1
Introduction to Software Engineering SE1Introduction to Software Engineering SE1
Introduction to Software Engineering SE1
koolkampus
 
Software requirements engineering
Software requirements engineeringSoftware requirements engineering
Software requirements engineering
Abdul 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

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
koolkampus
 

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

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
Noriaki 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 systems
elliando dias
 
5 physical data modeling blunders 09092010
5 physical data modeling blunders 090920105 physical data modeling blunders 09092010
5 physical data modeling blunders 09092010
ERwin Modeling
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
Jotham Gadot
 
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
 
Techniques for Automated Software Evolution
Techniques for Automated Software EvolutionTechniques for Automated Software Evolution
Techniques for Automated Software Evolution
Raffi Khatchadourian
 

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

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

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

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