SlideShare una empresa de Scribd logo
1 de 25
Transaction Processing
http://ebiztechnics.blogspot.com
Objectives
• Describe Transaction Processing in Forms
• Commit Triggers and Usage
• Commit Status
• Implementing Array DML
http://ebiztechnics.blogspot.com
Transaction Processing
Save
Transaction (Begin)
FORM A
Block#1
Block#2
New Record
Updated Record
Deleted Record
Updated Record
Commit work;Commit work;
INSERT INTO Table1INSERT INTO Table1
UPDATE Table1UPDATE Table1
DELETE FROM Table2DELETE FROM Table2
UPDATE Table2UPDATE Table2
Transaction (End)
Action Edit
http://ebiztechnics.blogspot.com
Transaction Processing
Transaction processing consists of two phases:
• Post:
– Writes record changes to base tables
– Fires transactional triggers
• Commit: Performs database commit
Errors result in:
• Rollback of the database changes
• Error message
http://ebiztechnics.blogspot.com
Commit Sequence of Triggers
Pre-Commit
Pre-Delete
Post-Delete
Delete row
1
More
Records
http://ebiztechnics.blogspot.com
Commit Sequence of Triggers
Pre-Insert
Post-Insert
1
Insert
Insert row
Pre-Update
Post-Update
Update
Update row
Post-Database-Commit
Post-Forms-Commit
Finish
More
Records
More
Blocks
http://ebiztechnics.blogspot.com
Commit Triggers
• Pre-Commit: Fires once if form changes are made or uncommitted
changes are posted
• Pre- and Post-DML
• On-DML: Fires per record, replacing default DML on row
Use DELETE_RECORD, INSERT_RECORD, UPDATE_RECORD
built-ins
http://ebiztechnics.blogspot.com
Commit Triggers
• Post-Forms-Commit: Fires once even if no changes are made
• Post-Database-Commit: Fires once even if no changes are made
Note: A commit-trigger failure causes a rollback to
the savepoint.
http://ebiztechnics.blogspot.com
Usage of Commit Triggers
Pre-Commit
Pre-Delete
Pre-Insert
Pre-Update
Check user authorization; set up special locking
Journaling; implement foreign-key delete rule
Generate sequence numbers; journaling;
automatically generated columns; check
constraints
Journaling; implement foreign-key update rule;
auto-generated columns; check constraints
http://ebiztechnics.blogspot.com
Usage of Commit Triggers
On-Insert/Update/Delete
Post-Forms-Commit
Post-Database-Commit
Replace default block
DML statements
Check complex multirow
constraints
Test commit success;
test uncommitted posts
http://ebiztechnics.blogspot.com
Update Processing
ColumnItem
Query
Rollback
Data
20 20
Locked
Query
Commit 30 30
30 20Update record in form
[Save] 30 20[Save]
Pre-Update 30 20Pre-Update
Row Updated 30 30 20Row updated
Post-Update 30 30 20Post-Update
http://ebiztechnics.blogspot.com
Pre-Delete Trigger
• Check Before Deletion
DECLARE
CURSOR empcur IS
SELECT ’x’ FROM dept
WHERE deptno = :emp.deptno;
BEGIN
OPEN empcur;
FETCH empcur INTO :GLOBAL.x;
IF empcur%FOUND THEN
CLOSE C1;
MESSAGE(’There are employees in this dept..can not
delete’);
RAISE form_trigger_failure;
ELSE
CLOSE empcur;
END IF;
END;
http://ebiztechnics.blogspot.com
Assigning Sequence Nos.
• Pre-Insert Trigger
SELECT empseq.nextval
INTO :emp.empno
FROM dual;
Note: Sequence value will be visible after committing, because Pre-Insert
trigger fires after committing.
http://ebiztechnics.blogspot.com
Keeping an Audit Trail
• Write changes to nonbase tables.
• Gather statistics on applied changes.
Post-Insert example:
:GLOBAL.total_ins:=
TO_CHAR(TO_NUMBER(:GLOBAL.total_ins)+1);
http://ebiztechnics.blogspot.com
Test the success of DMLs
• SQL%FOUND
• SQL%NOTFOUND
• SQL%ROWCOUNT
UPDATE …….
SET…..
WHERE …..;
IF SQL%NOTFOUND THEN
MESSAGE(’Record does not exists’);
RAISE form_trigger_failure;
END IF;
http://ebiztechnics.blogspot.com
DML Statements Issued During Commit
Processing
INSERT INTO base_table (base_column, base_column,...)
VALUES (:base_item, :base_item, ...)
UPDATE base_table
SET base_column = :base_item, base_column =
:base_item, ...
WHERE ROWID = :ROWID
DELETE FROM base_table
WHERE ROWID = :ROWID
http://ebiztechnics.blogspot.com
DML Statements Issued During Commit
Processing
Rules:
• DML statements may fire database triggers.
• Form Builder uses and retrieves ROWID.
• The Update Changed Columns Only and Enforce Column Security
properties affect UPDATE statements.
• Locking statements are not issued.
http://ebiztechnics.blogspot.com
Overriding default transaction
On-Check-Unique
On-Column-Security
On-Commit
On-Rollback
On-Savepoint
On-Sequence-Number
CHECK_RECORD_UNIQUENESS
ENFORCE_COLUMN_SECURITY
COMMIT_FORM
ISSUE_ROLLBACK
ISSUE_SAVEPOINT
GENERATE_SEQUENCE_NUMBER
Trigger Do-the-Right-Thing Built-in
On-Logon
On-Logout
LOGON
LOGOUT
Transactional Triggers
For Logging on and off
http://ebiztechnics.blogspot.com
Commit Status
• What is Commit Status?
• SYSTEM.RECORD_STATUS:
– NEW
– INSERT (also caused by control items)
– QUERY
– CHANGED
• SYSTEM.BLOCK_STATUS:
– NEW (may contain records with status INSERT)
– QUERY (also possible for control block)
– CHANGED (block will be committed)
http://ebiztechnics.blogspot.com
Commit Status
• SYSTEM.FORM_STATUS:
– NEW
– QUERY
– CHANGED
• System variables versus built-ins for commit status
• Built-ins for getting and setting commit status:
– GET_BLOCK_PROPERTY
– GET_RECORD_PROPERTY
– SET_ RECORD _PROPERTY
http://ebiztechnics.blogspot.com
Commit Status
• Do not confuse commit status with validation status.
• The commit status is updated during validation.
IF :SYSTEM.BLOCK_STATUS IN (‘NEW’,’CHANGED’) THEN
COMMIT_FORM;
END IF;
CLEAR_FORM;
http://ebiztechnics.blogspot.com
Array DML
• Performs array inserts, updates, and deletes
• Vastly reduces network traffic
Fewer round trips (exact
number depends on array
size)
Empno Ename Job Sal
7369 SMITH CLERK 800
7499 ALLEN SALESMAN 1600
7521 WARD SALESMAN 1250
7566 JONES ANAGER 2975
7654 MARTIN SALESMAN 1250
7698 BLAKE MANAGER 2850
7782 CLARK MANAGER 2450
2 inserts
2 updates
1 delete Database
http://ebiztechnics.blogspot.com
Effect of Array DML on Transactional
Triggers
Array DML Size = 1 Array DML Size > 1
Fires
Fires for each
insert, update,
delete
Fires for each
insert, update,
delete
Repeated
for each
insert,
update,
delete
POST-
PRE-
DML
Fires
DML
POST-
PRE-
http://ebiztechnics.blogspot.com
Implementing Array DML
1. Enable the Array Processing option.
2. Specify a DML Array Size of greater than 1.
3. Specify block primary keys.
http://ebiztechnics.blogspot.com
Summary
• Post and commit phases
• Flow of commit processing
• DML statements issued during commit processing
• Characteristics and common uses of commit triggers
• Overriding default transaction processing
• Getting and setting the commit status
• Implementing Array DML
http://ebiztechnics.blogspot.com

