SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Why SQL DBMS’s Still Lack Full Declarative Constraint Support (A polite excuse) 
Toon Koppelaars
Who am I? 
•A database guy, relational dude 
–Developer (with DBA experience) 
•Oracle technology user since 1987 
•Co-author of this book  
•Today’s talk = last chapter
Agenda 
•SQL Assertions? 
–A few examples 
•Validation Execution Models 
–More efficient along the way 
•Serializability 
– Probably the biggest problem 
•Conclusions
SQL Assertions? 
•Examples 
1.There is at most one president 
2.One cannot manage more than two departments 
3.Department with president and/or manager should have an administrator 
 Data integrity constraints 
–Just like: CHECK, PK, UK, FK 
–‘all the other ones’ 
They constrain data allowed in our tables 
They constrain data allowed in our tables
Syntax? 
•Create assertion [some_name] as check([some_SQL_expression]); 
•For over 25 years part of Ansi/Iso SQL standard
Example 1 
•create assertion at_most_one_president as check (1 => (select count(*) from EMP e where e.JOB = ‘PRESIDENT’ ) ); 
•Task of DBMS: make sure it’s true at all times 
- Closed SQL expression (no free variables) 
- Evaluates to true or false
Example 2 
•create assertion cannot_manage_more_than_2 as check (not exists (select ‘x’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2 ) );
Example 3 
•create assertion admin_in_dept_with_vip as check (not exists (select ‘x’ from (select distinct e.DEPTNO from EMP e) e where exists (select ‘y’ from EMP e1 where e1.DEPTNO = e.DEPTNO and e1.JOB in (‘P’,’M’)) and not exists (select ‘z’ from EMP e2 where e2.DEPTNO = e.DEPTNO and e2.JOB = ‘ADMIN’) ) );
•Can this be the killer feature of OracleXIII?
Imagine... 
•If DBMS vendor would support these 
–How much less lines of code one would need to write in application development 
–How much less bugs this results into 
–How easy we could accomodate change requested by the business 
–How data quality would improve
Point to be made 
•SQL assertions ‘cover’ all the other declarative constraints available 
–CHECK  can be written as assertion 
–PK/UK  can be written as assertion 
–FK  can be written as assertion 
•We just have shorthands for these, since these are so common in every database design
Check writen as assertion 
•create assertion hire_only_18_plus as check (not exists (select ‘x’ from EMP e where e.HIRED - e.BORN < 18*365 ) ); CHECK((HIRED – BORN) >= 18*365)
PK/UK written as assertion 
•create assertion empno_is_unique as check (not exists (select ‘x’ from EMP e1 ,EMP e2 where e1.EMPNO = e2.EMPNO and e1.rowid != e2.rowid ) ); PRIMARY KEY (EMPNO)
FK written as assertion 
•create assertion work_in_known_dept as check (not exists (select ‘x’ from EMP e where not exists (select ‘y’ from DEPT d where d.deptno = e.deptno ) ) ); FOREIGN KEY (DEPTNO) REFERENCES DEPT(DEPTNO)
Scientific Problem 
•Why is CREATE ASSERTION not supported? 
•Think about this: 
–The DBMS has our assertion expression but: 
•Would you accept full evaluation of given expression for every insert/update/delete? 
–No. 
•Performance would be horrible in real world db’s 
•You require a much more sophisticated execution model in the real world
Scientific Problem 
•The challenge is: 
–Given: arbitrary complex assertion expression + 
–Given: arbitrary complex SQL statement  
–What is the minimum required check that needs to be executed by the DBMS for the assertion to remain true? 
•Can be ‘nothing’ if assertion is immune for the given DML
For instance... 
•Department that employs president or manager should also employ administrator 
–Obviously only when DML operates on EMP 
1.Insert into emp values(100,’Smith’,’SALESREP’ ,’1/1/80’,’20/11/07’,7000,20); 
2.Insert into emp values(:b0,:b1,:b2 ,:b3,:b4,:b5,:b6); 
3.Insert into emp (select * from emp_loaded); 
4.Update emp set msal=1.05*msal; 
5.Delete from emp where empno=101;
Execution Models 
•Using triggers: 
–EM1: always 
–EM2: involved tables 
–EM3: involved columns 
–EM4: table polarities 
–EM5: involved literals (TE) 
–EM6: TE + minimal check
Execution Model 1 
•Evaluate every assertion on every DML statement 
–Evaluating every <boolean expression with subqueries> 
–On every DML statement 
•In after-statement table trigger 
–WOULD BE *VERY* INEFFICIENT 
•Let’s quickly forget this “EM1”
Execution Model 2 
•Only evaluate the assertions that involve the table that is being “DML-led” 
–Finding involved tables by parsing the assertion expression 
–Per assertion 100% code generation of a (insert/update/delete) “after statement” table trigger 
•Select from dual where [expression] 
•Found?  OK 
•Not found  raise_application_error
Execution Model 2 
•Using examples 2 and 3: 
–Admin_in_dept_with_vip  EMP table 
–Cannot_manage_more_than_2  DEPT table
Execution Model 2 
create trigger EMP_AIUDS_EMP01 
after insert or update or delete on EMP 
declare pl_dummy varchar(40); 
begin 
-- 
select 'Constraint EMP01 is satisfied' into pl_dummy 
from DUAL 
where not exists(select ‘a violation’ 
from (select distinct deptno from EMP) d 
where exists(select e2.* 
from EMP e2 
where e2.DEPTNO = d.DEPTNO 
and e2.JOB in ('PRESIDENT','MANAGER')) 
and not exists(select e3.* 
from EMP e3 
where e3.DEPTNO = d.DEPTNO 
and e3.JOB = 'ADMIN')); 
-- 
exception when no_data_found then 
raise_application_error(-20999,'Constraint EMP01 is violated.'); 
end; 
Assertion 
predicate
Execution Model 2 
create trigger DEPT_AIUDS_DEPT01 
after insert or update or delete on DEPT 
declare pl_dummy varchar(1); 
begin 
-- 
select ‘a' into pl_dummy 
from DUAL 
where not exists (select ‘a violation’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2)); 
-- 
exception when no_data_found then 
raise_application_error(-20999,'Constraint DEPT01 is violated.'); 
end; 
EM2 could be supported declaratively
Execution Model 2 
•Inefficiencies: 
–EMP01 and DEPT01 are checked when updating columns that are not involved, for instance: 
•Updating EMP.ENAME 
•Updating DEPT.LOC
Execution Model 3 
•For inserts + deletes: EM3 == EM2 
•For updates: only evaluate assertions that involve *columns* being changed 
–Simple parse will find columns 
–Assumes ‘clean specification’ 
•Create trigger syntax allows specification of columns that are being changed
Execution Model 3 
create trigger EMP_AUS_EMP01 
after update of DEPTNO,JOB on EMP 
declare pl_dummy varchar(40); 
Begin 
-- 
select 'Constraint EMP01 is satisfied' into pl_dummy 
from DUAL 
where not exists(select ‘department in violation’ 
from (select distinct deptno from EMP) d 
where exists(select e2.* 
from EMP e2 
where e2.DEPTNO = d.DEPTNO 
and e2.JOB in ('PRESIDENT','MANAGER')) 
and not exists(select e3.* 
from EMP e3 
where e3.DEPTNO = d.DEPTNO 
and e3.JOB = 'ADMIN')); 
-- 
exception when no_data_found then 
raise_application_error(-20999,'Constraint EMP01 is violated.'); 
end;
Execution Model 3 
create trigger DEPT_AIUDS_DEPT01 
after update of MGR on DEPT 
declare pl_dummy varchar(40); 
begin 
-- 
select ‘a' into pl_dummy 
from DUAL 
where not exists (select ‘x’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2)); 
-- 
exception when no_data_found then 
raise_application_error(-20999,'Constraint DEPT01 is violated.'); 
end; 
EM3 could be supported declaratively
Execution Model 3 
•Inefficiencies: 
–Sometimes inserts (e)or deletes can never violate a constraint 
–For Cannot_manage_more_than_2, deleting a department does not require re-validation 
–For Admin_in_dept_with_vip, both inserts and deletes do require re- validation
Execution Model 4 
•For updates: EM4 = EM3 
•For deletes and inserts EM4 drops unnecessary delete (e)or insert table triggers 
–Polarity of a table for a given constraint 
•Positive: inserts can violate 
•Negative: deletes can violate 
•Neutral: both can violate 
•Undefined: table is not involved 
Polarity of table for given constraint can be 
computed via special parsing
Execution Model 4 
•EM4 maintains: 
–All EM3 triggers, except for one: 
•Drops: 
–Cannot_manage_more_than_2 delete trigger 
EM4 could be supported declaratively
Execution Model 4 
•Inefficiencies: 
–Admin_in_dept_with_vip: eg. inserting SALESMAN, or deleting TRAINER does not require re-validation 
•Start involving literals mentioned in assertions 
•If assertion does not have literals then next EM is same as EM4 
–Cannot_manage_more_than_2 has no literals
Execution Model 5 
•How do we see: 
–Salesman is inserted? Trainer deleted? 
•Could parse the DML statement 
–But does not always work due to absence of literals 
•Make use of column values of affected rows 
–Requires “Transition Effect” (TE) of a DML statement 
•Common concept (aka. “delta”-tables) 
•Inserted_rows, Updated_rows, Deleted_rows 
–Maintaining TE is straightforward (see book) 
•EM5: Only check the assertion when a property holds in the TE
Execution Model 5 
•TE property for Admin_in_dept_with_vip: 
1.Inserted_rows holds a president or a manager or, 
2.Deleted_rows holds an admininstrator 
3.Updated rows shows that ...
Execution Model 5 
create trigger EMP_AIS_EMP01 
after insert on EMP 
declare pl_dummy varchar(40); 
begin 
-- If this returns no rows, then EMP01 cannot be violated. 
select 'EMP01 must be validated' into pl_dummy 
from DUAL 
where exists 
(select 'A president or manager has just been inserted' 
from inserted_rows 
where JOB in ('PRESIDENT','MANAGER')); 
-- 
begin 
-- 
<same trigger code as EM4> 
-- 
end; 
exception when no_data_found then 
-- No need to validate EMP01. 
null; 
-- 
end;
Execution Model 5 
create trigger EMP_ADS_EMP01 
after delete on EMP 
declare pl_dummy varchar(40); 
begin 
-- If this returns no rows, then EMP01 cannot be violated. 
select 'EMP01 must be validated' into pl_dummy 
from DUAL 
where exists 
(select 'An administrator has just been deleted' 
from deleted_rows 
where JOB = 'ADMIN'); 
-- 
begin 
-- 
<same trigger code as EM4> 
-- 
end; 
exception when no_data_found then 
-- No need to validate EMP01. 
null; 
-- 
end;
Execution Model 5 
•Update TE-property for EMP01: 
select 'EMP01 is in need of validation' 
from DUAL 
where exists 
(select 'Some department just won a president/ 
manager or just lost an administrator' 
from updated_rows 
where (n_job in ('PRESIDENT','MANAGER') and 
o_job not in ('PRESIDENT','MANAGER') 
or (o_job='ADMIN' and n_job<>'ADMIN') 
or (o_deptno<>n_deptno and 
(o_job='ADMIN' or n_job in 
('PRESIDENT','MANAGER'))) 
•Can be deduced from insert + delete properties 
•EM5 fully declarative too? 
–Here it gets complex...
Execution Model 5 
•Inefficiencies: 
–Admin_in_dept_with_vip: triggers validate all departments 
•Unacceptable in real-world databases 
•Only some require re-validation 
–Cannot_manage_more_than_2: triggers validate all department managers 
•Unacceptable in real-world databases 
•Only some require re-validation
Execution Model 6 
•On TE-property + optimized validation query 
–Use the TE-query to find: 
•Which deptno-values require re-validation 
•Which mgr-values require re-validation 
–Then use these values in the assertion- expression
create trigger EMP_AIS_EMP01 
after insert on EMP 
declare pl_dummy varchar(40); 
begin 
-- 
for r in (select distinct deptno 
from inserted_rows 
where JOB in ('PRESIDENT','MANAGER')); 
loop 
begin 
-- Note: this now uses r.deptno value from preceeding TE-query. 
select 'Constraint EMP01 is satisfied' into pl_dummy 
from DUAL 
where not exists(select ‘department in violation’ 
from (select distinct deptno from EMP where deptno = r.deptno) d 
where exists(select e2.* 
from EMP e2 
where e2.DEPTNO = d.DEPTNO 
and e2.JOB in ('PRESIDENT','MANAGER')) 
and not exists(select e3.* 
from EMP e3 
where e3.DEPTNO = d.DEPTNO 
and e3.JOB = 'ADMIN')); 
-- 
exception when no_data_found then 
-- 
raise_application_error(-20999, 
'Constraint EMP01 is violated for department '||to_char(r.deptno)||'.'); 
-- 
end; 
end loop; 
end;
Execution Model 6 
•This requires: 
–Detecting that the ASSERTION can be (re)written as a universal quantification 
–Can sometimes be done in multiple ways 
•Which to choose? 
–EM6 fully declarative? 
•Complexity introduced in EM5 further increases 
•Remember: given any arbitrary complex assertion + dml-statement
Still not there yet... 
•Then there is something else too... 
–Which is often overseen by database professionals 
–And, which is neglected in every research paper (I’ve read...) that deals with generating constraint validation code 
 Serializability
Concurrent Transactions 
•Deptno 13 has two admins and one manager 
–TX1 deletes an admin from 13 
•Does not yet commit 
–TX2 deletes the other admin 13 
•Commits 
–TX1 commits 
•Constraint is violated for deptno 13! 
–TX1 and TX2 must be serialized
Concurrent Transactions 
•Note: this is *not* about locking rows of data, but rather: locking a constraint No two TX’s can validate at same time 
•We can use DBMS_LOCK to serialize these transactions 
–See book for example code 
•Again complexity further increases
Concurrent Transactions 
•Concurrency impact of acquiring rule locks 
–EM1: One TX at a time 
–EM2: One TX per table at a time 
–EM3, EM4, EM5 slowly relaxes 
•Up to EM5: not acceptable 
–EM6: Only if two TX’s actually validate *and* involve same deptno (EMP01 assertion) 
•Acceptable
Another complicating factor 
•Deferrabilty... 
–Involves temporarily storing violation cases for re-evaluation at commit time 
–More comments on that in chapter 11 of the book
The Polite Excuse 
•Inefficient EM’s 
–Could be supported, but: 
•Are unacceptable wgt. Performance & transaction concurrency 
•Efficient EM’s 
–Aligned with business requirements 
•Performance and TX concurrency 
But, 
–Need more research to determine if they could be declaratively supported
Questions? 
•For slidedeck email me at toon@rulegen.com 
•Twitter @ToonKoppelaars

Weitere ähnliche Inhalte

Was ist angesagt?

Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10gsagai
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...Sveta Smirnova
 
Cassandra - lesson learned
Cassandra  - lesson learnedCassandra  - lesson learned
Cassandra - lesson learnedAndrzej Ludwikowski
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpAll Things Open
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programmingEric Polerecky
 
Nine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL VacuumNine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL VacuumAlexey Lesovsky
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmasterKyle Hailey
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Nyt Prof 200910
Nyt Prof 200910Nyt Prof 200910
Nyt Prof 200910HighLoad2009
 
PostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performanceVladimir Sitnikov
 
Successful Software Development with Apache Cassandra
Successful Software Development with Apache CassandraSuccessful Software Development with Apache Cassandra
Successful Software Development with Apache Cassandrazznate
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Kristofferson A
 
MySQL Performance schema missing_manual_flossuk
MySQL Performance schema missing_manual_flossukMySQL Performance schema missing_manual_flossuk
MySQL Performance schema missing_manual_flossukValeriy Kravchuk
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersKyle Hailey
 
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Severalnines
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
 
Oracle 10g Performance: chapter 09 enqueues
Oracle 10g Performance: chapter 09 enqueuesOracle 10g Performance: chapter 09 enqueues
Oracle 10g Performance: chapter 09 enqueuesKyle Hailey
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java BenchmarkingAzul Systems Inc.
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasKyle Hailey
 

Was ist angesagt? (20)

Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10g
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...
 
Cassandra - lesson learned
Cassandra  - lesson learnedCassandra  - lesson learned
Cassandra - lesson learned
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and Gulp
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programming
 
Nine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL VacuumNine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL Vacuum
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
Hotsos 2012
Hotsos 2012Hotsos 2012
Hotsos 2012
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Nyt Prof 200910
Nyt Prof 200910Nyt Prof 200910
Nyt Prof 200910
 
PostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performance
 
Successful Software Development with Apache Cassandra
Successful Software Development with Apache CassandraSuccessful Software Development with Apache Cassandra
Successful Software Development with Apache Cassandra
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
MySQL Performance schema missing_manual_flossuk
MySQL Performance schema missing_manual_flossukMySQL Performance schema missing_manual_flossuk
MySQL Performance schema missing_manual_flossuk
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with Galera
 
Oracle 10g Performance: chapter 09 enqueues
Oracle 10g Performance: chapter 09 enqueuesOracle 10g Performance: chapter 09 enqueues
Oracle 10g Performance: chapter 09 enqueues
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java Benchmarking
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
 

Andere mochten auch

Intro to ASH
Intro to ASHIntro to ASH
Intro to ASHKyle Hailey
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemCary Millsap
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upJohn Beresniewicz
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKyle Hailey
 
IEMFA presentation Madrid 17 May 2012
IEMFA presentation Madrid 17 May 2012IEMFA presentation Madrid 17 May 2012
IEMFA presentation Madrid 17 May 2012IEMFA
 
Flickr Video 2009
Flickr Video 2009Flickr Video 2009
Flickr Video 2009Bill Bolmeier
 
Successfully convince people with data visualization
Successfully convince people with data visualizationSuccessfully convince people with data visualization
Successfully convince people with data visualizationKyle Hailey
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007John Beresniewicz
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 Kyle Hailey
 
Voltage Transients and Health - Is There a Connection?
Voltage Transients and Health - Is There a Connection?Voltage Transients and Health - Is There a Connection?
Voltage Transients and Health - Is There a Connection?Mikko Ahonen
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013John Beresniewicz
 
Oracle 10g Performance: chapter 05 waits intro
Oracle 10g Performance: chapter 05 waits introOracle 10g Performance: chapter 05 waits intro
Oracle 10g Performance: chapter 05 waits introKyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsJohn Beresniewicz
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata securityKyle Hailey
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb Connor McDonald
 

Andere mochten auch (20)

Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add up
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data Platform
 
Regional Development versus Global Mitigation: Insights from GLOBIOM
Regional Development versus Global Mitigation: Insights from GLOBIOMRegional Development versus Global Mitigation: Insights from GLOBIOM
Regional Development versus Global Mitigation: Insights from GLOBIOM
 
IEMFA presentation Madrid 17 May 2012
IEMFA presentation Madrid 17 May 2012IEMFA presentation Madrid 17 May 2012
IEMFA presentation Madrid 17 May 2012
 
4 Kleinwechter- Agriculture and Forest Sector Long-Term Outlook from GLOBIOM
4 Kleinwechter-  Agriculture and Forest Sector Long-Term Outlook from GLOBIOM4 Kleinwechter-  Agriculture and Forest Sector Long-Term Outlook from GLOBIOM
4 Kleinwechter- Agriculture and Forest Sector Long-Term Outlook from GLOBIOM
 
Flickr Video 2009
Flickr Video 2009Flickr Video 2009
Flickr Video 2009
 
Successfully convince people with data visualization
Successfully convince people with data visualizationSuccessfully convince people with data visualization
Successfully convince people with data visualization
 
Social media strategy
Social media strategySocial media strategy
Social media strategy
 
New Crop Varieties and Climate Chane Adaptation, IAAE symposium 2015
New Crop Varieties and Climate Chane Adaptation, IAAE symposium 2015New Crop Varieties and Climate Chane Adaptation, IAAE symposium 2015
New Crop Varieties and Climate Chane Adaptation, IAAE symposium 2015
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
 
Voltage Transients and Health - Is There a Connection?
Voltage Transients and Health - Is There a Connection?Voltage Transients and Health - Is There a Connection?
Voltage Transients and Health - Is There a Connection?
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
 
Oracle 10g Performance: chapter 05 waits intro
Oracle 10g Performance: chapter 05 waits introOracle 10g Performance: chapter 05 waits intro
Oracle 10g Performance: chapter 05 waits intro
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
 

Ähnlich wie Oaktable World 2014 Toon Koppelaars: database constraints polite excuse

Exceptions Triggers function in SQL by Vasant Bhabad
Exceptions Triggers function in SQL by Vasant BhabadExceptions Triggers function in SQL by Vasant Bhabad
Exceptions Triggers function in SQL by Vasant Bhabadvasant Bhabad
 
10 Creating Triggers
10 Creating Triggers10 Creating Triggers
10 Creating Triggersrehaniltifat
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals INick Buytaert
 
Beginers guide for oracle sql
Beginers guide for oracle sqlBeginers guide for oracle sql
Beginers guide for oracle sqlN.Jagadish Kumar
 
Subqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactionsSubqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactionsmaxpane
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database ViewsMichael Rosenblum
 
Web Developer make the most out of your Database !
Web Developer make the most out of your Database !Web Developer make the most out of your Database !
Web Developer make the most out of your Database !Jean-Marc Desvaux
 
Bypass dbms assert
Bypass dbms assertBypass dbms assert
Bypass dbms assertfangjiafu
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoductionRiyaj Shamsudeen
 
e computer notes - Manipulating data
e computer notes - Manipulating datae computer notes - Manipulating data
e computer notes - Manipulating dataecomputernotes
 
How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012Connor McDonald
 
Performance tuning
Performance tuningPerformance tuning
Performance tuningami111
 
Simple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco KiesewetterSimple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco KiesewetterMarco M. Kiesewetter, MBA
 
Oracle pl sql
Oracle pl sqlOracle pl sql
Oracle pl sqlDurga Rao
 
SQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVsSQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVsFranklin Yamamoto
 

Ähnlich wie Oaktable World 2014 Toon Koppelaars: database constraints polite excuse (20)

Exceptions Triggers function in SQL by Vasant Bhabad
Exceptions Triggers function in SQL by Vasant BhabadExceptions Triggers function in SQL by Vasant Bhabad
Exceptions Triggers function in SQL by Vasant Bhabad
 
10 Creating Triggers
10 Creating Triggers10 Creating Triggers
10 Creating Triggers
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
Introduction to mysql part 3
Introduction to mysql part 3Introduction to mysql part 3
Introduction to mysql part 3
 
Beginers guide for oracle sql
Beginers guide for oracle sqlBeginers guide for oracle sql
Beginers guide for oracle sql
 
Subqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactionsSubqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactions
 
Java Micro-Benchmarking
Java Micro-BenchmarkingJava Micro-Benchmarking
Java Micro-Benchmarking
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database Views
 
Web Developer make the most out of your Database !
Web Developer make the most out of your Database !Web Developer make the most out of your Database !
Web Developer make the most out of your Database !
 
Bypass dbms assert
Bypass dbms assertBypass dbms assert
Bypass dbms assert
 
Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
 
e computer notes - Manipulating data
e computer notes - Manipulating datae computer notes - Manipulating data
e computer notes - Manipulating data
 
How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Simple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco KiesewetterSimple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco Kiesewetter
 
Oracle pl sql
Oracle pl sqlOracle pl sql
Oracle pl sql
 
SQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVsSQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVs
 

Mehr von Kyle Hailey

Hooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeHooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeKyle Hailey
 
Performance insights twitch
Performance insights twitchPerformance insights twitch
Performance insights twitchKyle Hailey
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoringKyle Hailey
 
Virtual Data : Eliminating the data constraint in Application Development
Virtual Data :  Eliminating the data constraint in Application DevelopmentVirtual Data :  Eliminating the data constraint in Application Development
Virtual Data : Eliminating the data constraint in Application DevelopmentKyle Hailey
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentKyle Hailey
 
Accelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataAccelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataKyle Hailey
 
Delphix and Pure Storage partner
Delphix and Pure Storage partnerDelphix and Pure Storage partner
Delphix and Pure Storage partnerKyle Hailey
 
Martin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysMartin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysKyle Hailey
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOpsKyle Hailey
 
Data as a Service
Data as a Service Data as a Service
Data as a Service Kyle Hailey
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning Kyle Hailey
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'Kyle Hailey
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationKyle Hailey
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Kyle Hailey
 
Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Kyle Hailey
 
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14Kyle Hailey
 
Delphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisDelphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisKyle Hailey
 
Data Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningData Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningKyle Hailey
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestroKyle Hailey
 
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
 

Mehr von Kyle Hailey (20)

Hooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeHooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume Lelarge
 
Performance insights twitch
Performance insights twitchPerformance insights twitch
Performance insights twitch
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
 
Virtual Data : Eliminating the data constraint in Application Development
Virtual Data :  Eliminating the data constraint in Application DevelopmentVirtual Data :  Eliminating the data constraint in Application Development
Virtual Data : Eliminating the data constraint in Application Development
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application Development
 
Accelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataAccelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual Data
 
Delphix and Pure Storage partner
Delphix and Pure Storage partnerDelphix and Pure Storage partner
Delphix and Pure Storage partner
 
Martin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysMartin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle Guys
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOps
 
Data as a Service
Data as a Service Data as a Service
Data as a Service
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
 
Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix
 
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
 
Delphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisDelphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan Lewis
 
Data Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningData Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloning
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
 
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

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto GonzĂĄlez Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

KĂźrzlich hochgeladen (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Oaktable World 2014 Toon Koppelaars: database constraints polite excuse

  • 1. Why SQL DBMS’s Still Lack Full Declarative Constraint Support (A polite excuse) Toon Koppelaars
  • 2. Who am I? •A database guy, relational dude –Developer (with DBA experience) •Oracle technology user since 1987 •Co-author of this book  •Today’s talk = last chapter
  • 3. Agenda •SQL Assertions? –A few examples •Validation Execution Models –More efficient along the way •Serializability – Probably the biggest problem •Conclusions
  • 4. SQL Assertions? •Examples 1.There is at most one president 2.One cannot manage more than two departments 3.Department with president and/or manager should have an administrator  Data integrity constraints –Just like: CHECK, PK, UK, FK –‘all the other ones’ They constrain data allowed in our tables They constrain data allowed in our tables
  • 5. Syntax? •Create assertion [some_name] as check([some_SQL_expression]); •For over 25 years part of Ansi/Iso SQL standard
  • 6. Example 1 •create assertion at_most_one_president as check (1 => (select count(*) from EMP e where e.JOB = ‘PRESIDENT’ ) ); •Task of DBMS: make sure it’s true at all times - Closed SQL expression (no free variables) - Evaluates to true or false
  • 7. Example 2 •create assertion cannot_manage_more_than_2 as check (not exists (select ‘x’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2 ) );
  • 8. Example 3 •create assertion admin_in_dept_with_vip as check (not exists (select ‘x’ from (select distinct e.DEPTNO from EMP e) e where exists (select ‘y’ from EMP e1 where e1.DEPTNO = e.DEPTNO and e1.JOB in (‘P’,’M’)) and not exists (select ‘z’ from EMP e2 where e2.DEPTNO = e.DEPTNO and e2.JOB = ‘ADMIN’) ) );
  • 9. •Can this be the killer feature of OracleXIII?
  • 10. Imagine... •If DBMS vendor would support these –How much less lines of code one would need to write in application development –How much less bugs this results into –How easy we could accomodate change requested by the business –How data quality would improve
  • 11. Point to be made •SQL assertions ‘cover’ all the other declarative constraints available –CHECK  can be written as assertion –PK/UK  can be written as assertion –FK  can be written as assertion •We just have shorthands for these, since these are so common in every database design
  • 12. Check writen as assertion •create assertion hire_only_18_plus as check (not exists (select ‘x’ from EMP e where e.HIRED - e.BORN < 18*365 ) ); CHECK((HIRED – BORN) >= 18*365)
  • 13. PK/UK written as assertion •create assertion empno_is_unique as check (not exists (select ‘x’ from EMP e1 ,EMP e2 where e1.EMPNO = e2.EMPNO and e1.rowid != e2.rowid ) ); PRIMARY KEY (EMPNO)
  • 14. FK written as assertion •create assertion work_in_known_dept as check (not exists (select ‘x’ from EMP e where not exists (select ‘y’ from DEPT d where d.deptno = e.deptno ) ) ); FOREIGN KEY (DEPTNO) REFERENCES DEPT(DEPTNO)
  • 15. Scientific Problem •Why is CREATE ASSERTION not supported? •Think about this: –The DBMS has our assertion expression but: •Would you accept full evaluation of given expression for every insert/update/delete? –No. •Performance would be horrible in real world db’s •You require a much more sophisticated execution model in the real world
  • 16. Scientific Problem •The challenge is: –Given: arbitrary complex assertion expression + –Given: arbitrary complex SQL statement  –What is the minimum required check that needs to be executed by the DBMS for the assertion to remain true? •Can be ‘nothing’ if assertion is immune for the given DML
  • 17. For instance... •Department that employs president or manager should also employ administrator –Obviously only when DML operates on EMP 1.Insert into emp values(100,’Smith’,’SALESREP’ ,’1/1/80’,’20/11/07’,7000,20); 2.Insert into emp values(:b0,:b1,:b2 ,:b3,:b4,:b5,:b6); 3.Insert into emp (select * from emp_loaded); 4.Update emp set msal=1.05*msal; 5.Delete from emp where empno=101;
  • 18. Execution Models •Using triggers: –EM1: always –EM2: involved tables –EM3: involved columns –EM4: table polarities –EM5: involved literals (TE) –EM6: TE + minimal check
  • 19. Execution Model 1 •Evaluate every assertion on every DML statement –Evaluating every <boolean expression with subqueries> –On every DML statement •In after-statement table trigger –WOULD BE *VERY* INEFFICIENT •Let’s quickly forget this “EM1”
  • 20. Execution Model 2 •Only evaluate the assertions that involve the table that is being “DML-led” –Finding involved tables by parsing the assertion expression –Per assertion 100% code generation of a (insert/update/delete) “after statement” table trigger •Select from dual where [expression] •Found?  OK •Not found  raise_application_error
  • 21. Execution Model 2 •Using examples 2 and 3: –Admin_in_dept_with_vip  EMP table –Cannot_manage_more_than_2  DEPT table
  • 22. Execution Model 2 create trigger EMP_AIUDS_EMP01 after insert or update or delete on EMP declare pl_dummy varchar(40); begin -- select 'Constraint EMP01 is satisfied' into pl_dummy from DUAL where not exists(select ‘a violation’ from (select distinct deptno from EMP) d where exists(select e2.* from EMP e2 where e2.DEPTNO = d.DEPTNO and e2.JOB in ('PRESIDENT','MANAGER')) and not exists(select e3.* from EMP e3 where e3.DEPTNO = d.DEPTNO and e3.JOB = 'ADMIN')); -- exception when no_data_found then raise_application_error(-20999,'Constraint EMP01 is violated.'); end; Assertion predicate
  • 23. Execution Model 2 create trigger DEPT_AIUDS_DEPT01 after insert or update or delete on DEPT declare pl_dummy varchar(1); begin -- select ‘a' into pl_dummy from DUAL where not exists (select ‘a violation’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2)); -- exception when no_data_found then raise_application_error(-20999,'Constraint DEPT01 is violated.'); end; EM2 could be supported declaratively
  • 24. Execution Model 2 •Inefficiencies: –EMP01 and DEPT01 are checked when updating columns that are not involved, for instance: •Updating EMP.ENAME •Updating DEPT.LOC
  • 25. Execution Model 3 •For inserts + deletes: EM3 == EM2 •For updates: only evaluate assertions that involve *columns* being changed –Simple parse will find columns –Assumes ‘clean specification’ •Create trigger syntax allows specification of columns that are being changed
  • 26. Execution Model 3 create trigger EMP_AUS_EMP01 after update of DEPTNO,JOB on EMP declare pl_dummy varchar(40); Begin -- select 'Constraint EMP01 is satisfied' into pl_dummy from DUAL where not exists(select ‘department in violation’ from (select distinct deptno from EMP) d where exists(select e2.* from EMP e2 where e2.DEPTNO = d.DEPTNO and e2.JOB in ('PRESIDENT','MANAGER')) and not exists(select e3.* from EMP e3 where e3.DEPTNO = d.DEPTNO and e3.JOB = 'ADMIN')); -- exception when no_data_found then raise_application_error(-20999,'Constraint EMP01 is violated.'); end;
  • 27. Execution Model 3 create trigger DEPT_AIUDS_DEPT01 after update of MGR on DEPT declare pl_dummy varchar(40); begin -- select ‘a' into pl_dummy from DUAL where not exists (select ‘x’ from (select d.MGR ,count(*) as cnt from DEPT d group by d.MGR) where cnt > 2)); -- exception when no_data_found then raise_application_error(-20999,'Constraint DEPT01 is violated.'); end; EM3 could be supported declaratively
  • 28. Execution Model 3 •Inefficiencies: –Sometimes inserts (e)or deletes can never violate a constraint –For Cannot_manage_more_than_2, deleting a department does not require re-validation –For Admin_in_dept_with_vip, both inserts and deletes do require re- validation
  • 29. Execution Model 4 •For updates: EM4 = EM3 •For deletes and inserts EM4 drops unnecessary delete (e)or insert table triggers –Polarity of a table for a given constraint •Positive: inserts can violate •Negative: deletes can violate •Neutral: both can violate •Undefined: table is not involved Polarity of table for given constraint can be computed via special parsing
  • 30. Execution Model 4 •EM4 maintains: –All EM3 triggers, except for one: •Drops: –Cannot_manage_more_than_2 delete trigger EM4 could be supported declaratively
  • 31. Execution Model 4 •Inefficiencies: –Admin_in_dept_with_vip: eg. inserting SALESMAN, or deleting TRAINER does not require re-validation •Start involving literals mentioned in assertions •If assertion does not have literals then next EM is same as EM4 –Cannot_manage_more_than_2 has no literals
  • 32. Execution Model 5 •How do we see: –Salesman is inserted? Trainer deleted? •Could parse the DML statement –But does not always work due to absence of literals •Make use of column values of affected rows –Requires “Transition Effect” (TE) of a DML statement •Common concept (aka. “delta”-tables) •Inserted_rows, Updated_rows, Deleted_rows –Maintaining TE is straightforward (see book) •EM5: Only check the assertion when a property holds in the TE
  • 33. Execution Model 5 •TE property for Admin_in_dept_with_vip: 1.Inserted_rows holds a president or a manager or, 2.Deleted_rows holds an admininstrator 3.Updated rows shows that ...
  • 34. Execution Model 5 create trigger EMP_AIS_EMP01 after insert on EMP declare pl_dummy varchar(40); begin -- If this returns no rows, then EMP01 cannot be violated. select 'EMP01 must be validated' into pl_dummy from DUAL where exists (select 'A president or manager has just been inserted' from inserted_rows where JOB in ('PRESIDENT','MANAGER')); -- begin -- <same trigger code as EM4> -- end; exception when no_data_found then -- No need to validate EMP01. null; -- end;
  • 35. Execution Model 5 create trigger EMP_ADS_EMP01 after delete on EMP declare pl_dummy varchar(40); begin -- If this returns no rows, then EMP01 cannot be violated. select 'EMP01 must be validated' into pl_dummy from DUAL where exists (select 'An administrator has just been deleted' from deleted_rows where JOB = 'ADMIN'); -- begin -- <same trigger code as EM4> -- end; exception when no_data_found then -- No need to validate EMP01. null; -- end;
  • 36. Execution Model 5 •Update TE-property for EMP01: select 'EMP01 is in need of validation' from DUAL where exists (select 'Some department just won a president/ manager or just lost an administrator' from updated_rows where (n_job in ('PRESIDENT','MANAGER') and o_job not in ('PRESIDENT','MANAGER') or (o_job='ADMIN' and n_job<>'ADMIN') or (o_deptno<>n_deptno and (o_job='ADMIN' or n_job in ('PRESIDENT','MANAGER'))) •Can be deduced from insert + delete properties •EM5 fully declarative too? –Here it gets complex...
  • 37. Execution Model 5 •Inefficiencies: –Admin_in_dept_with_vip: triggers validate all departments •Unacceptable in real-world databases •Only some require re-validation –Cannot_manage_more_than_2: triggers validate all department managers •Unacceptable in real-world databases •Only some require re-validation
  • 38. Execution Model 6 •On TE-property + optimized validation query –Use the TE-query to find: •Which deptno-values require re-validation •Which mgr-values require re-validation –Then use these values in the assertion- expression
  • 39. create trigger EMP_AIS_EMP01 after insert on EMP declare pl_dummy varchar(40); begin -- for r in (select distinct deptno from inserted_rows where JOB in ('PRESIDENT','MANAGER')); loop begin -- Note: this now uses r.deptno value from preceeding TE-query. select 'Constraint EMP01 is satisfied' into pl_dummy from DUAL where not exists(select ‘department in violation’ from (select distinct deptno from EMP where deptno = r.deptno) d where exists(select e2.* from EMP e2 where e2.DEPTNO = d.DEPTNO and e2.JOB in ('PRESIDENT','MANAGER')) and not exists(select e3.* from EMP e3 where e3.DEPTNO = d.DEPTNO and e3.JOB = 'ADMIN')); -- exception when no_data_found then -- raise_application_error(-20999, 'Constraint EMP01 is violated for department '||to_char(r.deptno)||'.'); -- end; end loop; end;
  • 40. Execution Model 6 •This requires: –Detecting that the ASSERTION can be (re)written as a universal quantification –Can sometimes be done in multiple ways •Which to choose? –EM6 fully declarative? •Complexity introduced in EM5 further increases •Remember: given any arbitrary complex assertion + dml-statement
  • 41. Still not there yet... •Then there is something else too... –Which is often overseen by database professionals –And, which is neglected in every research paper (I’ve read...) that deals with generating constraint validation code  Serializability
  • 42. Concurrent Transactions •Deptno 13 has two admins and one manager –TX1 deletes an admin from 13 •Does not yet commit –TX2 deletes the other admin 13 •Commits –TX1 commits •Constraint is violated for deptno 13! –TX1 and TX2 must be serialized
  • 43. Concurrent Transactions •Note: this is *not* about locking rows of data, but rather: locking a constraint No two TX’s can validate at same time •We can use DBMS_LOCK to serialize these transactions –See book for example code •Again complexity further increases
  • 44. Concurrent Transactions •Concurrency impact of acquiring rule locks –EM1: One TX at a time –EM2: One TX per table at a time –EM3, EM4, EM5 slowly relaxes •Up to EM5: not acceptable –EM6: Only if two TX’s actually validate *and* involve same deptno (EMP01 assertion) •Acceptable
  • 45. Another complicating factor •Deferrabilty... –Involves temporarily storing violation cases for re-evaluation at commit time –More comments on that in chapter 11 of the book
  • 46. The Polite Excuse •Inefficient EM’s –Could be supported, but: •Are unacceptable wgt. Performance & transaction concurrency •Efficient EM’s –Aligned with business requirements •Performance and TX concurrency But, –Need more research to determine if they could be declaratively supported
  • 47. Questions? •For slidedeck email me at toon@rulegen.com •Twitter @ToonKoppelaars