SlideShare a Scribd company logo
Stop Bad Data in its
OLTP Tracks
Denise McInerney
Silicon Valley SQL Server Users Group
June 19, 2012
Copyright © 2012 Denise McInerney
Agenda
Topics
 What is “bad” data?
 Table design
 NULL pitfalls
 Constraints: friend or foe?
 Hardcoding
 Transactions
 Garbage in
 Testing
 Change Management & Controls
Silicon Valley SQL Server Users Group
June 19, 2012 2Copyright © 2012 Denise McInerney
Who am I?
• SQL Server DBA since 1998
 Web-based OLTP applications
 Focus on design and
performance tuning
• Staff DBA Intuit
• Director, PASS Board
• Virtual Chapters
• Women in Tech VC
• Contact me:
 denise.mcinerney@sqlpass.org
 denise_mcinerney@intuit.com
 @denisemc06
Copyright © 2012 Denise McInerney 3
Silicon Valley SQL Server Users Group
June 19, 2012
My Framework
 DBA = data steward
 Backups, security—what about quality?
 DBA <> Developer
 Don‟t count on ETL for everything
Silicon Valley SQL Server Users Group
June 19, 2012 4Copyright © 2012 Denise McInerney
Define “bad” data
 Inaccurate
 Missing
 Misleading
 Causes bugs
 Breaks reports
 Can compromise security
 Impacts customers
 Impacts business
Silicon Valley SQL Server Users Group
June 19, 2012 5Copyright © 2012 Denise McInerney
Design
 Have one—even in an “agile” shop
 It‟s a system, not a collection of tables
 Don‟t be lazy
 Bad design invites bad data
Silicon Valley SQL Server Users Group
June 19, 2012 6Copyright © 2012 Denise McInerney
Design
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 7
Bad Design Examples
Silicon Valley SQL Server Users Group
June 19, 2012 8Copyright © 2012 Denise McInerney
Pitfalls of NULL
 What is NULL?
 Missing data
 Unknown in comparisons
 NULL <> „‟ or “”
 NULL <> 0
 NULL can be valid
 But application can‟t handle it
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 9
NULL Examples
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 10
Constraints: Your Frenemies
 CHECK
 INSERT/UPDATE fails if condition evaluates to
FALSE
 Comparisons to NULL result in unknown
 Can use to enforce logic, business rules
 DEFAULT
 Can prevent some bugs
 Won‟t solve all your problems
 Can be “forgotten”
 100% of records have default value
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 11
Constraint Examples
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 12
Hardcoding
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 13
Transactions
 Understand them
 Don‟t assume others understand them
 BEGIN TRAN…COMMIT TRAN is not
enough
 Failed INSERT…the silent killer
Silicon Valley SQL Server Users Group
June 19, 2012 14Copyright © 2012 Denise McInerney
Transactions
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 15
Garbage In
 Many ways things go wrong
 Concatenation
 Recycled identifiers
 Duplicates
 Honor the schema
 Be consistent
 Fix it on the way in
Silicon Valley SQL Server Users Group
June 19, 2012 16Copyright © 2012 Denise McInerney
Garbage In
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 17
Testing
 Database is not exempt
 Not just the happy path
 Look at the data!
 People
 Machines
Silicon Valley SQL Server Users Group
June 19, 2012 18Copyright © 2012 Denise McInerney
Change Control
 Lots of ways data gets IN
 Code—application & SQL
 Version control & Management
 Scripts
 GUI (!)
 People
 Everyone takes short cuts
 Every check-in potential data bug
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 19
There is no “I” in “Bad Data”
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 20
Pessimism
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 21
Vigilance
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 22
Summary
 DBA‟s job to guard data quality
 Design, Plan, Process, Controls
 Engage Others
 Keep your guard up
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 23
Q & A
Silicon Valley SQL Server Users Group
June 19, 2012 Copyright © 2012 Denise McInerney 24

More Related Content

Viewers also liked

WilmerFrancoApplicationHSEPhotos (1)
WilmerFrancoApplicationHSEPhotos (1)WilmerFrancoApplicationHSEPhotos (1)
WilmerFrancoApplicationHSEPhotos (1)
WILMER FRANCO
 
Question 7
Question 7Question 7
Question 7
jonsharman
 
Detector de linea
Detector de lineaDetector de linea
Detector de linea
camilo802
 
TIC
TICTIC
Análisis práctico de un ensayo clínico: en qué tengo que fijarme
Análisis práctico de un ensayo clínico: en qué tengo que fijarmeAnálisis práctico de un ensayo clínico: en qué tengo que fijarme
Análisis práctico de un ensayo clínico: en qué tengo que fijarme
Antonio J Cartón, MD, PhD
 