Más contenido relacionado

La actualidad más candente

Oracle Forms: Introduction to multiple Forms
Oracle Forms: Introduction to multiple FormsOracle Forms: Introduction to multiple Forms
Oracle Forms: Introduction to multiple FormsSekhar Byna
 
Oracle Forms: Non input Items
Oracle Forms:  Non input ItemsOracle Forms:  Non input Items
Oracle Forms: Non input ItemsSekhar Byna
 
Oracle Forms : Multiple Forms
Oracle Forms : Multiple FormsOracle Forms : Multiple Forms
Oracle Forms : Multiple FormsSekhar Byna
 
Oracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different SourcesOracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different SourcesSekhar Byna
 
Oracle Forms: Messages
Oracle Forms: MessagesOracle Forms: Messages
Oracle Forms: MessagesSekhar Byna
 
Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Sekhar Byna
 
Oracle Forms Triggers
Oracle Forms TriggersOracle Forms Triggers
Oracle Forms TriggersSekhar Byna
 
Oracle Forms Tutorial (www.aboutoracleapps.com)
Oracle Forms Tutorial (www.aboutoracleapps.com)Oracle Forms Tutorial (www.aboutoracleapps.com)
Oracle Forms Tutorial (www.aboutoracleapps.com)magupta26
 
Oracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesOracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesSekhar Byna
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1abdull466
 
