DBA AS PROTECTOR OF THE DATA:
NOTES FROM THE FIELD
 Speaker: Denise McInerney
 Development DBA, Intuit


                San Francisco SQL Server User Group
                         October 13, 2010




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

       Introduction
       Goals
       Topics
         My POV
         What is “bad” data?
        D i
          Design
         Garbage in
         Transactions
         Change Management & Controls
         Partnership
         Attitude
                         Copyright © 2010 Denise McInerney
Who am I?
   SQL Server DBA since 1998
   Web-based OLTP applications
   Focus on design and performance tuning
   Development DBA www.intuitmarket.com
   PASS volunteer since 2003
       Founded Women in Tech chapter
   Contact me
       denise.mcinerney@sqlpass.org
       denise_mcinerney@intuit.com
       Twitter: @denisemc06

                          Copyright © 2010 Denise McInerney   3
www.intuitcareers.com
4


       Lead DBA                                   Openings in Menlo Park &
                                                     p    g
       Sr. Database Engineer                       Mountain View, CA and require
                                                    SQL experience
       Senior Data Quality Analyst
       Senior QA Developer                        Follow Intuit Careers on
                                                    F ll I t it C
       Software Engineer in Quality                FaceBook, Twitter and LinkedIn
       Server Side Engineer                        for updates on job openings
       Software E i
        S f       Engineer
                                                   Apply directly online at
       Architect                                   www.intuitcareers.com
       Performance Engineer
       Test Automation Engineer                   Questions on this job or any
       Systems Engineer                            others? Post, Tweet or Message
                                                    us on our Social Media ‘Intuit
       Software Tester                             Careers
                                                    Careers’ sites

                             Copyright © 2010 Denise McInerney
PASS
5



       PASS Community Summit Nov 8 11
                                  8-11
         Best   SQL Server training value
       PASS Women in Tech
         8th   Annual Women in Tech Panel @ Summit
           “Recruiting
             Recruiting,
                      Retaining & Advancing Women in Technology:
            Why Does it Matter?”
         http://wit.sqlpass.org

         #passwit   on Twitter


                            Copyright © 2010 Denise McInerney
My Goals
     y
6


       Show you how to proactively ensure that the data in
        your transactional system is clean and correct
        GOING IN
       Explain why an integrated approach is needed
       Give Real-life examples
              Real life




                        Copyright © 2010 Denise McInerney
My Point of View
         y
7


       Data protection intrinsic to the job
       Backups, security—what about quality?
       DBA s
        DBA’s approach different, complementary
                         different
       Broad exposure to the stack
       Better at your job
        B              j b
         Morehighly valued, trusted
        S
         Successful
                f l



                          Copyright © 2010 Denise McInerney
Define “bad” data
8


       Inaccurate
       Missing
       Misleading
       Causes bugs
        B
         Bugs   have consequences
                h
       Breaks reports
       Impacts customers
        I


                         Copyright © 2010 Denise McInerney
Design
9


       Have one—even in an “agile” shop
                one even          agile
       It’s a system, not a collection of tables
       Don t
        Don’t be lazy
         Re-use a column
         Just add a column

         Just add a table

       Bad design invites bad data



                         Copyright © 2010 Denise McInerney
Design
         g
10




        Always assume the data will be used by others




                        Copyright © 2010 Denise McInerney
Bad Design Examples
             g      p
11




               Copyright © 2010 Denise McInerney
Garbage In
          g
12


        Failed INSERT…the silent killer
          Order header, no detail
          Order taken, not fulfilled

          Missing records = no reconciliation

        Concatenation
          First name + last name in first name field
          Zip code 5 + 4

          Phone + phone extension
            h        h
        Duplicate orders, different order numbers

                            Copyright © 2010 Denise McInerney
Garbage In
          g
13




      Default values substituted for real data
      NULL <> ‘’ or “”




                      Copyright © 2010 Denise McInerney
Garbage In
          g
14




              Copyright © 2010 Denise McInerney
Transactions
15




        Understand them
        Don’t assume others understand them
        BEGIN TRAN…COMMIT TRAN is not enough




                      Copyright © 2010 Denise McInerney
Transactions
16




                Copyright © 2010 Denise McInerney
Change Control
         g
17


        Lots of ways data gets IN
                   y       g
        Code—application & SQL
          Version  control
          Scripts for everything!

          Change management
                g         g
        Data updates
          How   do your lookup tables get populated?
                    y         p        g p p
        People
          Who  can update data directly?
          Everyone takes short cuts
It Takes a Village
                     g
18
Summary--Pieces
     Summary--Pieces of the Puzzle
           y
19




        DBA’s job to guard data quality
        Starts with design
        Many types of “bad”
        Transactions are crucial
        Know how data gets in your database
          Implement   controls & processes
        Cultivate relationships
        Pessimism & vigilance
                            Copyright © 2010 Denise McInerney
