SlideShare a Scribd company logo
CodeCritics Applied to Database Schema:
Challenges and First Results
Julien Delplanque1,2
Anne Etien2
Olivier Auverlot2
Tom Mens1
Nicolas Anquetil2
St´ephane Ducasse2
1Universit´e de Mons, Belgique
julien.delplanque@student.umons.ac.be
tom.mens@umons.ac.be
2Universit´e de Lille, CNRS, Inria, Centrale Lille,
UMR 9189 - CRIStAL,
F-59000 Lille, France
{nom.prenom}@univ-lille1.fr
1 / 35
Use Case Scenario I
Smells detection
DBAs need tools to highlight smells, anti-patterns and
violations of business rules.
2 / 35
Use Case Scenario I
Smells detection
DBAs need tools to highlight smells, anti-patterns and
violations of business rules.
Rule = a property that the database should have
3 / 35
Use Case Scenario I
Smells detection
DBAs need tools to highlight smells, anti-patterns and
violations of business rules.
Rule = a property that the database should have
• Generic rules
e.g., foreign keys reference primary keys
4 / 35
Use Case Scenario I
Smells detection
DBAs need tools to highlight smells, anti-patterns and
violations of business rules.
Rule = a property that the database should have
• Generic rules
e.g., foreign keys reference primary keys
• Company or database-specific rules
e.g., ensure the respect of naming convention
5 / 35
Use Case Scenario II
DBMS version migration
DBMS evolves to introduce new features or to fix bugs.
6 / 35
Use Case Scenario II
DBMS version migration
DBMS evolves to introduce new features or to fix bugs.
• Upgrade migration patches are rarely provided
7 / 35
Use Case Scenario II
DBMS version migration
DBMS evolves to introduce new features or to fix bugs.
• Upgrade migration patches are rarely provided
• Sometimes a textual change log is provided
8 / 35
Use Case Scenario II
DBMS version migration
DBMS evolves to introduce new features or to fix bugs.
• Upgrade migration patches are rarely provided
• Sometimes a textual change log is provided
• DBAs need to identify the migration impact
9 / 35
Use Case Scenario III
Maintaining consistency
A DB schema may be used as a basis for multiple projects.
10 / 35
Use Case Scenario III
Maintaining consistency
A DB schema may be used as a basis for multiple projects.
• Need to integrate the
changes to profit from the
original schema updates
11 / 35
Use Case Scenario III
Maintaining consistency
A DB schema may be used as a basis for multiple projects.
• Need to integrate the
changes to profit from the
original schema updates
• The consistency of the
DB should be kept after
an update
12 / 35
Additionally...
• All kind of entities (tables, columns, views, functions,
. . . ) and the relationships between them are potentially
subject to quality defects
13 / 35
Additionally...
• All kind of entities (tables, columns, views, functions,
. . . ) and the relationships between them are potentially
subject to quality defects
• Checking for domain-specific or system-specific rules
provides better defect prevention
14 / 35
Additionally...
• All kind of entities (tables, columns, views, functions,
. . . ) and the relationships between them are potentially
subject to quality defects
• Checking for domain-specific or system-specific rules
provides better defect prevention
• Automatic detection of quality problems is important but
resolving them is the ultimate goal
15 / 35
Additionally...
• All kind of entities (tables, columns, views, functions,
. . . ) and the relationships between them are potentially
subject to quality defects
• Checking for domain-specific or system-specific rules
provides better defect prevention
• Automatic detection of quality problems is important but
resolving them is the ultimate goal
• Resolving an issue on an entity may imply changes on
other entities
16 / 35
Table of contents
1 Introduction
2 DBCritics
3 Case Studies
17 / 35
Overview
⇒ Apply traditional Software Quality Analysis methods to
database schemas
18 / 35
Examples of rules
1 Detect use of * in SELECT request
19 / 35
Examples of rules
1 Detect use of * in SELECT request
2 View using another view
20 / 35
Examples of rules
1 Detect use of * in SELECT request
2 View using another view
21 / 35
Examples of rules
1 Detect use of * in SELECT request
2 View using another view
22 / 35
Examples of rules
1 Detect use of * in SELECT request
2 View using another view
23 / 35
Examples of rules
1 Detect use of * in SELECT request
2 View using another view
24 / 35
Table of contents
1 Introduction
2 DBCritics
3 Case Studies
25 / 35
Evaluation
Discovering rule violations on two real databases
• WikiMedia: 25 versions analysed
• AppSI: 12 versions analysed
WikiMedia AppSI
Tables 30/51 71/91
Columns 196/353 583/974
View 0/1 30/52
Functions 3/5 46/67
Triggers 2/3 12/16
LOC 1,435/2,453 4,910/7,006
Min/Max number of entities per type for each database.
26 / 35
Violation count per version
Rule violations can be found in open source as well as in
proprietary DB schemas.
27 / 35
Violating entities proportion
Dashed: violating entities, Solid: entities count.
The number of violating entities evolves with the total number
of entities.
28 / 35
“Time-to-fix” of a rule violation
Corrected violations:
• WikiMedia (WM): 21/87
• AppSI: 3/85
⇒ On both DBs some violations are fixed but not all of them.
29 / 35
“Time-to-fix” of a rule violation
Corrected violations:
• WikiMedia (WM): 21/87
• AppSI: 3/85
⇒ On both DBs some violations are fixed but not all of them.
Time in days needed to correct violations:
Min 1st quantile Median 3rd quantile Max
WM 95 1227 1833 2403 3644
AppSI 3 / 125 / 278
30 / 35
False positives
Three categories of violations can be distinguished:
1 Real design issues
2 Issues that the DBA accept to live with
3 Issues due to limitations of DBCritics
31 / 35
False positives
Three categories of violations can be distinguished:
1 Real design issues
2 Issues that the DBA accept to live with
3 Issues due to limitations of DBCritics
Classifying violations in these categories can not be automated.
32 / 35
False positives
Three categories of violations can be distinguished:
1 Real design issues
2 Issues that the DBA accept to live with
3 Issues due to limitations of DBCritics
Classifying violations in these categories can not be automated.
On AppSI v10, the DBA analysed the 81 rule violations:
Category Count
1 51
2 8
3 22
⇒ Can not be generalised, just gives an idea.
33 / 35
Conclusion
• Relational databases are at the core of many information
systems
• As any artefact, they are subject to errors and quality
defects
• Empirical study on two real DB supporting the relevance
of the approach
• External validation based on the feedback of AppSI’s
DBA supporting the relevance of the tool’s results
34 / 35
Questions
• Do open-source and proprietary DB schemas behave
differently in terms of rule violations?
• How to practically integrate such an approach in the DB
life-cycle?
• How to convince DBAs of the relevance of the approach
since they have lived without such tools for years?
35 / 35