Oracle Forms Mouse triggers
Oracle Forms Mouse triggersOracle Forms Mouse triggers
Oracle Forms Mouse triggersSekhar Byna
 
Oracle EBS R12 Sales order personalization
Oracle EBS R12 Sales order personalizationOracle EBS R12 Sales order personalization
Oracle EBS R12 Sales order personalizationAhmed Elshayeb
 
Oracle R12 inventory Table name details with description
Oracle R12 inventory Table name details with descriptionOracle R12 inventory Table name details with description
Oracle R12 inventory Table name details with descriptionBoopathy CS
 
Oracle Forms Creation
Oracle Forms CreationOracle Forms Creation
Oracle Forms CreationSekhar Byna
 
Oracle Forms : Coding ..
Oracle Forms : Coding ..Oracle Forms : Coding ..
Oracle Forms : Coding ..Sekhar Byna
 

La actualidad más candente (20)

Oracle Forms: Introduction to multiple Forms
Oracle Forms: Introduction to multiple FormsOracle Forms: Introduction to multiple Forms
Oracle Forms: Introduction to multiple Forms
 
Oracle Apps - Forms
Oracle Apps - FormsOracle Apps - Forms
Oracle Apps - Forms
 
Oracle Forms: Non input Items
Oracle Forms:  Non input ItemsOracle Forms:  Non input Items
Oracle Forms: Non input Items
 
Oracle Forms : Multiple Forms
Oracle Forms : Multiple FormsOracle Forms : Multiple Forms
Oracle Forms : Multiple Forms
 
Oracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different SourcesOracle Forms: Data Blocks on Different Sources
Oracle Forms: Data Blocks on Different Sources
 
Oracle Forms: Messages
Oracle Forms: MessagesOracle Forms: Messages
Oracle Forms: Messages
 
Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)
 
Oracle report from ppt
Oracle report from pptOracle report from ppt
Oracle report from ppt
 
Oracle Forms Triggers
Oracle Forms TriggersOracle Forms Triggers
Oracle Forms Triggers
 
Oracle Forms Tutorial (www.aboutoracleapps.com)
Oracle Forms Tutorial (www.aboutoracleapps.com)Oracle Forms Tutorial (www.aboutoracleapps.com)
Oracle Forms Tutorial (www.aboutoracleapps.com)
 
Oracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesOracle Forms :Window and Canvases
Oracle Forms :Window and Canvases
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
 
Oracle Forms Mouse triggers
Oracle Forms Mouse triggersOracle Forms Mouse triggers
Oracle Forms Mouse triggers
 
Oracle EBS R12 Sales order personalization
Oracle EBS R12 Sales order personalizationOracle EBS R12 Sales order personalization
Oracle EBS R12 Sales order personalization
 
Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
Oracle R12 inventory Table name details with description
Oracle R12 inventory Table name details with descriptionOracle R12 inventory Table name details with description
Oracle R12 inventory Table name details with description
 
Oracle forms personalization
Oracle forms personalizationOracle forms personalization
Oracle forms personalization
 
oracle-reports6i
oracle-reports6ioracle-reports6i
oracle-reports6i
 
Oracle Forms Creation
Oracle Forms CreationOracle Forms Creation
Oracle Forms Creation
 
Oracle Forms : Coding ..
Oracle Forms : Coding ..Oracle Forms : Coding ..
Oracle Forms : Coding ..
 

Destacado

