SlideShare a Scribd company logo
Write Less
Code
With More
Oracle 12c New Features
Oren Nakdimon
www.db-oriented.com
 oren@db-oriented.com
 +972-54-4393763
@DBoriented
© Oren Nakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
WHO AM I?
A CHRONOLOGY BY “ORACLE YEARS”
Where: IAF
When: Oracle 6/7 [1991-1997]
What: Developer
Where: Golden Screens
When: Oracle 8 [1997-1998]
What: Server Group Manager
Where: TELEknowledge
When: Oracle 8i/9i [1998-2003]
What: DBA Group Manager
Where: Olista
When: Oracle 10g/11g [2004-2011]
What: VP R&D + Israel Site Manager
Where:
When: Oracle 11g/12c [2011-]
What: Freelance Consultant
Where:
When: 2015-
What: Database Expert
“An expert is a person who has made all the
mistakes that can be made in a very narrow
field” (Niels Bohr, 1885-1962)
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
@DBORIENTED
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
HTTP://DB-ORIENTED.COM
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
Read a summary of this
presentation in the
article in
Oracle Scene Issue 58
MORE “WRITE LESS WITH MORE”
Download this presentation from
db-oriented.com/presentations
Read the blog post series
db-oriented.com/category/writelesswithmore/
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
AGENDA
 Go over some common use cases
 For each one
 A pre-12c solution
 A 12c solution, that allows us to write less
 We’ll see examples for features that allow writing less…
 …configuration
 …application code
 …code in SQL statements
 …“inappropriately-located” code
6
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
THE USUAL WARNING
 Before you decide to apply any of the presented
features in production, make sure:
 to thoroughly test them for your applications and
environments
 that you have the required license to use them
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
MEET THE DEMO TABLES
8
This presentation is available in http://db-oriented.com/presentations
9
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
2/2
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
LOADING DATA FROM FILES
 Before 12c
 SQL*Loader
 Requires a control file
 External tables
 Require a “control file” within the CREATE TABLE
statement
 Then:
INSERT INTO <“real” table> …
SELECT FROM <external table>… ;
10
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SQL*LOADER EXPRESS MODE
 No need to create a control file
 Defaults
 File name: <tableName>.dat, in current directory
 Record delimiter: newline
 Field delimiter: comma
 No enclosures
11
12c
@ldr
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SQL*LOADER EXPRESS MODE
 Mandatory command line parameter
 TABLE
 Some optional command line parameters
 DATA (up to 6 names, wildcards supported)
 TERMINATED_BY
 CHARACTERSET
 CSV = WITH_EMBEDDED
 OPTIONALLY_ENCLOSED_BY
 DATE_FORMAT
 DEGREE_OF_PARALLELISM
 DIRECT 12
12c
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SQL*LOADER EXPRESS MODE
 A log file is generated for future use, including:
 Control file
 CREATE EXTERNAL TABLE statement
 INSERT statement
 Data types of all table columns should be
numeric, string or datetime
13
12c
This presentation is available in http://db-oriented.com/presentations
14
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
2/2
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
AUTO-INCREMENT COLUMNS
 Before 12c
 A sequence + a BEFORE INSERT trigger
15
CREATE SEQUENCE project_assignments_seq;
--
-- first option: ignore the input even if supplied
--
CREATE TRIGGER project_assignments_bir_tr
BEFORE INSERT ON project_assignments
FOR EACH ROW
BEGIN
:new.assignment_id := project_assignments_seq.nextval;
END;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
AUTO-INCREMENT COLUMNS
 Before 12c
 A sequence + a BEFORE INSERT trigger
16
CREATE SEQUENCE project_assignments_seq;
--
-- second option: only if input not supplied
--
CREATE TRIGGER project_assignments_bir_tr
BEFORE INSERT ON project_assignments
FOR EACH ROW
WHEN (new.assignment_id IS NULL)
BEGIN
:new.assignment_id := project_assignments_seq.nextval;
END;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
IDENTITY COLUMNS
 A column can be defined as “identity”
 Implicit sequence
 Implicit NOT NULL
 GENERATED…
 [always] as identity
 by default as identity
 by default on null as identity
 You need the CREATE SEQUENCE privilege
17
@idn1
12c
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
IDENTITY COLUMNS
 Configuring the implicit sequence
 Like in CREATE SEQUENCE
 START WITH LIMIT VALUE
 Restrictions
 Only for numeric data types
 Maximum one identity column per table
 Non-identity column cannot be modified to identity
column
 CTAS ignores the identity definition