Guillin regola dei_terzi
Guillin regola dei_terziGuillin regola dei_terzi
Guillin regola dei_terzi
Guillin93
 
ITIL
ITILITIL
Hipertensión pulmonar en la edad pediátrica: enfermedades específicas
Hipertensión pulmonar en la edad pediátrica: enfermedades específicasHipertensión pulmonar en la edad pediátrica: enfermedades específicas
Hipertensión pulmonar en la edad pediátrica: enfermedades específicas
Antonio J Cartón, MD, PhD
 
HF 410
HF 410HF 410
HF 410
Imre Mate
 
IT In Europe
IT In EuropeIT In Europe
IT In Europe
harsimran768
 
A case for women in technology
A case for women in technologyA case for women in technology
A case for women in technology
Denise McInerney
 
Decisiones de financiamiento - Octubre 2015
Decisiones de financiamiento - Octubre 2015Decisiones de financiamiento - Octubre 2015
Decisiones de financiamiento - Octubre 2015
finanzas_uca
 
Swap
SwapSwap
Swap
luis-18
 
1 proteccion y conservacion de los alimentos
1 proteccion y conservacion de los alimentos1 proteccion y conservacion de los alimentos
1 proteccion y conservacion de los alimentos
Luis Castaño
 

Viewers also liked (14)

WilmerFrancoApplicationHSEPhotos (1)
WilmerFrancoApplicationHSEPhotos (1)WilmerFrancoApplicationHSEPhotos (1)
WilmerFrancoApplicationHSEPhotos (1)
 
Question 7
Question 7Question 7
Question 7
 
Detector de linea
Detector de lineaDetector de linea
Detector de linea
 
TIC
TICTIC
TIC
 
Análisis práctico de un ensayo clínico: en qué tengo que fijarme
Análisis práctico de un ensayo clínico: en qué tengo que fijarmeAnálisis práctico de un ensayo clínico: en qué tengo que fijarme
Análisis práctico de un ensayo clínico: en qué tengo que fijarme
 
Guillin regola dei_terzi
Guillin regola dei_terziGuillin regola dei_terzi
Guillin regola dei_terzi
 
ITIL
ITILITIL
ITIL
 
Hipertensión pulmonar en la edad pediátrica: enfermedades específicas
Hipertensión pulmonar en la edad pediátrica: enfermedades específicasHipertensión pulmonar en la edad pediátrica: enfermedades específicas
Hipertensión pulmonar en la edad pediátrica: enfermedades específicas
 
HF 410
HF 410HF 410
HF 410
 
IT In Europe
IT In EuropeIT In Europe
IT In Europe
 
A case for women in technology
A case for women in technologyA case for women in technology
A case for women in technology
 
Decisiones de financiamiento - Octubre 2015
Decisiones de financiamiento - Octubre 2015Decisiones de financiamiento - Octubre 2015
Decisiones de financiamiento - Octubre 2015
 
Swap
SwapSwap
Swap
 
1 proteccion y conservacion de los alimentos
1 proteccion y conservacion de los alimentos1 proteccion y conservacion de los alimentos
1 proteccion y conservacion de los alimentos
 

Similar to Stop Bad Data in its OLTP Tracks

Breaking Microsoft Dynamics Great Plains
Breaking Microsoft Dynamics Great PlainsBreaking Microsoft Dynamics Great Plains
Breaking Microsoft Dynamics Great Plains
surferdave71
 
Developing Data Products
Developing Data ProductsDeveloping Data Products
Developing Data Products
Peter Skomoroch
 
Implementing SugarCRM for Australia's premiere business network
Implementing SugarCRM for Australia's premiere business networkImplementing SugarCRM for Australia's premiere business network
Implementing SugarCRM for Australia's premiere business network
ericavorsay
 
What Is SQL Server 2012?
What Is SQL Server 2012? What Is SQL Server 2012?
What Is SQL Server 2012?
LearnItFirst.com
 
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
SugarCRM
 
Dynamics Day 2017 Melbourne - transform you decision making
Dynamics Day 2017 Melbourne - transform you decision makingDynamics Day 2017 Melbourne - transform you decision making
Dynamics Day 2017 Melbourne - transform you decision making
Empired
 
Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...
SolarWinds
 
Software Defined Networking - Next-Gen Enterprise Networks
Software Defined Networking - Next-Gen Enterprise NetworksSoftware Defined Networking - Next-Gen Enterprise Networks
Software Defined Networking - Next-Gen Enterprise Networks
Open Networking Summits
 
