SlideShare a Scribd company logo
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 into 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
What does it support?
It supports any relational algebra constraint
What do we plan to support in the future?
SQL distributive aggregates & arithmetic functions
TINTIN
14
Thanks for
your attention
Questions?

More Related Content

Similar to TINTIN: demo of the tool

TINTIN Demo
TINTIN DemoTINTIN Demo
TINTIN Demo
Xavier Oriol
 
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
BPM Conference España
 
SQL tips and techniques April 2014
SQL tips and techniques April 2014SQL tips and techniques April 2014
SQL tips and techniques April 2014
Nick Ivanov
 
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
Peter Daalmans
 
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
Amit Anafy
 
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
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit
7mind
 
Unit Testing and Why it Matters
Unit Testing and Why it MattersUnit Testing and Why it Matters
Unit Testing and Why it Matters
yahyaSadiiq
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
Marco Mangia Musardo
 
Alex conrad - Pyramid Tweens (PloneConf 2011)
Alex conrad  - Pyramid Tweens (PloneConf 2011)Alex conrad  - Pyramid Tweens (PloneConf 2011)
Alex conrad - Pyramid Tweens (PloneConf 2011)
aconrad
 
Mathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ CodeMathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ Code
Pauline Schellenberger
 
CDI 2.0 is coming
CDI 2.0 is comingCDI 2.0 is coming
CDI 2.0 is coming
Antoine Sabot-Durand
 
UEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The HoodUEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The Hood
Ivanti
 
Agile Development of High Performance Applications
Agile Development of High Performance ApplicationsAgile Development of High Performance Applications
Agile Development of High Performance Applications
Fabian Lange
 
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
Michael Furman
 
Business Intelligence Solutions
Business Intelligence SolutionsBusiness Intelligence Solutions
Business Intelligence Solutions
Sumit Gadgilwar
 
TM1 Monitoring Tools
TM1 Monitoring ToolsTM1 Monitoring Tools
TM1 Monitoring Tools
Gracy Mendonca
 
Droidcon it 2015: Android Lollipop for Enterprise
Droidcon it 2015: Android Lollipop for EnterpriseDroidcon it 2015: Android Lollipop for Enterprise
Droidcon it 2015: Android Lollipop for Enterprise
Consulthinkspa
 
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
Andreas Grabner
 
JUNit Presentation
JUNit PresentationJUNit Presentation
JUNit Presentation
Animesh Kumar
 

Similar to TINTIN: demo of the tool (20)

TINTIN Demo
TINTIN DemoTINTIN Demo
TINTIN Demo
 
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
 
SQL tips and techniques April 2014
SQL tips and techniques April 2014SQL tips and techniques April 2014
SQL tips and techniques April 2014
 
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
IT/Dev Connections: Intune, ConfigMgr, or Both: Choose the Right Tool for the...
 
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
 
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...
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit
 
Unit Testing and Why it Matters
Unit Testing and Why it MattersUnit Testing and Why it Matters
Unit Testing and Why it Matters
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
 
Alex conrad - Pyramid Tweens (PloneConf 2011)
Alex conrad  - Pyramid Tweens (PloneConf 2011)Alex conrad  - Pyramid Tweens (PloneConf 2011)
Alex conrad - Pyramid Tweens (PloneConf 2011)
 
Mathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ CodeMathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ Code
 
CDI 2.0 is coming
CDI 2.0 is comingCDI 2.0 is coming
CDI 2.0 is coming
 
UEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The HoodUEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The Hood
 
Agile Development of High Performance Applications
Agile Development of High Performance ApplicationsAgile Development of High Performance Applications
Agile Development of High Performance Applications
 
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
 
Business Intelligence Solutions
Business Intelligence SolutionsBusiness Intelligence Solutions
Business Intelligence Solutions
 
TM1 Monitoring Tools
TM1 Monitoring ToolsTM1 Monitoring Tools
TM1 Monitoring Tools
 
Droidcon it 2015: Android Lollipop for Enterprise
Droidcon it 2015: Android Lollipop for EnterpriseDroidcon it 2015: Android Lollipop for Enterprise
Droidcon it 2015: Android Lollipop for Enterprise
 
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
 
JUNit Presentation
JUNit PresentationJUNit Presentation
JUNit Presentation
 

Recently uploaded

Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Vince Scalabrino
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
widenerjobeyrl638
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
KrishnaveniMohan1
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
narinav14
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 

Recently uploaded (20)

Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 

TINTIN: demo of the tool

  • 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 into 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 What does it support? It supports any relational algebra constraint What do we plan to support in the future? SQL distributive aggregates & arithmetic functions