100 likes | 120 Views
DATA MODEL QA/QC. Michael Hamsa. QA/QC OVERVIEW. Opportunity for error Common “Gotcha’s!” Data Model Cleaning Tips Generation errors to look for. OPPORTUNITY FOR ERROR. Error introduced by data modeler depends on Tool structure Elapsed time between user meetings and data model update
E N D
DATA MODEL QA/QC Michael Hamsa
QA/QC OVERVIEW • Opportunity for error • Common “Gotcha’s!” • Data Model Cleaning Tips • Generation errors to look for
OPPORTUNITY FOR ERROR • Error introduced by data modeler depends on • Tool structure • Elapsed time between user meetings and data model update • “Nothing will catch this” • Fate • Goal: Devise a quality control process to address your “Opportunity for Error”
POTENTIAL MODEL ERRORS • Physical naming errors • Datatype inconsistencies between primary and foreign keys • Nulls / no nulls conflicts • Referential integrity defaults
PHYSICAL NAMING ERRORS • Opportunity for error: Physical names are totally under the control of the data modeler • no spell check • no requirement for consistency from primary to foreign key “names” • enables role names in the data model and database • QC Procedure: Establish standards • Field naming structures / datatypes • Abbreviations • Note: facilitates later reporting to check model integrity
INCONSISTENT DATATYPES In the physical transformation, each column must be assigned a “datatype” • integer, number(11,2), char(4), varchar2(50) • Opportunity for error: Datatypes across relationships must be consistent • primary key and foreign key datatypes must agree • QC Procedure: Generate model report to highlight inconsistencies • relationship report showing PK and FK with datatypes
NULLS / NO NULLS CONFLICTS • Opportunity for error: Physical model has two representations of Nulls / No Nulls • Relationship line is either “mandatory” or “non-mandatory” • Physical column is declared “NULL” or “NOT NULL” • QC Procedure: Generate model report to highlight inconsistencies • Relationship report with relationship type • Attribute report with FK null value
REFERENTIAL INTEGRITY DEFAULTS Each relationship line has options for referential integrity enforcement at both the parent and the child • insert/update/delete triggers • restrict, cascade, set null, none as options • Opportunity for error: Requires thorough understanding of referential integrity • impacted by target RDBMS characteristics • QC procedure: Ensure that someone with the right skills establishes the R/I defaults
RDBMS “CLASH” • Opportunity for error: Your tool may not understand some RDBMS characteristics, i.e., “peculiarities” • Example: Oracle’s “mutating table” characteristic makes the “set null” option on referential integrity unworkable within a trigger • If tool allows this selection, you have to be savvy enough to avoid it • QC procedure: Review all physical model parameters with someone highly skilled on the target RDBMS and how it enforces R/I
SUMMARY • Error is introduced into the data model at all stages in the process • “Top 10” errors become apparent with experience • Explore the ability of your data modeling tool to help you “scrub” the model • Ultimately, the database will expose all errors • Assume errors are present… • hunt them down, and wipe them out!!