18
@idn2
12c
This presentation is available in http://db-oriented.com/presentations
19
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
2/2
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
LOGICAL DELETION OF RECORDS
20
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
LOGICAL DELETION OF RECORDS
 Before 12c
 Add an IS_DELETED column
 Use a view to hide “deleted” records
21
ALTER TABLE projects ADD
is_deleted NUMBER(1) DEFAULT 0 NOT NULL
CHECK (is_deleted IN (0,1));
CREATE VIEW projects AS
SELECT *
FROM all_projects
WHERE is_deleted=0;
RENAME projects TO all_projects;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
In-Database Archiving
 Enables to archive rows within a table by
marking them as “inactive”
 Inactive rows are still there, but are not visible
to the application (or visible, when we want)
22
@idar
12c
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
In-Database Archiving
 The table should be defined as ROW ARCHIVAL
 A hidden column is created:
ORA_ARCHIVE_STATE
 The session level parameter ROW ARCHIVAL
VISIBILITY controls if archived rows are visible
(ALL) or not (ACTIVE)
23
12c
This presentation is available in http://db-oriented.com/presentations
24
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
2/2
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
VALIDITY PERIODS
 Before 12c
 Add PERIOD_START and PERIOD_END columns
 Add conditions to queries to filter only valid periods
25
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
TEMPORAL VALIDITY
 Enables to track time periods for real world
validity or effectivity
 Valid times can be set by users/application for
data
 Data can be selected by a specific valid time (or
range)
26
12c
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
TEMPORAL VALIDITY
 A valid time period consists of two date/time
columns (start/end)
 The columns can be created explicitly or
implicitly
 The table is defined with PERIOD FOR
27
12c
@vld
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
TEMPORAL VALIDITY
 Statement level visibility control
 SELECT … AS OF PERIOD FOR
 SELECT … VERSIONS PERIOD FOR
 Session level visibility control
 DBMS_FLASHBACK_ARCHIVE.enable_at_valid_time
 ALL
 CURRENT
 ASOF
28
12c
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
THERE ARE TWO SIDES TO EVERY COIN
 Hidden columns
 Hidden predicates
 “Hidden” =“Easy to Forget”
 “Hidden” ≠“Can be Ignored”
 And session-level control is session-level control
In Database
Archiving
Temporal
Validity
SELECT * FROM PROJECTS;
where most of the rows are “archived”
DELETE
PROJECT_ASSIGNMENTS;
where
enable_at_valid_time
is on
This presentation is available in http://db-oriented.com/presentations
30
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
2/2
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
TOP-N AND PAGINATION QUERIES
 Before 12c
 Use inline views and ROWNUM or ROW_NUMBER( )
 Queries become quite cumbersome
31
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
TOP-N AND PAGINATION QUERIES
 All the records
 Top 8 records
 Records 5-8
32
SELECT project_id,
person_id,
assignment_id,
validity_period_start,
validity_period_end
FROM (
SELECT x.*
,rownum row_num
FROM (
SELECT project_id,
person_id,
assignment_id,
validity_period_start,
validity_period_end
FROM project_assignments
ORDER BY project_id, person_id
) x WHERE rownum <= 8
) WHERE row_num > 4;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
ROW LIMITING
 The Row Limiting clause is added to the end of
SELECT statement
 FETCH FIRST n ROWS WITH TIES
 FETCH FIRST n ROWS ONLY
 FETCH FIRST p PERCENT ROWS
 OFFSET m ROWS FETCH NEXT n ROWS
33
12c
@topn
This presentation is available in http://db-oriented.com/presentations
1/2
34
6. Write a procedure to update the
status of multiple projects
7. Write a query that shows the
number of assignments per
project in the last days
2/2
8. Write a query that shows all the
people with a valid date in their
GENERAL_INFO column
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
 Write a stored procedure that
 Gets a collection parameter of “project updates”,
each one with:
 PROJECT_ID
 UPDATE_TIME
 STATUS
 Updates the PROJECTS table with the latest status of
