SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
TINTIN
TINTIN
A Tool for INcremental INTegrity checking
of SQL assertions in SQLServer
Xavier Oriol Universitat Politècnica de Catalunya
Ernest Teniente Universitat Politècnica de Catalunya
Guillem Rull Universitat de Barcelona
TINTIN
2
Schema Motivating Example
name: String
Person
*1..*
FamousDirector
*
Directs Wins
Consider the constraint:
Any famous director has directed some award-winning movie
Steven Spielberg Jurassic Park (I) Visual Effects
directed won
title: String
releasedYear: Integer
Movie
name: String
Award
*
TINTIN
3
How can we check this constraint?
Running a query looking for the violations
Select * from FamousDirector as FD
where not exists (Select * from Directs as D
join Wins as W on (D.movie_id = W.movie_id)
where D.person_id = FD.id)
Writing a query returning any famous director who has not directed an
award-winning movie. Empty query = constraint satisfaction
Problem: bad performance
Running the query = checking all the data
If we delete ‘Jurassic Park’ from DB, and run the
query, it will search for award-winning movies for all
famous directors...
… but the unique relevant one to check is Spielberg!
TINTIN
4
How can we check this constraint?
Manually programming an efficient solution is difficult
Deleting an award-winning movie from DB
causes a violation…
… unless in the DB there is another
award-winning movie directed by the
same director…
… or there is an insertion of a new movie …
… or the director is being deleted as a famous
director
… which should be award-winning and by the same
director…
… such that it is not being deleted in
the same transaction too…
Manual programming = Are you sure you
are taking in account all cases?
TINTIN
5
We need an automatic method for
Checking only those parts of the data that might violate our defined
constraints taking in account the update being applied
In other words, we need
an Incremental method for consistency checking
This is exactly what we provide with TINTIN
TINTIN
6
TINTIN – A Quick DEMO
1. Connect TINTIN to your DB
TINTIN
7
del_DIRECTS
person_id movie_id
1 1
What has happened?
TINTIN now automatically captures all the
insertions/deletions the user wants to apply
delete from directs where movie_id = 1
insert into movie values (2, ‘War Horse’, 2012)
The update is not applied, but the tuples the user wants to
insert/delete are internally stored in auxiliary SQL tables
If a user sends
ins_MOVIE
Id Title Year
2 War Horse 2012
Current table
Auxiliary tables
DIRECTS
person_id movie_id
1 1
TINTIN
8
TINTIN – A Quick DEMO
1. Connect TINTIN to your DB
2. Write your assertions into TINTIN
TINTIN
9
FamousDirector
Id Name
1 Steven Spielberg
ins_MOVIE
Id Title Year
2 War Horse 2012
What has happened?
The safeCommit() procedure has been created. This
procedure looks for ins/deletions of tuples violating your
defined assertion/s
The safeCommit procedure inspects the auxiliary tables
storing the modifications to be applied. If it finds an
insertion/deletion causing a violation, the updates are
discarded, otherwise, they are committed
del_DIRECTS
movie_id person_id
1 1
This is going to violate our assertion!
TINTIN
10
TINTIN – A Quick DEMO
1. Connect TINTIN to your DB
2. Write your assertions into TINTIN
3. Use your DB normally. Just recall to call safeCommit() at
the end of your transactions
TINTIN
11
TINTIN – A Quick DEMO
delete from directs
where movie_id = 1;
insert into movie
values (2, ‘War Horse’, 2012);
insert into directs
values(1, 2)
safeCommit()
delete from directs
where movie_id = 1;
insert into movie
values (2, ‘War Horse’, 2012);
insert into directs
values(1, 2)
insert into wins(2, 1)
safeCommit()
1 violation was found.
The update is rejected.
No violations were found.
The update is commited.
Two simple use case examples:
TINTIN
12
Scalability experiment
We have used the TPC-H benchmark, a benchmark for illustrating
decision support systems that examine large volumes of data.
- Current data = 1GB * SF
- Data updates = 1MB * SF
*Nim = Non Incremental Approach
TINTIN
13
How does it work?
It works with a logical based core
SQL is translated into Logic Denials,
Logic Denials into Event Dependency Constraints
Event Dependency Constraints into SQL
TINTIN
14
Logical based core
famousDirector(x) ^ ¬directsAwardMovie(x) → ⏊
directsAwardMovie(x) ← directs(x, y) ^ wins(y, z)
PN(x) = P(x) ^ ¬del_P(x) v ins_P(x)
A tuple P exists in the new state N
if it exists and it is not being deleted, or
if it is being inserted
¬PN(x) = ¬P(x) ^ ¬ins_P(x) v del_P(x)
ins_famousDirector(x) ^ del_directsAwardMovie(x) → ⏊
famousDirector(x) ^ ¬del_famousDirector(x)) ^ del_directsAwardMovie(x) → ⏊
del_directsAwardMovie(x) ← del_directs(x, y) ^ wins(y, z) ^ ¬directsAwardMovieN (x)
del_directsAwardMovie(x) ← directs(x, y) ^ del_wins(y, z) ^ ¬directsAwardMovieN (x)
…
SQL
Logic Denials
Event Dependency Constraints
TINTIN
15
What does it support?
It supports any relational algebra constraint
What do we plan to support in the future?
SQL distributive aggregates & arithmetic functions

