SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cConnor McDonald
 
06 Using More Package Concepts
06 Using More Package Concepts06 Using More Package Concepts
06 Using More Package Conceptsrehaniltifat
 
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 18cChris Saxon
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideSrinimf-Slides
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014Enkitec
 
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) BridgeJosé 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 bridgeJosé Paumard
 
Agile Database Development with JSON
Agile Database Development with JSONAgile Database Development with JSON
Agile Database Development with JSONChris Saxon
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIsJeffrey Kemp
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsqlSid Xing
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals INick 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 Compilarrehaniltifat
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQLrehaniltifat
 
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 - UKOUGtogether21Oren Nakdimon
 

Mais procurados (19)

New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
 
ZekeLabs PLSQL slides
ZekeLabs PLSQL slidesZekeLabs PLSQL slides
ZekeLabs PLSQL slides
 
06 Using More Package Concepts
06 Using More Package Concepts06 Using More Package Concepts
06 Using More Package Concepts
 
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
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
 
PLSQL Advanced
PLSQL AdvancedPLSQL Advanced
PLSQL Advanced
 
PL/SQL 3 DML
PL/SQL 3 DMLPL/SQL 3 DML
PL/SQL 3 DML
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014
 
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
 
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
 
Agile Database Development with JSON
Agile Database Development with JSONAgile Database Development with JSON
Agile Database Development with JSON
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIs
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsql
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
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
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
 
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
 

Destaque

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 -MyWhitePaperRajesh 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 2017Tracxn
 
Tugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_aprilianiTugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_aprilianidewiapril1996
 
Webinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph DatabasesWebinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph DatabasesDataStax
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBAKaran Kukreja
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesGustavo 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 indexesRajesh Kumar
 
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...Amazon Web Services
 
Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545imeldafelicia
 
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 2017Tracxn
 
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 12cPini Dibask
 
Oracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 CertificationOracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 CertificationExadatadba
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedMarkus Flechtner
 
Senior .Net engineer
Senior .Net engineerSenior .Net engineer
Senior .Net engineerAdam 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.0Yury Velikanov
 

Destaque (19)

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
 
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
 
Tugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_aprilianiTugas4 1412510602 dewi_apriliani
Tugas4 1412510602 dewi_apriliani
 
Webinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph DatabasesWebinar: Fighting Fraud with Graph Databases
Webinar: Fighting Fraud with Graph Databases
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
 
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
 
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...
Consolidate MySQL Shards Into Amazon Aurora Using AWS Database Migration Serv...
 
Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545Tugas 4 0317-imelda felicia-1412510545
Tugas 4 0317-imelda felicia-1412510545
 
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
 
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...
 
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
 
Oracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 CertificationOracle Exadata 1Z0-485 Certification
Oracle Exadata 1Z0-485 Certification
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
 
Senior .Net engineer
Senior .Net engineerSenior .Net engineer
Senior .Net engineer
 
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...
 
Google Home
Google HomeGoogle Home
Google Home
 
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
 
Avaya anixter event
Avaya anixter eventAvaya anixter event
Avaya anixter event
 

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

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 MigrationsScyllaDB
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverhunghtc83
 
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 VisualizationEdelweiss 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 OracleKellyn Pot'Vin-Gorman
 
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-finalMarkus Flechtner
 
0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorialKlausePaulino
 
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 CloudDimitri 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 DBAsAlex 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 DBAsAlex 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_CDCKoenVerbeeck
 
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&tDatabase & 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-clickRuggero Citton
 
ISLE - IslandoraCon 2017
ISLE - IslandoraCon 2017ISLE - IslandoraCon 2017
ISLE - IslandoraCon 2017Noah Smith
 

Semelhante a 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
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
 
DAC
DACDAC
DAC
 
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
 
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...
 
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
 
OID Install and Config
OID Install and ConfigOID Install and Config
OID Install and Config
 
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...
 
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...
 
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
 
0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial
 
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
 
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
 
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
 
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 - ...
 
SQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDCSQLServerDays2012_SSIS_CDC
SQLServerDays2012_SSIS_CDC
 
6 database
6 database 6 database
6 database
 
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
 
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
 
ISLE - IslandoraCon 2017
ISLE - IslandoraCon 2017ISLE - IslandoraCon 2017
ISLE - IslandoraCon 2017
 

Último

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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  oren@db-oriented.com  +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  oren@db-oriented.com  +972-54-4393763 @DBoriented © Oren Nakdimon