More Related Content

Viewers also liked

Panel Debate: An Uncertain Future - TEF, Retention, and Student Success
Panel Debate: An Uncertain Future - TEF, Retention, and Student SuccessPanel Debate: An Uncertain Future - TEF, Retention, and Student Success
Panel Debate: An Uncertain Future - TEF, Retention, and Student Success
Hobsons
 
Jarrar: Data Schema Integration
Jarrar: Data Schema Integration Jarrar: Data Schema Integration
Jarrar: Data Schema Integration
Mustafa Jarrar
 
Estudio Panorámico de la Biblia: 1 Pedro
Estudio Panorámico de la Biblia: 1 PedroEstudio Panorámico de la Biblia: 1 Pedro
Estudio Panorámico de la Biblia: 1 Pedro
Luis García Llerena
 
Estudio Panorámico de la Biblia: Tito
Estudio Panorámico de la Biblia: TitoEstudio Panorámico de la Biblia: Tito
Estudio Panorámico de la Biblia: Tito
Luis García Llerena
 
Estudio Panorámico de la Biblia: 1 Timoteo
Estudio Panorámico de la Biblia: 1 TimoteoEstudio Panorámico de la Biblia: 1 Timoteo
Estudio Panorámico de la Biblia: 1 Timoteo
Luis García Llerena
 
كتيب الثقافة العمالية
كتيب الثقافة العماليةكتيب الثقافة العمالية
كتيب الثقافة العمالية
Taqno - تقنو
 