Weitere ähnliche Inhalte

Ähnlich wie A Tool for INcremental INTegrity checking of SQL assertions in SQLServer (TINTIN

TINTIN: demo of the tool
TINTIN: demo of the toolTINTIN: demo of the tool
TINTIN: demo of the toolErnest Teniente
 
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServerTINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServerBPM Conference España
 
The World Outside - The Blind Spot of TDD
The World Outside - The Blind Spot of TDDThe World Outside - The Blind Spot of TDD
The World Outside - The Blind Spot of TDDAmit Anafy
 
[TRECVID 2018] Video to Text
[TRECVID 2018] Video to Text[TRECVID 2018] Video to Text
[TRECVID 2018] Video to TextGeorge Awad
 
Data Observability.pptx
Data Observability.pptxData Observability.pptx
Data Observability.pptxSonaSamad1
 
How can you deliver a secure product
How can you deliver a secure productHow can you deliver a secure product
How can you deliver a secure productMichael Furman
 
Transparent Machine Learning for Information Extraction
Transparent Machine Learning for Information ExtractionTransparent Machine Learning for Information Extraction
Transparent Machine Learning for Information ExtractionLaura Chiticariu
 
Transparent Machine Learning for Information Extraction: State-of-the-Art and...
Transparent Machine Learning for Information Extraction: State-of-the-Art and...Transparent Machine Learning for Information Extraction: State-of-the-Art and...
Transparent Machine Learning for Information Extraction: State-of-the-Art and...Yunyao Li
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
 
Agile Development of High Performance Applications
Agile Development of High Performance ApplicationsAgile Development of High Performance Applications
Agile Development of High Performance ApplicationsFabian Lange
 
Continuous Delivery and Automated Operations on k8s with keptn
Continuous Delivery and Automated Operations on k8s with keptnContinuous Delivery and Automated Operations on k8s with keptn
Continuous Delivery and Automated Operations on k8s with keptnAndreas Grabner
 
(White House IT Security Staff BCP Policy) ([CSIA 4.docx
 (White House IT Security Staff BCP Policy) ([CSIA 4.docx (White House IT Security Staff BCP Policy) ([CSIA 4.docx
(White House IT Security Staff BCP Policy) ([CSIA 4.docxjoyjonna282
 
Our Cinema Movie Rental PowerPoint
Our Cinema Movie Rental PowerPointOur Cinema Movie Rental PowerPoint
Our Cinema Movie Rental PowerPointDanny Nguyen
 
Sap Integration Testing Test Scripting V0.1
Sap Integration Testing   Test Scripting V0.1Sap Integration Testing   Test Scripting V0.1
Sap Integration Testing Test Scripting V0.1ASCARR1
 
Challenges of Agile Qualification
Challenges of Agile QualificationChallenges of Agile Qualification
Challenges of Agile QualificationAdaCore
 
DDD in Pixel Federation volume 2
DDD in Pixel Federation volume 2DDD in Pixel Federation volume 2
DDD in Pixel Federation volume 2Pixel Federation
 
Agile Data: revolutionizing data and database cloning
Agile Data: revolutionizing data and database cloningAgile Data: revolutionizing data and database cloning
Agile Data: revolutionizing data and database cloningKyle Hailey
 

Ähnlich wie A Tool for INcremental INTegrity checking of SQL assertions in SQLServer (TINTIN (20)

TINTIN: demo of the tool
TINTIN: demo of the toolTINTIN: demo of the tool
TINTIN: demo of the tool
 
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServerTINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer
TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer
 
The World Outside - The Blind Spot of TDD
The World Outside - The Blind Spot of TDDThe World Outside - The Blind Spot of TDD
The World Outside - The Blind Spot of TDD
 
[TRECVID 2018] Video to Text
[TRECVID 2018] Video to Text[TRECVID 2018] Video to Text
[TRECVID 2018] Video to Text
 
Data Observability.pptx
Data Observability.pptxData Observability.pptx
Data Observability.pptx
 
How can you deliver a secure product
How can you deliver a secure productHow can you deliver a secure product
How can you deliver a secure product
 
Transparent Machine Learning for Information Extraction
Transparent Machine Learning for Information ExtractionTransparent Machine Learning for Information Extraction
Transparent Machine Learning for Information Extraction
 
Transparent Machine Learning for Information Extraction: State-of-the-Art and...
Transparent Machine Learning for Information Extraction: State-of-the-Art and...Transparent Machine Learning for Information Extraction: State-of-the-Art and...
Transparent Machine Learning for Information Extraction: State-of-the-Art and...
 
CDI 2.0 is coming
CDI 2.0 is comingCDI 2.0 is coming
CDI 2.0 is coming
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 
Agile Development of High Performance Applications
Agile Development of High Performance ApplicationsAgile Development of High Performance Applications
Agile Development of High Performance Applications
 
Continuous Delivery and Automated Operations on k8s with keptn
Continuous Delivery and Automated Operations on k8s with keptnContinuous Delivery and Automated Operations on k8s with keptn
Continuous Delivery and Automated Operations on k8s with keptn
 
(White House IT Security Staff BCP Policy) ([CSIA 4.docx
 (White House IT Security Staff BCP Policy) ([CSIA 4.docx (White House IT Security Staff BCP Policy) ([CSIA 4.docx
(White House IT Security Staff BCP Policy) ([CSIA 4.docx
 
3Requirements.ppt
3Requirements.ppt3Requirements.ppt
3Requirements.ppt
 
Our Cinema Movie Rental PowerPoint
Our Cinema Movie Rental PowerPointOur Cinema Movie Rental PowerPoint
Our Cinema Movie Rental PowerPoint
 
CDI 2.0 is coming
CDI 2.0 is comingCDI 2.0 is coming
CDI 2.0 is coming
 
Sap Integration Testing Test Scripting V0.1
Sap Integration Testing   Test Scripting V0.1Sap Integration Testing   Test Scripting V0.1
Sap Integration Testing Test Scripting V0.1
 
Challenges of Agile Qualification
Challenges of Agile QualificationChallenges of Agile Qualification
Challenges of Agile Qualification
 
DDD in Pixel Federation volume 2
DDD in Pixel Federation volume 2DDD in Pixel Federation volume 2
DDD in Pixel Federation volume 2
 
Agile Data: revolutionizing data and database cloning
Agile Data: revolutionizing data and database cloningAgile Data: revolutionizing data and database cloning
Agile Data: revolutionizing data and database cloning
 

Kürzlich hochgeladen

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Kürzlich hochgeladen (20)

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

A Tool for INcremental INTegrity checking of SQL assertions in SQLServer (TINTIN

  • 1. TINTIN TINTIN A Tool for INcremental INTegrity checking of SQL assertions in SQLServer Xavier Oriol Universitat Politècnica de Catalunya Ernest Teniente Universitat Politècnica de Catalunya Guillem Rull Universitat de Barcelona
  • 2. TINTIN 2 Schema Motivating Example name: String Person *1..* FamousDirector * Directs Wins Consider the constraint: Any famous director has directed some award-winning movie Steven Spielberg Jurassic Park (I) Visual Effects directed won title: String releasedYear: Integer Movie name: String Award *
  • 3. TINTIN 3 How can we check this constraint? Running a query looking for the violations Select * from FamousDirector as FD where not exists (Select * from Directs as D join Wins as W on (D.movie_id = W.movie_id) where D.person_id = FD.id) Writing a query returning any famous director who has not directed an award-winning movie. Empty query = constraint satisfaction Problem: bad performance Running the query = checking all the data If we delete ‘Jurassic Park’ from DB, and run the query, it will search for award-winning movies for all famous directors... … but the unique relevant one to check is Spielberg!
  • 4. TINTIN 4 How can we check this constraint? Manually programming an efficient solution is difficult Deleting an award-winning movie from DB causes a violation… … unless in the DB there is another award-winning movie directed by the same director… … or there is an insertion of a new movie … … or the director is being deleted as a famous director … which should be award-winning and by the same director… … such that it is not being deleted in the same transaction too… Manual programming = Are you sure you are taking in account all cases?
  • 5. TINTIN 5 We need an automatic method for Checking only those parts of the data that might violate our defined constraints taking in account the update being applied In other words, we need an Incremental method for consistency checking This is exactly what we provide with TINTIN
  • 6. TINTIN 6 TINTIN – A Quick DEMO 1. Connect TINTIN to your DB
  • 7. TINTIN 7 del_DIRECTS person_id movie_id 1 1 What has happened? TINTIN now automatically captures all the insertions/deletions the user wants to apply delete from directs where movie_id = 1 insert into movie values (2, ‘War Horse’, 2012) The update is not applied, but the tuples the user wants to insert/delete are internally stored in auxiliary SQL tables If a user sends ins_MOVIE Id Title Year 2 War Horse 2012 Current table Auxiliary tables DIRECTS person_id movie_id 1 1
  • 8. TINTIN 8 TINTIN – A Quick DEMO 1. Connect TINTIN to your DB 2. Write your assertions into TINTIN
  • 9. TINTIN 9 FamousDirector Id Name 1 Steven Spielberg ins_MOVIE Id Title Year 2 War Horse 2012 What has happened? The safeCommit() procedure has been created. This procedure looks for ins/deletions of tuples violating your defined assertion/s The safeCommit procedure inspects the auxiliary tables storing the modifications to be applied. If it finds an insertion/deletion causing a violation, the updates are discarded, otherwise, they are committed del_DIRECTS movie_id person_id 1 1 This is going to violate our assertion!
  • 10. TINTIN 10 TINTIN – A Quick DEMO 1. Connect TINTIN to your DB 2. Write your assertions into TINTIN 3. Use your DB normally. Just recall to call safeCommit() at the end of your transactions
  • 11. TINTIN 11 TINTIN – A Quick DEMO delete from directs where movie_id = 1; insert into movie values (2, ‘War Horse’, 2012); insert into directs values(1, 2) safeCommit() delete from directs where movie_id = 1; insert into movie values (2, ‘War Horse’, 2012); insert into directs values(1, 2) insert into wins(2, 1) safeCommit() 1 violation was found. The update is rejected. No violations were found. The update is commited. Two simple use case examples:
  • 12. TINTIN 12 Scalability experiment We have used the TPC-H benchmark, a benchmark for illustrating decision support systems that examine large volumes of data. - Current data = 1GB * SF - Data updates = 1MB * SF *Nim = Non Incremental Approach
  • 13. TINTIN 13 How does it work? It works with a logical based core SQL is translated into Logic Denials, Logic Denials into Event Dependency Constraints Event Dependency Constraints into SQL
  • 14. TINTIN 14 Logical based core famousDirector(x) ^ ¬directsAwardMovie(x) → ⏊ directsAwardMovie(x) ← directs(x, y) ^ wins(y, z) PN(x) = P(x) ^ ¬del_P(x) v ins_P(x) A tuple P exists in the new state N if it exists and it is not being deleted, or if it is being inserted ¬PN(x) = ¬P(x) ^ ¬ins_P(x) v del_P(x) ins_famousDirector(x) ^ del_directsAwardMovie(x) → ⏊ famousDirector(x) ^ ¬del_famousDirector(x)) ^ del_directsAwardMovie(x) → ⏊ del_directsAwardMovie(x) ← del_directs(x, y) ^ wins(y, z) ^ ¬directsAwardMovieN (x) del_directsAwardMovie(x) ← directs(x, y) ^ del_wins(y, z) ^ ¬directsAwardMovieN (x) … SQL Logic Denials Event Dependency Constraints
  • 15. TINTIN 15 What does it support? It supports any relational algebra constraint What do we plan to support in the future? SQL distributive aggregates & arithmetic functions