each project
35
PROJECT_ID STATUS
1 2
2 3
3 4
4 2
3
2
4
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
PROJECT
ID
UPDATE
TIME STATUS
1 10:00 2
1 14:00 3
2 09:00 1
3 09:00 4
2 08:00 3
3 08:00 2
2 10:00 2
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
36
CREATE OR REPLACE PACKAGE projects_dl AS
TYPE proj_update_t IS RECORD(
project_id projects.project_id%TYPE,
update_time DATE,
status projects.status%TYPE);
TYPE proj_update_tt IS TABLE OF proj_update_t;
PROCEDURE update_status(
i_proj_update_list IN proj_update_tt
);
END projects_dl;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
37
CREATE OR REPLACE PACKAGE BODY projects_dl AS
PROCEDURE update_status(
i_proj_update_list IN proj_update_tt) IS
BEGIN
MERGE INTO projects p
USING (
SELECT project_id,
MAX(status) keep(dense_rank LAST
ORDER BY update_time) latest_status
FROM TABLE(i_proj_update_list)
GROUP BY project_id
) i
ON (p.project_id = i.project_id)
WHEN MATCHED THEN UPDATE
SET p.status = i.latest_status;
END update_status;
END projects_dl;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SELECT FROM COLLECTION VARIABLES
 Before 12c
 Impossible to SELECT FROM package-level collections
38
PL/SQL: SQL Statement ignored
ORA-22905:
cannot access rows from a non-nested table item
PLS-00642:
local collection types not allowed in SQL statements
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SELECT FROM COLLECTION VARIABLES
 Before 12c
 Schema-level collection types must be created and used,
even if needed only in the scope of a single package
39
CREATE OR REPLACE TYPE proj_update_t AS OBJECT (
project_id INTEGER,
update_time DATE,
status INTEGER)
CREATE TYPE proj_update_tt AS TABLE OF proj_update_t
CREATE OR REPLACE PACKAGE projects_dl AS
PROCEDURE update_status(
i_proj_update_list IN proj_update_tt
);
END projects_dl;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
SELECT FROM COLLECTION VARIABLES
 Now it is possible to SELECT FROM package-level
collections
40
12c
This presentation is available in http://db-oriented.com/presentations
1/2
41
6. Write a procedure to update the
status of multiple projects
7. Write a query that shows the
number of assignments per
project in the last days
2/2
8. Write a query that shows all the
people with a valid date in their
GENERAL_INFO column
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
PROJECT
NAME
LAST DAYS TO SHOW
IN REPORTS
Project A 2
Project B 3
Project C 4
PROJECT
NAME DATE
NUM OF
ASSIGNMENTS
Project A 02/03/2016 3
Project A 03/03/2016 3
Project B 01/03/2016 5
Project B 02/03/2016 4
Project B 03/03/2016 2
Project C 29/02/2016 1
Project C 01/03/2016 0
Project C 02/03/2016 0
Project C 03/03/2016 1
@ltrl
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
LATERAL INLINE VIEWS
 An inline view in a query can be defined as
LATERAL
 It allows it to refer to other tables that appear to
its left in the FROM clause
43
12c
This presentation is available in http://db-oriented.com/presentations
1/2
44
6. Write a procedure to update the
status of multiple projects
7. Write a query that shows the
number of assignments per
project in the last days
2/2
8. Write a query that shows all the
people with a valid date in their
GENERAL_INFO column
©OrenNakdimon
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
CALLING PL/SQL FROM SQL
 Before 12c
 A PL/SQL function must be stored in the database
 And it must be public (either standalone or exposed
in a package spec)
45
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
CALLING PL/SQL FROM SQL
 Before 12c
46
CREATE OR REPLACE FUNCTION is_date(i_info IN VARCHAR2)
RETURN NUMBER AS
l_date DATE;
BEGIN
IF i_info IS NULL THEN
RETURN 0;
ELSE
l_date := to_date(i_info, 'dd/mm/yyyy');
RETURN 1;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN 0;
END;
SELECT * FROM people WHERE is_date(general_info) = 1;
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
PL/SQL in the WITH Clause
 Before 12c, the WITH clause included only
subquery factoring
 In 12c, it can include also PL/SQL declarations
 Functions, that can be used in the query
 Procedures, that can be used in the functions
 Name resolution
 statement-level function names have precedence
over schema-level stored functions
47
12c
@with
This presentation is available in http://db-oriented.com/presentations
©OrenNakdimon
PL/SQL in the WITH Clause
 Not yet supported in static SQL in PL/SQL
 If used as subquery, the top-level statement
must be hinted with WITH_PLSQL (or be itself a
SELECT with PL/SQL declaration)
 Considerations for statement-level vs. schema-
level functions
 Ad-hoc vs. common functionality
 Performance
 Consider also PRAGMA UDF