Obsopoly 1
Obsopoly 1Obsopoly 1
Obsopoly 1
Martha Elena Etica
 
Social media to promote a networking group
Social media to promote a networking groupSocial media to promote a networking group
Social media to promote a networking group
Jo Shaer
 
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
Juan Guillermo Vélez Yepes
 
Tipos de contratos
Tipos de contratosTipos de contratos
Tipos de contratos
lismary verde
 

Viewers also liked (10)

Panel Debate: An Uncertain Future - TEF, Retention, and Student Success
Panel Debate: An Uncertain Future - TEF, Retention, and Student SuccessPanel Debate: An Uncertain Future - TEF, Retention, and Student Success
Panel Debate: An Uncertain Future - TEF, Retention, and Student Success
 
Jarrar: Data Schema Integration
Jarrar: Data Schema Integration Jarrar: Data Schema Integration
Jarrar: Data Schema Integration
 
Estudio Panorámico de la Biblia: 1 Pedro
Estudio Panorámico de la Biblia: 1 PedroEstudio Panorámico de la Biblia: 1 Pedro
Estudio Panorámico de la Biblia: 1 Pedro
 
Estudio Panorámico de la Biblia: Tito
Estudio Panorámico de la Biblia: TitoEstudio Panorámico de la Biblia: Tito
Estudio Panorámico de la Biblia: Tito
 
Estudio Panorámico de la Biblia: 1 Timoteo
Estudio Panorámico de la Biblia: 1 TimoteoEstudio Panorámico de la Biblia: 1 Timoteo
Estudio Panorámico de la Biblia: 1 Timoteo
 
كتيب الثقافة العمالية
كتيب الثقافة العماليةكتيب الثقافة العمالية
كتيب الثقافة العمالية
 
Obsopoly 1
Obsopoly 1Obsopoly 1
Obsopoly 1
 
Social media to promote a networking group
Social media to promote a networking groupSocial media to promote a networking group
Social media to promote a networking group
 
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
Sistematización de Experiencias Locales Preval-Fidamérica. Pag. 56
 
Tipos de contratos
Tipos de contratosTipos de contratos
Tipos de contratos
 

Similar to CodeCritics Applied to Database Schema: Challenges and First Results

Documented Requirements are not Useless After All!
Documented Requirements are not Useless After All!Documented Requirements are not Useless After All!
Documented Requirements are not Useless After All!
Lionel Briand
 
AML4DT: A Model-Driven Framework for Developing and Maintaining Digital Twin...
AML4DT: A Model-Driven Framework for Developing  and Maintaining Digital Twin...AML4DT: A Model-Driven Framework for Developing  and Maintaining Digital Twin...
AML4DT: A Model-Driven Framework for Developing and Maintaining Digital Twin...
Daniel Lehner
 
digit_twin.pptx
digit_twin.pptxdigit_twin.pptx
digit_twin.pptx
ajithakn1
 
Structure of this ChapterIn Section 11.1Section 11.docx
Structure of this ChapterIn Section 11.1Section 11.docxStructure of this ChapterIn Section 11.1Section 11.docx
Structure of this ChapterIn Section 11.1Section 11.docx
florriezhamphrey3065
 
digit_twin.pptx
digit_twin.pptxdigit_twin.pptx
digit_twin.pptx
AmrikSingh922379
 
Database concepts
Database conceptsDatabase concepts
Database concepts
Harry Potter
 
Database concepts
Database conceptsDatabase concepts
Database concepts
James Wong
 
Database concepts
Database conceptsDatabase concepts
Database concepts
David Hoen
 
Database concepts
Database conceptsDatabase concepts
Database concepts
Fraboni Ec
 
Database concepts
Database conceptsDatabase concepts
Database concepts
Luis Goldster
 
Database concepts
Database conceptsDatabase concepts
Database concepts
Young Alista
 
Database concepts
Database conceptsDatabase concepts
Database concepts
Tony Nguyen
 
Software Maintenance Chapter 3 Models
Software Maintenance Chapter 3 ModelsSoftware Maintenance Chapter 3 Models
Software Maintenance Chapter 3 Models
albaraahasan1
 