Mary Ann Redd CCNA
Mary Ann Redd CCNAMary Ann Redd CCNA
ACL Presentation
ACL PresentationACL Presentation
ACL Presentation
Alex Psarras
 
ACL Presentation
ACL PresentationACL Presentation
ACL Presentation
DataConsulting
 
SQL Server DBA training in Hyderabad in DBA School
SQL Server DBA training in Hyderabad in DBA SchoolSQL Server DBA training in Hyderabad in DBA School
SQL Server DBA training in Hyderabad in DBA School
satya seelam
 
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
Step-by-Step Cookbook for Identifying and Tuning SQL ProblemsStep-by-Step Cookbook for Identifying and Tuning SQL Problems
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
Minh237839
 
Big Data Ecosystem @ LinkedIn
Big Data Ecosystem @ LinkedInBig Data Ecosystem @ LinkedIn
Big Data Ecosystem @ LinkedIn
Minh-Hoang Nguyen
 
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
SugarCRM
 
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
JISC RSC Eastern
 
Mary Ann Redd CCNA2015
Mary Ann Redd CCNA2015Mary Ann Redd CCNA2015
Mary Ann Redd CCNA2015
Mary Ann Redd / CCNA / PARALEGAL
 
Mary Ann Redd CCNA 2015
Mary Ann Redd CCNA 2015Mary Ann Redd CCNA 2015
Mary Ann Redd CCNA 2015
Mary Ann Redd / CCNA / PARALEGAL
 
What Is My Enterprise Data Maturity 2021
What Is My Enterprise Data Maturity 2021What Is My Enterprise Data Maturity 2021
What Is My Enterprise Data Maturity 2021
DATAVERSITY
 
Nagios Conference 2012 - Mike Weber - disaster
Nagios Conference 2012 - Mike Weber - disasterNagios Conference 2012 - Mike Weber - disaster
Nagios Conference 2012 - Mike Weber - disaster
Nagios
 

Similar to Stop Bad Data in its OLTP Tracks (20)

Breaking Microsoft Dynamics Great Plains
Breaking Microsoft Dynamics Great PlainsBreaking Microsoft Dynamics Great Plains
Breaking Microsoft Dynamics Great Plains
 
Developing Data Products
Developing Data ProductsDeveloping Data Products
Developing Data Products
 
Implementing SugarCRM for Australia's premiere business network
Implementing SugarCRM for Australia's premiere business networkImplementing SugarCRM for Australia's premiere business network
Implementing SugarCRM for Australia's premiere business network
 
What Is SQL Server 2012?
What Is SQL Server 2012? What Is SQL Server 2012?
What Is SQL Server 2012?
 
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
CRM 101: Session 6: Evaluating, Selecting, and Deploying the Right CRM Soluti...
 
Dynamics Day 2017 Melbourne - transform you decision making
Dynamics Day 2017 Melbourne - transform you decision makingDynamics Day 2017 Melbourne - transform you decision making
Dynamics Day 2017 Melbourne - transform you decision making
 
Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...
 
Software Defined Networking - Next-Gen Enterprise Networks
Software Defined Networking - Next-Gen Enterprise NetworksSoftware Defined Networking - Next-Gen Enterprise Networks
Software Defined Networking - Next-Gen Enterprise Networks
 
Mary Ann Redd CCNA
Mary Ann Redd CCNAMary Ann Redd CCNA
Mary Ann Redd CCNA
 
ACL Presentation
ACL PresentationACL Presentation
ACL Presentation
 
ACL Presentation
ACL PresentationACL Presentation
ACL Presentation
 
SQL Server DBA training in Hyderabad in DBA School
SQL Server DBA training in Hyderabad in DBA SchoolSQL Server DBA training in Hyderabad in DBA School
SQL Server DBA training in Hyderabad in DBA School
 
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
Step-by-Step Cookbook for Identifying and Tuning SQL ProblemsStep-by-Step Cookbook for Identifying and Tuning SQL Problems
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
 
Big Data Ecosystem @ LinkedIn
Big Data Ecosystem @ LinkedInBig Data Ecosystem @ LinkedIn
Big Data Ecosystem @ LinkedIn
 
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
Solving Biz Problems with SugarExchange: Session 9: How to Run Contributor Ca...
 
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
Jisc RSC Eastern Microsoft Briefing - Ridgian BI Jisc RSC Eastern 19th march ...
 
Mary Ann Redd CCNA2015
Mary Ann Redd CCNA2015Mary Ann Redd CCNA2015
Mary Ann Redd CCNA2015
 