Oracle Forms: Menu
Oracle Forms: MenuOracle Forms: Menu
Oracle Forms: MenuSekhar Byna
 
Oracle Forms-Canvas types
Oracle Forms-Canvas typesOracle Forms-Canvas types
Oracle Forms-Canvas typesSekhar Byna
 
Oracle Forms :Object Features In forms
Oracle Forms :Object Features In formsOracle Forms :Object Features In forms
Oracle Forms :Object Features In formsSekhar Byna
 
Part 16 ALERT USING ORACLE 10G FORM BUILDER
Part 16 ALERT USING ORACLE 10G FORM BUILDERPart 16 ALERT USING ORACLE 10G FORM BUILDER
Part 16 ALERT USING ORACLE 10G FORM BUILDERGirija Muscut
 
Oracle Forms : Reusable Components
Oracle Forms : Reusable ComponentsOracle Forms : Reusable Components
Oracle Forms : Reusable ComponentsSekhar Byna
 
database-canvas with multiple datablocks(database)
database-canvas with multiple datablocks(database)database-canvas with multiple datablocks(database)
database-canvas with multiple datablocks(database)welcometofacebook
 
Oracle Forms Creation part 3
Oracle Forms Creation part 3Oracle Forms Creation part 3
Oracle Forms Creation part 3Sekhar Byna
 
Oracle apps online training
Oracle apps online trainingOracle apps online training
Oracle apps online trainingSekhar Byna
 
Software de aplicación
Software de aplicaciónSoftware de aplicación
Software de aplicaciónGriseld Reyes
 
Oracle forms Lesson 15 debuging triggers
Oracle forms Lesson 15  debuging triggersOracle forms Lesson 15  debuging triggers
Oracle forms Lesson 15 debuging triggersKAMA3
 
PL SQL Diplomado Oracle
PL SQL Diplomado OraclePL SQL Diplomado Oracle
PL SQL Diplomado OracleUzziel Chaidez
 

Destacado (12)

Oracle Forms: Menu
Oracle Forms: MenuOracle Forms: Menu
Oracle Forms: Menu
 
Oracle Forms-Canvas types
Oracle Forms-Canvas typesOracle Forms-Canvas types
Oracle Forms-Canvas types
 
Oracle Forms :Object Features In forms
Oracle Forms :Object Features In formsOracle Forms :Object Features In forms
Oracle Forms :Object Features In forms
 
Part 16 ALERT USING ORACLE 10G FORM BUILDER
Part 16 ALERT USING ORACLE 10G FORM BUILDERPart 16 ALERT USING ORACLE 10G FORM BUILDER
Part 16 ALERT USING ORACLE 10G FORM BUILDER
 
the cb model
the cb modelthe cb model
the cb model
 
Oracle Forms : Reusable Components
Oracle Forms : Reusable ComponentsOracle Forms : Reusable Components
Oracle Forms : Reusable Components
 
database-canvas with multiple datablocks(database)
database-canvas with multiple datablocks(database)database-canvas with multiple datablocks(database)
database-canvas with multiple datablocks(database)
 
Oracle Forms Creation part 3
Oracle Forms Creation part 3Oracle Forms Creation part 3
Oracle Forms Creation part 3
 
Oracle apps online training
Oracle apps online trainingOracle apps online training
Oracle apps online training
 
Software de aplicación
Software de aplicaciónSoftware de aplicación
Software de aplicación
 
Oracle forms Lesson 15 debuging triggers
Oracle forms Lesson 15  debuging triggersOracle forms Lesson 15  debuging triggers
Oracle forms Lesson 15 debuging triggers
 
PL SQL Diplomado Oracle
PL SQL Diplomado OraclePL SQL Diplomado Oracle
PL SQL Diplomado Oracle
 

Similar a Oracle Forms : Transnational Triggers

Oracle forms les21
Oracle forms  les21Oracle forms  les21
Oracle forms les21Abed Othman
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQLVikash Sharma
 
PgConf US 2015 - ALTER DATABASE ADD more SANITY
PgConf US 2015  - ALTER DATABASE ADD more SANITYPgConf US 2015  - ALTER DATABASE ADD more SANITY
PgConf US 2015 - ALTER DATABASE ADD more SANITYOleksii Kliukin
 