48
12c
This presentation is available in http://db-oriented.com/presentations
49
6. Write a procedure to update the
status of multiple projects
7. Write a query that shows the
number of assignments per
project in the last days
2/2
8. Write a query that shows all the
people with a valid date in their
GENERAL_INFO column
1. Fill the PEOPLE table from a
text file
2. Set a unique number to
ASSIGNMENT_ID (implicitly)
for every new record
3. Delete obsolete projects (but keep
their assignment history)
4. Add a “validity period” to
PROJECT_ASSIGNMENTS
5. Write a query to get project
assignments with pagination
1/2
©OrenNakdimon
THANK YOU
Oren Nakdimon
www.db-oriented.com
 oren@db-oriented.com
 +972-54-4393763
@DBoriented
© Oren Nakdimon
Ad

More Related Content

What's hot (19)

New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
Connor McDonald
 
ZekeLabs PLSQL slides
ZekeLabs PLSQL slidesZekeLabs PLSQL slides
ZekeLabs PLSQL slides
zekeLabs Technologies
 
06 Using More Package Concepts
06 Using More Package Concepts06 Using More Package Concepts
06 Using More Package Concepts
rehaniltifat
 
18(ish) Things You'll Love About Oracle Database 18c
18(ish) Things You'll Love About Oracle Database 18c18(ish) Things You'll Love About Oracle Database 18c
18(ish) Things You'll Love About Oracle Database 18c
Chris Saxon
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
Srinath Maharana
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
Srinimf-Slides
 
PLSQL Advanced
PLSQL AdvancedPLSQL Advanced
PLSQL Advanced
Quang Minh Đoàn
 
PL/SQL 3 DML
PL/SQL 3 DMLPL/SQL 3 DML
PL/SQL 3 DML
Richard Eliseo Mendoza Gafaro
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014
Enkitec
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
José Paumard
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
José Paumard
 
Agile Database Development with JSON
Agile Database Development with JSONAgile Database Development with JSON
Agile Database Development with JSON
Chris Saxon
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIs
Jeffrey Kemp
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsql
Sid Xing
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
11 Understanding and Influencing the PL/SQL Compilar
11 Understanding and Influencing the PL/SQL Compilar11 Understanding and Influencing the PL/SQL Compilar
11 Understanding and Influencing the PL/SQL Compilar
rehaniltifat
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
Vinay Kumar
 
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren Nakdimon
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
Connor McDonald
 
06 Using More Package Concepts
06 Using More Package Concepts06 Using More Package Concepts
06 Using More Package Concepts
rehaniltifat
 
18(ish) Things You'll Love About Oracle Database 18c
18(ish) Things You'll Love About Oracle Database 18c18(ish) Things You'll Love About Oracle Database 18c
18(ish) Things You'll Love About Oracle Database 18c
Chris Saxon
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
Srinimf-Slides
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014
Enkitec
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
José Paumard
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
José Paumard
 
Agile Database Development with JSON
Agile Database Development with JSONAgile Database Development with JSON
Agile Database Development with JSON
Chris Saxon
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIs
Jeffrey Kemp
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsql
Sid Xing
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
11 Understanding and Influencing the PL/SQL Compilar
11 Understanding and Influencing the PL/SQL Compilar11 Understanding and Influencing the PL/SQL Compilar
11 Understanding and Influencing the PL/SQL Compilar
rehaniltifat
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren nakdimon - Design Patterns for PL/SQL and SQL - UKOUGtogether21
Oren Nakdimon
 

Viewers also liked (18)

MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn
 
Tugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_aprilianiTugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_apriliani
dewiapril1996
 
Webinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph DatabasesWebinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph Databases
DataStax
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
Karan Kukreja
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
Gustavo Rene Antunez
 
Mongo db a deep dive of mongodb indexes
Mongo db  a deep dive of mongodb indexesMongo db  a deep dive of mongodb indexes
Mongo db a deep dive of mongodb indexes
Rajesh Kumar
 
Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545
imeldafelicia
 
Tracxn Research - Construction Tech Landscape, February 2017
Tracxn Research - Construction Tech Landscape, February 2017Tracxn Research - Construction Tech Landscape, February 2017
Tracxn Research - Construction Tech Landscape, February 2017
Tracxn
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Lucas Jellema
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
Pini Dibask
 
Oracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 CertificationOracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 Certification
Exadatadba
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
Markus Flechtner
 
Senior .Net engineer
Senior .Net engineerSenior .Net engineer
Senior .Net engineer
Adam Sowter
 
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
Reza Nourjou, Ph.D.
 
Google Home
Google HomeGoogle Home
Google Home
Malhar Pandhare
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Yury Velikanov
 
Avaya anixter event
Avaya anixter eventAvaya anixter event
Avaya anixter event
Odilo Alvarez
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn
 
Tugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_aprilianiTugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_apriliani
dewiapril1996
 
Webinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph DatabasesWebinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph Databases
DataStax
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
Karan Kukreja
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
Gustavo Rene Antunez
 
Mongo db a deep dive of mongodb indexes
Mongo db  a deep dive of mongodb indexesMongo db  a deep dive of mongodb indexes
Mongo db a deep dive of mongodb indexes
Rajesh Kumar
 
Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545
imeldafelicia
 
Tracxn Research - Construction Tech Landscape, February 2017
Tracxn Research - Construction Tech Landscape, February 2017Tracxn Research - Construction Tech Landscape, February 2017
Tracxn Research - Construction Tech Landscape, February 2017
Tracxn
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Lucas Jellema
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
Pini Dibask
 
Oracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 CertificationOracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 Certification
Exadatadba
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
Markus Flechtner
 
Senior .Net engineer
Senior .Net engineerSenior .Net engineer
Senior .Net engineer
Adam Sowter
 
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
System Architecture of Cloud-based Web GIS for Real-Time Macroeconomic Loss E...
Reza Nourjou, Ph.D.
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Yury Velikanov
 
Ad

Similar to Write Less (code) With More (Oracle Database 12c New Features) (20)

RDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsRDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful Migrations
ScyllaDB
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
hunghtc83
 
DAC
DACDAC
DAC
Ram Reddy
 
Oracle Autonomous Data Warehouse Cloud and Data Visualization
Oracle Autonomous Data Warehouse Cloud and Data VisualizationOracle Autonomous Data Warehouse Cloud and Data Visualization
Oracle Autonomous Data Warehouse Cloud and Data Visualization
Edelweiss Kammermann
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
NomanKhalid56
 
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and Oracle
Kellyn Pot'Vin-Gorman
 
OID Install and Config
OID Install and ConfigOID Install and Config
OID Install and Config
Vigilant Technologies
 
Going beyond ORMs with JSON Relational Duality Views
Going beyond ORMs with JSON Relational Duality ViewsGoing beyond ORMs with JSON Relational Duality Views
Going beyond ORMs with JSON Relational Duality Views
Andres Almiray
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final
Markus Flechtner
 
0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial
KlausePaulino
 
Moving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express CloudMoving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express Cloud
Dimitri Gielis
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
Neo4j
 
SQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDCSQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDC
KoenVerbeeck
 
6 database
6 database 6 database
6 database
siragezeynu
 
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
Database & Technology s.r.l.
 
MV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-clickMV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-click
Ruggero Citton
 
RDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsRDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful Migrations
ScyllaDB
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
hunghtc83
 
Oracle Autonomous Data Warehouse Cloud and Data Visualization
Oracle Autonomous Data Warehouse Cloud and Data VisualizationOracle Autonomous Data Warehouse Cloud and Data Visualization
Oracle Autonomous Data Warehouse Cloud and Data Visualization
Edelweiss Kammermann
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
NomanKhalid56
 
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and Oracle
Kellyn Pot'Vin-Gorman
 
Going beyond ORMs with JSON Relational Duality Views
Going beyond ORMs with JSON Relational Duality ViewsGoing beyond ORMs with JSON Relational Duality Views
Going beyond ORMs with JSON Relational Duality Views
Andres Almiray
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final2017 10-oow-fma-application-containers-v01-final
2017 10-oow-fma-application-containers-v01-final
Markus Flechtner
 
0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial
KlausePaulino
 
Moving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express CloudMoving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express Cloud
Dimitri Gielis
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
002 Introducing Neo4j 5 for Administrators - NODES2022 AMERICAS Beginner 2 - ...
Neo4j
 
SQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDCSQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDC
KoenVerbeeck
 
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
Database & Technology s.r.l.
 
MV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-clickMV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-click
Ruggero Citton
 
Ad

Recently uploaded (20)

Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 