Ch3-Models.ppt
Ch3-Models.pptCh3-Models.ppt
Ch3-Models.ppt
JOANADANIELAMANTOVAN1
 
Ai engineering icsoc -2019-10-30
Ai engineering icsoc -2019-10-30Ai engineering icsoc -2019-10-30
Ai engineering icsoc -2019-10-30
Ivica Crnkovic
 
Management Information system
Management Information systemManagement Information system
Management Information system
Cochin University
 
Cis 349 Inspiring Innovation--tutorialrank.com
Cis 349  Inspiring Innovation--tutorialrank.comCis 349  Inspiring Innovation--tutorialrank.com
Cis 349 Inspiring Innovation--tutorialrank.com
PrescottLunt371
 
Enovia Collaboration Platform and Matrix Query Language
Enovia Collaboration Platform and Matrix Query LanguageEnovia Collaboration Platform and Matrix Query Language
Enovia Collaboration Platform and Matrix Query Language
Ashikur Rahman
 
ASMUG February 2015 Knowledge Event
ASMUG February 2015 Knowledge EventASMUG February 2015 Knowledge Event
ASMUG February 2015 Knowledge Event
jmustac
 
Stream D_John Ahmet Erkoyuncu
Stream D_John Ahmet ErkoyuncuStream D_John Ahmet Erkoyuncu
Stream D_John Ahmet Erkoyuncu
BecarAsset
 

Similar to CodeCritics Applied to Database Schema: Challenges and First Results (20)

Documented Requirements are not Useless After All!
Documented Requirements are not Useless After All!Documented Requirements are not Useless After All!
Documented Requirements are not Useless After All!
 
AML4DT: A Model-Driven Framework for Developing and Maintaining Digital Twin...
AML4DT: A Model-Driven Framework for Developing  and Maintaining Digital Twin...AML4DT: A Model-Driven Framework for Developing  and Maintaining Digital Twin...
AML4DT: A Model-Driven Framework for Developing and Maintaining Digital Twin...
 
digit_twin.pptx
digit_twin.pptxdigit_twin.pptx
digit_twin.pptx
 
Structure of this ChapterIn Section 11.1Section 11.docx
Structure of this ChapterIn Section 11.1Section 11.docxStructure of this ChapterIn Section 11.1Section 11.docx
Structure of this ChapterIn Section 11.1Section 11.docx
 
digit_twin.pptx
digit_twin.pptxdigit_twin.pptx
digit_twin.pptx
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Database concepts
Database conceptsDatabase concepts
Database concepts
 
Software Maintenance Chapter 3 Models
Software Maintenance Chapter 3 ModelsSoftware Maintenance Chapter 3 Models
Software Maintenance Chapter 3 Models
 
Ch3-Models.ppt
Ch3-Models.pptCh3-Models.ppt
Ch3-Models.ppt
 
Ai engineering icsoc -2019-10-30
Ai engineering icsoc -2019-10-30Ai engineering icsoc -2019-10-30
Ai engineering icsoc -2019-10-30
 
Management Information system
Management Information systemManagement Information system
Management Information system
 
Cis 349 Inspiring Innovation--tutorialrank.com
Cis 349  Inspiring Innovation--tutorialrank.comCis 349  Inspiring Innovation--tutorialrank.com
Cis 349 Inspiring Innovation--tutorialrank.com
 
Enovia Collaboration Platform and Matrix Query Language
Enovia Collaboration Platform and Matrix Query LanguageEnovia Collaboration Platform and Matrix Query Language
Enovia Collaboration Platform and Matrix Query Language
 
ASMUG February 2015 Knowledge Event
ASMUG February 2015 Knowledge EventASMUG February 2015 Knowledge Event
ASMUG February 2015 Knowledge Event
 
Stream D_John Ahmet Erkoyuncu
Stream D_John Ahmet ErkoyuncuStream D_John Ahmet Erkoyuncu
Stream D_John Ahmet Erkoyuncu
 

Recently uploaded

platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
muralinath2
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
University of Maribor
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
David Osipyan
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
pablovgd
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ana Luísa Pinho
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
tonzsalvador2222
 
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
yqqaatn0
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
Abdul Wali Khan University Mardan,kP,Pakistan
 
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
Travis Hills MN
 
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdfDMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
fafyfskhan251kmf
 
ISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
ISI 2024: Application Form (Extended), Exam Date (Out), EligibilityISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
ISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
SciAstra
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptxANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
RASHMI M G
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
yqqaatn0
 
Introduction to Mean Field Theory(MFT).pptx
Introduction to Mean Field Theory(MFT).pptxIntroduction to Mean Field Theory(MFT).pptx
Introduction to Mean Field Theory(MFT).pptx
zeex60
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
Gokturk Mehmet Dilci
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
Richard Gill
 

Recently uploaded (20)

platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
 
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
 
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
Travis Hills' Endeavors in Minnesota: Fostering Environmental and Economic Pr...
 
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdfDMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
 
ISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
ISI 2024: Application Form (Extended), Exam Date (Out), EligibilityISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
ISI 2024: Application Form (Extended), Exam Date (Out), Eligibility
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptxANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
 
Introduction to Mean Field Theory(MFT).pptx
Introduction to Mean Field Theory(MFT).pptxIntroduction to Mean Field Theory(MFT).pptx
Introduction to Mean Field Theory(MFT).pptx
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
 