To learn more or inquire about speaking opportunities, please contact:
 o ea     o e o qu e about spea g oppo tu t es, p ease co tact:

                Mark Ginnebaugh, User Group Leader
                      mark@designmind.com

Microsoft SQL Server DBA as Protector of the Data - Oct 2010

  • 1.
    DBA AS PROTECTOROF THE DATA: NOTES FROM THE FIELD Speaker: Denise McInerney Development DBA, Intuit San Francisco SQL Server User Group October 13, 2010 Mark Ginnebaugh, User Group Leader, mark@designmind.com
  • 2.
    Agenda g 2  Introduction  Goals  Topics  My POV  What is “bad” data? D i Design  Garbage in  Transactions  Change Management & Controls  Partnership  Attitude Copyright © 2010 Denise McInerney
  • 3.
    Who am I?  SQL Server DBA since 1998  Web-based OLTP applications  Focus on design and performance tuning  Development DBA www.intuitmarket.com  PASS volunteer since 2003  Founded Women in Tech chapter  Contact me  denise.mcinerney@sqlpass.org  denise_mcinerney@intuit.com  Twitter: @denisemc06 Copyright © 2010 Denise McInerney 3
  • 4.
    www.intuitcareers.com 4  Lead DBA  Openings in Menlo Park & p g  Sr. Database Engineer Mountain View, CA and require SQL experience  Senior Data Quality Analyst  Senior QA Developer  Follow Intuit Careers on F ll I t it C  Software Engineer in Quality FaceBook, Twitter and LinkedIn  Server Side Engineer for updates on job openings  Software E i S f Engineer  Apply directly online at  Architect www.intuitcareers.com  Performance Engineer  Test Automation Engineer  Questions on this job or any  Systems Engineer others? Post, Tweet or Message us on our Social Media ‘Intuit  Software Tester Careers Careers’ sites Copyright © 2010 Denise McInerney
  • 5.
    PASS 5  PASS Community Summit Nov 8 11 8-11  Best SQL Server training value  PASS Women in Tech  8th Annual Women in Tech Panel @ Summit  “Recruiting Recruiting, Retaining & Advancing Women in Technology: Why Does it Matter?”  http://wit.sqlpass.org  #passwit on Twitter Copyright © 2010 Denise McInerney
  • 6.
    My Goals y 6  Show you how to proactively ensure that the data in your transactional system is clean and correct GOING IN  Explain why an integrated approach is needed  Give Real-life examples Real life Copyright © 2010 Denise McInerney
  • 7.
    My Point ofView y 7  Data protection intrinsic to the job  Backups, security—what about quality?  DBA s DBA’s approach different, complementary different  Broad exposure to the stack  Better at your job B j b  Morehighly valued, trusted S Successful f l Copyright © 2010 Denise McInerney
  • 8.
    Define “bad” data 8  Inaccurate  Missing  Misleading  Causes bugs B Bugs have consequences h  Breaks reports  Impacts customers I Copyright © 2010 Denise McInerney
  • 9.
    Design 9  Have one—even in an “agile” shop one even agile  It’s a system, not a collection of tables  Don t Don’t be lazy  Re-use a column  Just add a column  Just add a table  Bad design invites bad data Copyright © 2010 Denise McInerney
  • 10.
    Design g 10  Always assume the data will be used by others Copyright © 2010 Denise McInerney
  • 11.
    Bad Design Examples g p 11 Copyright © 2010 Denise McInerney
  • 12.
    Garbage In g 12  Failed INSERT…the silent killer  Order header, no detail  Order taken, not fulfilled  Missing records = no reconciliation  Concatenation  First name + last name in first name field  Zip code 5 + 4  Phone + phone extension h h  Duplicate orders, different order numbers Copyright © 2010 Denise McInerney
  • 13.
    Garbage In g 13  Default values substituted for real data  NULL <> ‘’ or “” Copyright © 2010 Denise McInerney
  • 14.
    Garbage In g 14 Copyright © 2010 Denise McInerney
  • 15.
    Transactions 15  Understand them  Don’t assume others understand them  BEGIN TRAN…COMMIT TRAN is not enough Copyright © 2010 Denise McInerney
  • 16.
    Transactions 16 Copyright © 2010 Denise McInerney
  • 17.
    Change Control g 17  Lots of ways data gets IN y g  Code—application & SQL  Version control  Scripts for everything!  Change management g g  Data updates  How do your lookup tables get populated? y p g p p  People  Who can update data directly?  Everyone takes short cuts
  • 18.
    It Takes aVillage g 18
  • 19.
    Summary--Pieces Summary--Pieces of the Puzzle y 19  DBA’s job to guard data quality  Starts with design  Many types of “bad”  Transactions are crucial  Know how data gets in your database  Implement controls & processes  Cultivate relationships  Pessimism & vigilance Copyright © 2010 Denise McInerney
  • 20.
    To learn more or inquire about speaking opportunities, please contact: o ea o e o qu e about spea g oppo tu t es, p ease co tact: Mark Ginnebaugh, User Group Leader mark@designmind.com