Database Automation with MySQL Triggers and Event Schedulers
Database Automation with MySQL Triggers and Event SchedulersDatabase Automation with MySQL Triggers and Event Schedulers
Database Automation with MySQL Triggers and Event SchedulersAbdul Rahman Sherzad
 
SQL WORKSHOP::Lecture 9
SQL WORKSHOP::Lecture 9SQL WORKSHOP::Lecture 9
SQL WORKSHOP::Lecture 9Umair Amjad
 
Getting Started with MySQL II
Getting Started with MySQL IIGetting Started with MySQL II
Getting Started with MySQL IISankhya_Analytics
 
Change tracking
Change trackingChange tracking
Change trackingSonny56
 
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
 
Les09[1]Manipulating Data
Les09[1]Manipulating DataLes09[1]Manipulating Data
Les09[1]Manipulating Datasiavosh kaviani
 
Recovery & Atom city & Log based Recovery
Recovery & Atom city & Log based RecoveryRecovery & Atom city & Log based Recovery
Recovery & Atom city & Log based RecoveryMeghaj Mallick
 

Similar a Oracle Forms : Transnational Triggers (20)

Les21
Les21Les21
Les21
 
Oracle forms les21
Oracle forms  les21Oracle forms  les21
Oracle forms les21
 
Les09
Les09Les09
Les09
 
Sql transacation
Sql transacationSql transacation
Sql transacation
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQL
 
PgConf US 2015 - ALTER DATABASE ADD more SANITY
PgConf US 2015  - ALTER DATABASE ADD more SANITYPgConf US 2015  - ALTER DATABASE ADD more SANITY
PgConf US 2015 - ALTER DATABASE ADD more SANITY
 
Database Automation with MySQL Triggers and Event Schedulers
Database Automation with MySQL Triggers and Event SchedulersDatabase Automation with MySQL Triggers and Event Schedulers
Database Automation with MySQL Triggers and Event Schedulers
 
SQL WORKSHOP::Lecture 9
SQL WORKSHOP::Lecture 9SQL WORKSHOP::Lecture 9
SQL WORKSHOP::Lecture 9
 
IR SQLite Session #3
IR SQLite Session #3IR SQLite Session #3
IR SQLite Session #3
 
Getting Started with MySQL II
Getting Started with MySQL IIGetting Started with MySQL II
Getting Started with MySQL II
 
Les09 Manipulating Data
Les09 Manipulating DataLes09 Manipulating Data
Les09 Manipulating Data
 
Change tracking
Change trackingChange tracking
Change tracking
 
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
 
Les09[1]Manipulating Data
Les09[1]Manipulating DataLes09[1]Manipulating Data
Les09[1]Manipulating Data
 
triggers.pptx
triggers.pptxtriggers.pptx
triggers.pptx
 
Less09 Data
Less09 DataLess09 Data
Less09 Data
 
Simple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco KiesewetterSimple ETL Solution - Marco Kiesewetter
Simple ETL Solution - Marco Kiesewetter
 
Manipulating data
Manipulating dataManipulating data
Manipulating data
 
Recovery & Atom city & Log based Recovery
Recovery & Atom city & Log based RecoveryRecovery & Atom city & Log based Recovery
Recovery & Atom city & Log based Recovery
 

Más de Sekhar Byna

Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architectureSekhar Byna
 
oracle APPS: Weekly Update
oracle APPS: Weekly Updateoracle APPS: Weekly Update
oracle APPS: Weekly UpdateSekhar Byna
 
Oracle APPS :Receivables Auto Invoice
Oracle APPS :Receivables Auto InvoiceOracle APPS :Receivables Auto Invoice
Oracle APPS :Receivables Auto InvoiceSekhar Byna
 
Oracle Forms : Timers
Oracle Forms : TimersOracle Forms : Timers
Oracle Forms : TimersSekhar Byna
 
Oracle Forms: Oracle Server features
Oracle Forms: Oracle Server featuresOracle Forms: Oracle Server features
Oracle Forms: Oracle Server featuresSekhar Byna
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms IntroductionSekhar Byna
 

Más de Sekhar Byna (6)

Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architecture
 
oracle APPS: Weekly Update
oracle APPS: Weekly Updateoracle APPS: Weekly Update
oracle APPS: Weekly Update
 