Mary Ann Redd CCNA 2015
Mary Ann Redd CCNA 2015Mary Ann Redd CCNA 2015
Mary Ann Redd CCNA 2015
 
What Is My Enterprise Data Maturity 2021
What Is My Enterprise Data Maturity 2021What Is My Enterprise Data Maturity 2021
What Is My Enterprise Data Maturity 2021
 
Nagios Conference 2012 - Mike Weber - disaster
Nagios Conference 2012 - Mike Weber - disasterNagios Conference 2012 - Mike Weber - disaster
Nagios Conference 2012 - Mike Weber - disaster
 

Recently uploaded

Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
hyfjgavov
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
xclpvhuk
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
a9qfiubqu
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
aqzctr7x
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docxDATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
SaffaIbrahim1
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Kaxil Naik
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
ElizabethGarrettChri
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 

Recently uploaded (20)

Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docxDATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 

Stop Bad Data in its OLTP Tracks

  • 1. Stop Bad Data in its OLTP Tracks Denise McInerney Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney
  • 2. Agenda Topics  What is “bad” data?  Table design  NULL pitfalls  Constraints: friend or foe?  Hardcoding  Transactions  Garbage in  Testing  Change Management & Controls Silicon Valley SQL Server Users Group June 19, 2012 2Copyright © 2012 Denise McInerney
  • 3. Who am I? • SQL Server DBA since 1998  Web-based OLTP applications  Focus on design and performance tuning • Staff DBA Intuit • Director, PASS Board • Virtual Chapters • Women in Tech VC • Contact me:  denise.mcinerney@sqlpass.org  denise_mcinerney@intuit.com  @denisemc06 Copyright © 2012 Denise McInerney 3 Silicon Valley SQL Server Users Group June 19, 2012
  • 4. My Framework  DBA = data steward  Backups, security—what about quality?  DBA <> Developer  Don‟t count on ETL for everything Silicon Valley SQL Server Users Group June 19, 2012 4Copyright © 2012 Denise McInerney
  • 5. Define “bad” data  Inaccurate  Missing  Misleading  Causes bugs  Breaks reports  Can compromise security  Impacts customers  Impacts business Silicon Valley SQL Server Users Group June 19, 2012 5Copyright © 2012 Denise McInerney
  • 6. Design  Have one—even in an “agile” shop  It‟s a system, not a collection of tables  Don‟t be lazy  Bad design invites bad data Silicon Valley SQL Server Users Group June 19, 2012 6Copyright © 2012 Denise McInerney
  • 7. Design Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 7
  • 8. Bad Design Examples Silicon Valley SQL Server Users Group June 19, 2012 8Copyright © 2012 Denise McInerney
  • 9. Pitfalls of NULL  What is NULL?  Missing data  Unknown in comparisons  NULL <> „‟ or “”  NULL <> 0  NULL can be valid  But application can‟t handle it Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 9
  • 10. NULL Examples Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 10
  • 11. Constraints: Your Frenemies  CHECK  INSERT/UPDATE fails if condition evaluates to FALSE  Comparisons to NULL result in unknown  Can use to enforce logic, business rules  DEFAULT  Can prevent some bugs  Won‟t solve all your problems  Can be “forgotten”  100% of records have default value Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 11
  • 12. Constraint Examples Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 12
  • 13. Hardcoding Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 13
  • 14. Transactions  Understand them  Don‟t assume others understand them  BEGIN TRAN…COMMIT TRAN is not enough  Failed INSERT…the silent killer Silicon Valley SQL Server Users Group June 19, 2012 14Copyright © 2012 Denise McInerney
  • 15. Transactions Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 15
  • 16. Garbage In  Many ways things go wrong  Concatenation  Recycled identifiers  Duplicates  Honor the schema  Be consistent  Fix it on the way in Silicon Valley SQL Server Users Group June 19, 2012 16Copyright © 2012 Denise McInerney
  • 17. Garbage In Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 17
  • 18. Testing  Database is not exempt  Not just the happy path  Look at the data!  People  Machines Silicon Valley SQL Server Users Group June 19, 2012 18Copyright © 2012 Denise McInerney
  • 19. Change Control  Lots of ways data gets IN  Code—application & SQL  Version control & Management  Scripts  GUI (!)  People  Everyone takes short cuts  Every check-in potential data bug Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 19
  • 20. There is no “I” in “Bad Data” Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 20
  • 21. Pessimism Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 21
  • 22. Vigilance Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 22
  • 23. Summary  DBA‟s job to guard data quality  Design, Plan, Process, Controls  Engage Others  Keep your guard up Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 23
  • 24. Q & A Silicon Valley SQL Server Users Group June 19, 2012 Copyright © 2012 Denise McInerney 24