CodeCritics Applied to Database Schema: Challenges and First Results

  • 1. CodeCritics Applied to Database Schema: Challenges and First Results Julien Delplanque1,2 Anne Etien2 Olivier Auverlot2 Tom Mens1 Nicolas Anquetil2 St´ephane Ducasse2 1Universit´e de Mons, Belgique julien.delplanque@student.umons.ac.be tom.mens@umons.ac.be 2Universit´e de Lille, CNRS, Inria, Centrale Lille, UMR 9189 - CRIStAL, F-59000 Lille, France {nom.prenom}@univ-lille1.fr 1 / 35
  • 2. Use Case Scenario I Smells detection DBAs need tools to highlight smells, anti-patterns and violations of business rules. 2 / 35
  • 3. Use Case Scenario I Smells detection DBAs need tools to highlight smells, anti-patterns and violations of business rules. Rule = a property that the database should have 3 / 35
  • 4. Use Case Scenario I Smells detection DBAs need tools to highlight smells, anti-patterns and violations of business rules. Rule = a property that the database should have • Generic rules e.g., foreign keys reference primary keys 4 / 35
  • 5. Use Case Scenario I Smells detection DBAs need tools to highlight smells, anti-patterns and violations of business rules. Rule = a property that the database should have • Generic rules e.g., foreign keys reference primary keys • Company or database-specific rules e.g., ensure the respect of naming convention 5 / 35
  • 6. Use Case Scenario II DBMS version migration DBMS evolves to introduce new features or to fix bugs. 6 / 35
  • 7. Use Case Scenario II DBMS version migration DBMS evolves to introduce new features or to fix bugs. • Upgrade migration patches are rarely provided 7 / 35
  • 8. Use Case Scenario II DBMS version migration DBMS evolves to introduce new features or to fix bugs. • Upgrade migration patches are rarely provided • Sometimes a textual change log is provided 8 / 35
  • 9. Use Case Scenario II DBMS version migration DBMS evolves to introduce new features or to fix bugs. • Upgrade migration patches are rarely provided • Sometimes a textual change log is provided • DBAs need to identify the migration impact 9 / 35
  • 10. Use Case Scenario III Maintaining consistency A DB schema may be used as a basis for multiple projects. 10 / 35
  • 11. Use Case Scenario III Maintaining consistency A DB schema may be used as a basis for multiple projects. • Need to integrate the changes to profit from the original schema updates 11 / 35
  • 12. Use Case Scenario III Maintaining consistency A DB schema may be used as a basis for multiple projects. • Need to integrate the changes to profit from the original schema updates • The consistency of the DB should be kept after an update 12 / 35
  • 13. Additionally... • All kind of entities (tables, columns, views, functions, . . . ) and the relationships between them are potentially subject to quality defects 13 / 35
  • 14. Additionally... • All kind of entities (tables, columns, views, functions, . . . ) and the relationships between them are potentially subject to quality defects • Checking for domain-specific or system-specific rules provides better defect prevention 14 / 35
  • 15. Additionally... • All kind of entities (tables, columns, views, functions, . . . ) and the relationships between them are potentially subject to quality defects • Checking for domain-specific or system-specific rules provides better defect prevention • Automatic detection of quality problems is important but resolving them is the ultimate goal 15 / 35
  • 16. Additionally... • All kind of entities (tables, columns, views, functions, . . . ) and the relationships between them are potentially subject to quality defects • Checking for domain-specific or system-specific rules provides better defect prevention • Automatic detection of quality problems is important but resolving them is the ultimate goal • Resolving an issue on an entity may imply changes on other entities 16 / 35
  • 17. Table of contents 1 Introduction 2 DBCritics 3 Case Studies 17 / 35
  • 18. Overview ⇒ Apply traditional Software Quality Analysis methods to database schemas 18 / 35
  • 19. Examples of rules 1 Detect use of * in SELECT request 19 / 35
  • 20. Examples of rules 1 Detect use of * in SELECT request 2 View using another view 20 / 35
  • 21. Examples of rules 1 Detect use of * in SELECT request 2 View using another view 21 / 35
  • 22. Examples of rules 1 Detect use of * in SELECT request 2 View using another view 22 / 35
  • 23. Examples of rules 1 Detect use of * in SELECT request 2 View using another view 23 / 35
  • 24. Examples of rules 1 Detect use of * in SELECT request 2 View using another view 24 / 35
  • 25. Table of contents 1 Introduction 2 DBCritics 3 Case Studies 25 / 35
  • 26. Evaluation Discovering rule violations on two real databases • WikiMedia: 25 versions analysed • AppSI: 12 versions analysed WikiMedia AppSI Tables 30/51 71/91 Columns 196/353 583/974 View 0/1 30/52 Functions 3/5 46/67 Triggers 2/3 12/16 LOC 1,435/2,453 4,910/7,006 Min/Max number of entities per type for each database. 26 / 35
  • 27. Violation count per version Rule violations can be found in open source as well as in proprietary DB schemas. 27 / 35
  • 28. Violating entities proportion Dashed: violating entities, Solid: entities count. The number of violating entities evolves with the total number of entities. 28 / 35
  • 29. “Time-to-fix” of a rule violation Corrected violations: • WikiMedia (WM): 21/87 • AppSI: 3/85 ⇒ On both DBs some violations are fixed but not all of them. 29 / 35
  • 30. “Time-to-fix” of a rule violation Corrected violations: • WikiMedia (WM): 21/87 • AppSI: 3/85 ⇒ On both DBs some violations are fixed but not all of them. Time in days needed to correct violations: Min 1st quantile Median 3rd quantile Max WM 95 1227 1833 2403 3644 AppSI 3 / 125 / 278 30 / 35
  • 31. False positives Three categories of violations can be distinguished: 1 Real design issues 2 Issues that the DBA accept to live with 3 Issues due to limitations of DBCritics 31 / 35
  • 32. False positives Three categories of violations can be distinguished: 1 Real design issues 2 Issues that the DBA accept to live with 3 Issues due to limitations of DBCritics Classifying violations in these categories can not be automated. 32 / 35
  • 33. False positives Three categories of violations can be distinguished: 1 Real design issues 2 Issues that the DBA accept to live with 3 Issues due to limitations of DBCritics Classifying violations in these categories can not be automated. On AppSI v10, the DBA analysed the 81 rule violations: Category Count 1 51 2 8 3 22 ⇒ Can not be generalised, just gives an idea. 33 / 35
  • 34. Conclusion • Relational databases are at the core of many information systems • As any artefact, they are subject to errors and quality defects • Empirical study on two real DB supporting the relevance of the approach • External validation based on the feedback of AppSI’s DBA supporting the relevance of the tool’s results 34 / 35
  • 35. Questions • Do open-source and proprietary DB schemas behave differently in terms of rule violations? • How to practically integrate such an approach in the DB life-cycle? • How to convince DBAs of the relevance of the approach since they have lived without such tools for years? 35 / 35