Oracle APPS :Receivables Auto Invoice
Oracle APPS :Receivables Auto InvoiceOracle APPS :Receivables Auto Invoice
Oracle APPS :Receivables Auto Invoice
 
Oracle Forms : Timers
Oracle Forms : TimersOracle Forms : Timers
Oracle Forms : Timers
 
Oracle Forms: Oracle Server features
Oracle Forms: Oracle Server featuresOracle Forms: Oracle Server features
Oracle Forms: Oracle Server features
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
 

Último

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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
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
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
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
 
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
 
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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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
 

Último (20)

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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
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...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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 ...
 
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
 
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 ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
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
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

Oracle Forms : Transnational Triggers

  • 2. Objectives • Describe Transaction Processing in Forms • Commit Triggers and Usage • Commit Status • Implementing Array DML http://ebiztechnics.blogspot.com
  • 3. Transaction Processing Save Transaction (Begin) FORM A Block#1 Block#2 New Record Updated Record Deleted Record Updated Record Commit work;Commit work; INSERT INTO Table1INSERT INTO Table1 UPDATE Table1UPDATE Table1 DELETE FROM Table2DELETE FROM Table2 UPDATE Table2UPDATE Table2 Transaction (End) Action Edit http://ebiztechnics.blogspot.com
  • 4. Transaction Processing Transaction processing consists of two phases: • Post: – Writes record changes to base tables – Fires transactional triggers • Commit: Performs database commit Errors result in: • Rollback of the database changes • Error message http://ebiztechnics.blogspot.com
  • 5. Commit Sequence of Triggers Pre-Commit Pre-Delete Post-Delete Delete row 1 More Records http://ebiztechnics.blogspot.com
  • 6. Commit Sequence of Triggers Pre-Insert Post-Insert 1 Insert Insert row Pre-Update Post-Update Update Update row Post-Database-Commit Post-Forms-Commit Finish More Records More Blocks http://ebiztechnics.blogspot.com
  • 7. Commit Triggers • Pre-Commit: Fires once if form changes are made or uncommitted changes are posted • Pre- and Post-DML • On-DML: Fires per record, replacing default DML on row Use DELETE_RECORD, INSERT_RECORD, UPDATE_RECORD built-ins http://ebiztechnics.blogspot.com
  • 8. Commit Triggers • Post-Forms-Commit: Fires once even if no changes are made • Post-Database-Commit: Fires once even if no changes are made Note: A commit-trigger failure causes a rollback to the savepoint. http://ebiztechnics.blogspot.com
  • 9. Usage of Commit Triggers Pre-Commit Pre-Delete Pre-Insert Pre-Update Check user authorization; set up special locking Journaling; implement foreign-key delete rule Generate sequence numbers; journaling; automatically generated columns; check constraints Journaling; implement foreign-key update rule; auto-generated columns; check constraints http://ebiztechnics.blogspot.com
  • 10. Usage of Commit Triggers On-Insert/Update/Delete Post-Forms-Commit Post-Database-Commit Replace default block DML statements Check complex multirow constraints Test commit success; test uncommitted posts http://ebiztechnics.blogspot.com
  • 11. Update Processing ColumnItem Query Rollback Data 20 20 Locked Query Commit 30 30 30 20Update record in form [Save] 30 20[Save] Pre-Update 30 20Pre-Update Row Updated 30 30 20Row updated Post-Update 30 30 20Post-Update http://ebiztechnics.blogspot.com
  • 12. Pre-Delete Trigger • Check Before Deletion DECLARE CURSOR empcur IS SELECT ’x’ FROM dept WHERE deptno = :emp.deptno; BEGIN OPEN empcur; FETCH empcur INTO :GLOBAL.x; IF empcur%FOUND THEN CLOSE C1; MESSAGE(’There are employees in this dept..can not delete’); RAISE form_trigger_failure; ELSE CLOSE empcur; END IF; END; http://ebiztechnics.blogspot.com
  • 13. Assigning Sequence Nos. • Pre-Insert Trigger SELECT empseq.nextval INTO :emp.empno FROM dual; Note: Sequence value will be visible after committing, because Pre-Insert trigger fires after committing. http://ebiztechnics.blogspot.com
  • 14. Keeping an Audit Trail • Write changes to nonbase tables. • Gather statistics on applied changes. Post-Insert example: :GLOBAL.total_ins:= TO_CHAR(TO_NUMBER(:GLOBAL.total_ins)+1); http://ebiztechnics.blogspot.com
  • 15. Test the success of DMLs • SQL%FOUND • SQL%NOTFOUND • SQL%ROWCOUNT UPDATE ……. SET….. WHERE …..; IF SQL%NOTFOUND THEN MESSAGE(’Record does not exists’); RAISE form_trigger_failure; END IF; http://ebiztechnics.blogspot.com
  • 16. DML Statements Issued During Commit Processing INSERT INTO base_table (base_column, base_column,...) VALUES (:base_item, :base_item, ...) UPDATE base_table SET base_column = :base_item, base_column = :base_item, ... WHERE ROWID = :ROWID DELETE FROM base_table WHERE ROWID = :ROWID http://ebiztechnics.blogspot.com
  • 17. DML Statements Issued During Commit Processing Rules: • DML statements may fire database triggers. • Form Builder uses and retrieves ROWID. • The Update Changed Columns Only and Enforce Column Security properties affect UPDATE statements. • Locking statements are not issued. http://ebiztechnics.blogspot.com
  • 19. Commit Status • What is Commit Status? • SYSTEM.RECORD_STATUS: – NEW – INSERT (also caused by control items) – QUERY – CHANGED • SYSTEM.BLOCK_STATUS: – NEW (may contain records with status INSERT) – QUERY (also possible for control block) – CHANGED (block will be committed) http://ebiztechnics.blogspot.com
  • 20. Commit Status • SYSTEM.FORM_STATUS: – NEW – QUERY – CHANGED • System variables versus built-ins for commit status • Built-ins for getting and setting commit status: – GET_BLOCK_PROPERTY – GET_RECORD_PROPERTY – SET_ RECORD _PROPERTY http://ebiztechnics.blogspot.com
  • 21. Commit Status • Do not confuse commit status with validation status. • The commit status is updated during validation. IF :SYSTEM.BLOCK_STATUS IN (‘NEW’,’CHANGED’) THEN COMMIT_FORM; END IF; CLEAR_FORM; http://ebiztechnics.blogspot.com
  • 22. Array DML • Performs array inserts, updates, and deletes • Vastly reduces network traffic Fewer round trips (exact number depends on array size) Empno Ename Job Sal 7369 SMITH CLERK 800 7499 ALLEN SALESMAN 1600 7521 WARD SALESMAN 1250 7566 JONES ANAGER 2975 7654 MARTIN SALESMAN 1250 7698 BLAKE MANAGER 2850 7782 CLARK MANAGER 2450 2 inserts 2 updates 1 delete Database http://ebiztechnics.blogspot.com
  • 23. Effect of Array DML on Transactional Triggers Array DML Size = 1 Array DML Size > 1 Fires Fires for each insert, update, delete Fires for each insert, update, delete Repeated for each insert, update, delete POST- PRE- DML Fires DML POST- PRE- http://ebiztechnics.blogspot.com
  • 24. Implementing Array DML 1. Enable the Array Processing option. 2. Specify a DML Array Size of greater than 1. 3. Specify block primary keys. http://ebiztechnics.blogspot.com
  • 25. Summary • Post and commit phases • Flow of commit processing • DML statements issued during commit processing • Characteristics and common uses of commit triggers • Overriding default transaction processing • Getting and setting the commit status • Implementing Array DML http://ebiztechnics.blogspot.com

Notas del editor

  1. Note: If a commit trigger-except for the Post Database-Commit trigger – fails, the Transaction is rolled back to the savepoint that was set at the beginning of the current Commit processing. This also means that earlier, not yet committed posts are not rolledback.
  2. Note: Locking is also needed for transaction processing. You can use the On-Lock Trigger if you want to amend the default locking of Form Builder.
  3. Note: The Insert Allowed and Keyboard Navigable properties on :EMP.empno should Be No, so that user does not enter and employee no manually.
  4. Note: Trigger containing base table DML can adversely affect the usual behavior of Your form, because DML statements can cause some of the rows in the database to lock.
  5. Note: When the DML Array size property is grater than 1, you must specify the primary key. Key mode can still be unique.