Write Less (code) With More (Oracle Database 12c New Features)

  • 1. Write Less Code With More Oracle 12c New Features Oren Nakdimon www.db-oriented.com  [email protected]  +972-54-4393763 @DBoriented © Oren Nakdimon
  • 2. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon WHO AM I? A CHRONOLOGY BY “ORACLE YEARS” Where: IAF When: Oracle 6/7 [1991-1997] What: Developer Where: Golden Screens When: Oracle 8 [1997-1998] What: Server Group Manager Where: TELEknowledge When: Oracle 8i/9i [1998-2003] What: DBA Group Manager Where: Olista When: Oracle 10g/11g [2004-2011] What: VP R&D + Israel Site Manager Where: When: Oracle 11g/12c [2011-] What: Freelance Consultant Where: When: 2015- What: Database Expert “An expert is a person who has made all the mistakes that can be made in a very narrow field” (Niels Bohr, 1885-1962)
  • 3. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon @DBORIENTED
  • 4. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon HTTP://DB-ORIENTED.COM
  • 5. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon Read a summary of this presentation in the article in Oracle Scene Issue 58 MORE “WRITE LESS WITH MORE” Download this presentation from db-oriented.com/presentations Read the blog post series db-oriented.com/category/writelesswithmore/
  • 6. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon AGENDA  Go over some common use cases  For each one  A pre-12c solution  A 12c solution, that allows us to write less  We’ll see examples for features that allow writing less…  …configuration  …application code  …code in SQL statements  …“inappropriately-located” code 6
  • 7. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon THE USUAL WARNING  Before you decide to apply any of the presented features in production, make sure:  to thoroughly test them for your applications and environments  that you have the required license to use them
  • 8. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon MEET THE DEMO TABLES 8
  • 9. This presentation is available in http://db-oriented.com/presentations 9 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 2/2 ©OrenNakdimon
  • 10. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon LOADING DATA FROM FILES  Before 12c  SQL*Loader  Requires a control file  External tables  Require a “control file” within the CREATE TABLE statement  Then: INSERT INTO <“real” table> … SELECT FROM <external table>… ; 10
  • 11. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SQL*LOADER EXPRESS MODE  No need to create a control file  Defaults  File name: <tableName>.dat, in current directory  Record delimiter: newline  Field delimiter: comma  No enclosures 11 12c @ldr
  • 12. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SQL*LOADER EXPRESS MODE  Mandatory command line parameter  TABLE  Some optional command line parameters  DATA (up to 6 names, wildcards supported)  TERMINATED_BY  CHARACTERSET  CSV = WITH_EMBEDDED  OPTIONALLY_ENCLOSED_BY  DATE_FORMAT  DEGREE_OF_PARALLELISM  DIRECT 12 12c
  • 13. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SQL*LOADER EXPRESS MODE  A log file is generated for future use, including:  Control file  CREATE EXTERNAL TABLE statement  INSERT statement  Data types of all table columns should be numeric, string or datetime 13 12c
  • 14. This presentation is available in http://db-oriented.com/presentations 14 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 2/2 ©OrenNakdimon
  • 15. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon AUTO-INCREMENT COLUMNS  Before 12c  A sequence + a BEFORE INSERT trigger 15 CREATE SEQUENCE project_assignments_seq; -- -- first option: ignore the input even if supplied -- CREATE TRIGGER project_assignments_bir_tr BEFORE INSERT ON project_assignments FOR EACH ROW BEGIN :new.assignment_id := project_assignments_seq.nextval; END;
  • 16. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon AUTO-INCREMENT COLUMNS  Before 12c  A sequence + a BEFORE INSERT trigger 16 CREATE SEQUENCE project_assignments_seq; -- -- second option: only if input not supplied -- CREATE TRIGGER project_assignments_bir_tr BEFORE INSERT ON project_assignments FOR EACH ROW WHEN (new.assignment_id IS NULL) BEGIN :new.assignment_id := project_assignments_seq.nextval; END;
  • 17. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon IDENTITY COLUMNS  A column can be defined as “identity”  Implicit sequence  Implicit NOT NULL  GENERATED…  [always] as identity  by default as identity  by default on null as identity  You need the CREATE SEQUENCE privilege 17 @idn1 12c
  • 18. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon IDENTITY COLUMNS  Configuring the implicit sequence  Like in CREATE SEQUENCE  START WITH LIMIT VALUE  Restrictions  Only for numeric data types  Maximum one identity column per table  Non-identity column cannot be modified to identity column  CTAS ignores the identity definition 18 @idn2 12c
  • 19. This presentation is available in http://db-oriented.com/presentations 19 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 2/2 ©OrenNakdimon
  • 20. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon LOGICAL DELETION OF RECORDS 20
  • 21. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon LOGICAL DELETION OF RECORDS  Before 12c  Add an IS_DELETED column  Use a view to hide “deleted” records 21 ALTER TABLE projects ADD is_deleted NUMBER(1) DEFAULT 0 NOT NULL CHECK (is_deleted IN (0,1)); CREATE VIEW projects AS SELECT * FROM all_projects WHERE is_deleted=0; RENAME projects TO all_projects;
  • 22. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon In-Database Archiving  Enables to archive rows within a table by marking them as “inactive”  Inactive rows are still there, but are not visible to the application (or visible, when we want) 22 @idar 12c
  • 23. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon In-Database Archiving  The table should be defined as ROW ARCHIVAL  A hidden column is created: ORA_ARCHIVE_STATE  The session level parameter ROW ARCHIVAL VISIBILITY controls if archived rows are visible (ALL) or not (ACTIVE) 23 12c
  • 24. This presentation is available in http://db-oriented.com/presentations 24 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 2/2 ©OrenNakdimon
  • 25. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon VALIDITY PERIODS  Before 12c  Add PERIOD_START and PERIOD_END columns  Add conditions to queries to filter only valid periods 25
  • 26. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon TEMPORAL VALIDITY  Enables to track time periods for real world validity or effectivity  Valid times can be set by users/application for data  Data can be selected by a specific valid time (or range) 26 12c
  • 27. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon TEMPORAL VALIDITY  A valid time period consists of two date/time columns (start/end)  The columns can be created explicitly or implicitly  The table is defined with PERIOD FOR 27 12c @vld
  • 28. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon TEMPORAL VALIDITY  Statement level visibility control  SELECT … AS OF PERIOD FOR  SELECT … VERSIONS PERIOD FOR  Session level visibility control  DBMS_FLASHBACK_ARCHIVE.enable_at_valid_time  ALL  CURRENT  ASOF 28 12c
  • 29. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon THERE ARE TWO SIDES TO EVERY COIN  Hidden columns  Hidden predicates  “Hidden” =“Easy to Forget”  “Hidden” ≠“Can be Ignored”  And session-level control is session-level control In Database Archiving Temporal Validity SELECT * FROM PROJECTS; where most of the rows are “archived” DELETE PROJECT_ASSIGNMENTS; where enable_at_valid_time is on
  • 30. This presentation is available in http://db-oriented.com/presentations 30 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 2/2 ©OrenNakdimon
  • 31. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon TOP-N AND PAGINATION QUERIES  Before 12c  Use inline views and ROWNUM or ROW_NUMBER( )  Queries become quite cumbersome 31
  • 32. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon TOP-N AND PAGINATION QUERIES  All the records  Top 8 records  Records 5-8 32 SELECT project_id, person_id, assignment_id, validity_period_start, validity_period_end FROM ( SELECT x.* ,rownum row_num FROM ( SELECT project_id, person_id, assignment_id, validity_period_start, validity_period_end FROM project_assignments ORDER BY project_id, person_id ) x WHERE rownum <= 8 ) WHERE row_num > 4;
  • 33. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon ROW LIMITING  The Row Limiting clause is added to the end of SELECT statement  FETCH FIRST n ROWS WITH TIES  FETCH FIRST n ROWS ONLY  FETCH FIRST p PERCENT ROWS  OFFSET m ROWS FETCH NEXT n ROWS 33 12c @topn
  • 34. This presentation is available in http://db-oriented.com/presentations 1/2 34 6. Write a procedure to update the status of multiple projects 7. Write a query that shows the number of assignments per project in the last days 2/2 8. Write a query that shows all the people with a valid date in their GENERAL_INFO column ©OrenNakdimon
  • 35. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon  Write a stored procedure that  Gets a collection parameter of “project updates”, each one with:  PROJECT_ID  UPDATE_TIME  STATUS  Updates the PROJECTS table with the latest status of each project 35 PROJECT_ID STATUS 1 2 2 3 3 4 4 2 3 2 4 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2 PROJECT ID UPDATE TIME STATUS 1 10:00 2 1 14:00 3 2 09:00 1 3 09:00 4 2 08:00 3 3 08:00 2 2 10:00 2
  • 36. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon 36 CREATE OR REPLACE PACKAGE projects_dl AS TYPE proj_update_t IS RECORD( project_id projects.project_id%TYPE, update_time DATE, status projects.status%TYPE); TYPE proj_update_tt IS TABLE OF proj_update_t; PROCEDURE update_status( i_proj_update_list IN proj_update_tt ); END projects_dl;
  • 37. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon 37 CREATE OR REPLACE PACKAGE BODY projects_dl AS PROCEDURE update_status( i_proj_update_list IN proj_update_tt) IS BEGIN MERGE INTO projects p USING ( SELECT project_id, MAX(status) keep(dense_rank LAST ORDER BY update_time) latest_status FROM TABLE(i_proj_update_list) GROUP BY project_id ) i ON (p.project_id = i.project_id) WHEN MATCHED THEN UPDATE SET p.status = i.latest_status; END update_status; END projects_dl;
  • 38. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SELECT FROM COLLECTION VARIABLES  Before 12c  Impossible to SELECT FROM package-level collections 38 PL/SQL: SQL Statement ignored ORA-22905: cannot access rows from a non-nested table item PLS-00642: local collection types not allowed in SQL statements
  • 39. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SELECT FROM COLLECTION VARIABLES  Before 12c  Schema-level collection types must be created and used, even if needed only in the scope of a single package 39 CREATE OR REPLACE TYPE proj_update_t AS OBJECT ( project_id INTEGER, update_time DATE, status INTEGER) CREATE TYPE proj_update_tt AS TABLE OF proj_update_t CREATE OR REPLACE PACKAGE projects_dl AS PROCEDURE update_status( i_proj_update_list IN proj_update_tt ); END projects_dl;
  • 40. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon SELECT FROM COLLECTION VARIABLES  Now it is possible to SELECT FROM package-level collections 40 12c
  • 41. This presentation is available in http://db-oriented.com/presentations 1/2 41 6. Write a procedure to update the status of multiple projects 7. Write a query that shows the number of assignments per project in the last days 2/2 8. Write a query that shows all the people with a valid date in their GENERAL_INFO column ©OrenNakdimon
  • 42. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon PROJECT NAME LAST DAYS TO SHOW IN REPORTS Project A 2 Project B 3 Project C 4 PROJECT NAME DATE NUM OF ASSIGNMENTS Project A 02/03/2016 3 Project A 03/03/2016 3 Project B 01/03/2016 5 Project B 02/03/2016 4 Project B 03/03/2016 2 Project C 29/02/2016 1 Project C 01/03/2016 0 Project C 02/03/2016 0 Project C 03/03/2016 1 @ltrl
  • 43. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon LATERAL INLINE VIEWS  An inline view in a query can be defined as LATERAL  It allows it to refer to other tables that appear to its left in the FROM clause 43 12c
  • 44. This presentation is available in http://db-oriented.com/presentations 1/2 44 6. Write a procedure to update the status of multiple projects 7. Write a query that shows the number of assignments per project in the last days 2/2 8. Write a query that shows all the people with a valid date in their GENERAL_INFO column ©OrenNakdimon
  • 45. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon CALLING PL/SQL FROM SQL  Before 12c  A PL/SQL function must be stored in the database  And it must be public (either standalone or exposed in a package spec) 45
  • 46. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon CALLING PL/SQL FROM SQL  Before 12c 46 CREATE OR REPLACE FUNCTION is_date(i_info IN VARCHAR2) RETURN NUMBER AS l_date DATE; BEGIN IF i_info IS NULL THEN RETURN 0; ELSE l_date := to_date(i_info, 'dd/mm/yyyy'); RETURN 1; END IF; EXCEPTION WHEN OTHERS THEN RETURN 0; END; SELECT * FROM people WHERE is_date(general_info) = 1;
  • 47. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon PL/SQL in the WITH Clause  Before 12c, the WITH clause included only subquery factoring  In 12c, it can include also PL/SQL declarations  Functions, that can be used in the query  Procedures, that can be used in the functions  Name resolution  statement-level function names have precedence over schema-level stored functions 47 12c @with
  • 48. This presentation is available in http://db-oriented.com/presentations ©OrenNakdimon PL/SQL in the WITH Clause  Not yet supported in static SQL in PL/SQL  If used as subquery, the top-level statement must be hinted with WITH_PLSQL (or be itself a SELECT with PL/SQL declaration)  Considerations for statement-level vs. schema- level functions  Ad-hoc vs. common functionality  Performance  Consider also PRAGMA UDF 48 12c
  • 49. This presentation is available in http://db-oriented.com/presentations 49 6. Write a procedure to update the status of multiple projects 7. Write a query that shows the number of assignments per project in the last days 2/2 8. Write a query that shows all the people with a valid date in their GENERAL_INFO column 1. Fill the PEOPLE table from a text file 2. Set a unique number to ASSIGNMENT_ID (implicitly) for every new record 3. Delete obsolete projects (but keep their assignment history) 4. Add a “validity period” to PROJECT_ASSIGNMENTS 5. Write a query to get project assignments with pagination 1/2 ©OrenNakdimon
  • 50. THANK YOU Oren Nakdimon www.db-oriented.com  [email protected]  +972-54-4393763 @DBoriented © Oren Nakdimon