SlideShare a Scribd company logo
1 of 29
IEEE Day 2013
Ramin Orujov
ICT/Internal Applications Team Head
Azercell Telecom
SCJP 6, OCE Java EE 6 WCD
www.linkedin.com/in/raminorujov
01 October 2013, Qafqaz University
Oracle database 12c:
New features for
developers
About me
Senior software developer
Internal Applications Team Head@Azercell
Teacher @ Qafqaz University CE dept.
Co-manager of AZEROUG
Founder and manager of AZERJUG
October 1, 20132
Oracle database platforms
Oracle 9i – internet
Oracle 10g/11g – grid
Oracle 12c - cloud
http://www.oracle.com/us/products/databas
http://www.oracle.com/technetwork/databas
October 1, 20133
SQL new features
 SEQUENCE as default column value
 IDENTITY column
 VARCHAR2, NVARCHAR2 32K limit
 LIMIT, OFFSET support for paging
 Invisible column support
 Inline PL/SQL function within SQL
WITH expression
October 1, 20134
SEQUENCE as default col value
create sequence test_seq
start with 1
increment by 1;
create table test_table(
id number default test_seq.nextval
primary key
);
http://docs.oracle.com/cd/E16655_01/server
SQLRF54458
October 1, 20135
IDENTITY column
MySQL,MS SQL Server auto increment/identity
create table test_table(
id number generated by default on null as
identity,
name varchar2(10)
)
insert into test_table(name) values(‘ramin’)
insert into test_table(id,name) values(null,
‘ramin’)
http://docs.oracle.com/cd/E16655_01/gateways.121/
DRDAA109
October 1, 20136
VARCHAR2,NVARCHAR2 32K limit
32767 character support
VARCHAR2, NVARCHAR2, RAW
Initialization param
MAX_STRING_SIZE = EXTENDED
http://docs.oracle.com/cd/E16655_01/server
October 1, 20137
LIMIT, OFFSET support
select *
from (
select rownum rn, id, e.*
from employees e
)
where rn between 1 AND 10
order by 1;
October 1, 20138
LIMIT, OFFSET support
October 1, 20139
LIMIT, OFFSET support
October 1, 201310
SELECT employee_id, last_name
FROM employees
ORDER BY salary
FETCH FIRST 10 ROWS ONLY;
SELECT employee_id, last_name
FROM employees
ORDER BY salary
OFFSET 5 ROWS FETCH NEXT 10 ROWS
ONLY;
LIMIT, OFFSET support
October 1, 201311
SELECT employee_id, last_name, salary
FROM employees
ORDER BY salary
FETCH FIRST 5 PERCENT ROWS WITH TIES;
http://docs.oracle.com/cd/E16655_01/server.121
Invisible column
October 1, 201312
create table app_user(
id number generated by default on
null as identity,
username varchar2(100) not null,
passwd varchar(100) invisible
);
select * from app_user;
http://docs.oracle.com/cd/E16655_01/server
Inline PL/SQL function WITH
October 1, 201313
with
function sqr(p_num in number)
return number
is
begin
return p_num * p_num;
end;
select u.user_id, sqr(u.user_id) from all_users
where rownum <= 10;
2.5-3x performance improvement
http://docs.oracle.com/cd/E16655_01/server.121/e17
PL/SQL new features
October 1, 201314
 New way for returning cursor
 Modularity with ACCESSIBLE BY
 New UTL_CALL_STACK package
 Using PL/SQL types in SQL context
 Result cache support for functions with
invoker’s right
New way for returning cursor
October 1, 201315
create procedure get_customer_order_list
as
cur_customer sys_refcursor;
cur_order sys_refcursor;
begin
open cur_customer for
select * from customer;
open cur_order for
select * from order;
dbms_sql.return_result(cur_customer);
dbms_sql.return_result(cur_order);
end;
New way for returning cursor
October 1, 201316
// sample JDBC code
String sql = “begin get_customer_order_list; end;”;
Connection con = datasource.getConnection();
PreparedStatement ps = con.prepareStatement();
ps.executeQuery(sql);
while(ps.getMoreResults()) {
ResultSet rs = ps.getResultSet();
while(rs.next()) {
… read columns
}
}
Modularity with ACCESSIBLE BY
October 1, 201317
package pkg_api;
package pkg_api_utility;
pkg_api_utility is considered to be used only by
pkg_api
ACCESSİBLE BY
Modularity with ACCESSIBLE BY
October 1, 201318
CREATE OR REPLACE PACKAGE pkg_api_utility
ACCESSIBLE BY (pkg_api)
IS
PROCEDURE h1;
PROCEDURE h2;
END pkg_api_utility;
CREATE OR REPLACE PACKAGE BODY pkg_api_utility
IS
PROCEDURE h1 IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Helper procedure h1');
END;
PROCEDURE h2 IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Helper procedure h2');
END;
END pkg_api_utility;
Modularity with ACCESSIBLE BY
October 1, 201319
begin
pkg_api.p1;
pkg_api.p2;
end;
begin
pkg_api_utility.h1;
pkg_api_utility.h2;
end;
ORA-06550
PLS-00904: insufficient privilege to access object
PKG_API_UTILITY
UTL_CALLSTACK package
October 1, 201320
DBMS_UTILITY functions related to call/error stack:
–FORMAT_CALL_STACK
–FORMAT_ERROR_STACK
–FORMAT_ERROR_BACKTRACE
New package: UTL_CALLSTACK
http://docs.oracle.com/cd/E16655_01/appdev.121/e17602/
Result cache support for functions
with invoker’s right
October 1, 201321
In Oracle Database 11g Release 2 (11.2),
only definer's rights PL/SQL functions could
be result cached.
Now, invoker's rights PL/SQL functions can
also be result cached. (The identity of the
invoking user is implicitly added to the key of
the result.)
http://docs.oracle.com/cd/E16655_01/appde
v.121/e17622/release_changes.htm#LNPLS1
10
Java new features
October 1, 201322
 PL/SQL boolean support in JDBC driver
 PL/SQL package level collection
support
Package level collection support
October 1, 201323
create or replace package TEST_PKG is
type V_TYP is varray(10) of
varchar2(200);
type R_TYP is record(c1 pls_integer, c2
varchar2(100));
procedure VARR_PROC(p1 in V_TYP, p2
OUT V_TYP);
procedure REC_PROC(p1 in R_TYP, p2
OUT R_TYP);
end;
/
Package level collection support
October 1, 201324
create or replace package body TEST_PKG is
procedure VARR_PROC(p1 in V_TYP,
p2 OUT V_TYP) is
begin
p2 := p1;
end;
procedure REC_PROC(p1 in R_TYP,
p2 OUT R_TYP) is
begin
p2 := p1;
end;
end;
JDBC code
October 1, 201325
CallableStatement cstmt = null;
try {
cstmt = conn.prepareCall("{ call
TEST_PKG.VARR_PROC(?,?) }");
Array arr =
((OracleConnection)conn).createArray("TEST_PKG.V_
TYP", new String[]{"A", "B"});
cstmt.setArray(1, arr);
cstmt.registerOutParameter(2, Types.ARRAY,
"TEST_PKG.V_TYP");
cstmt.execute();
//get PLSQL VARRAY type out parameter value
Array outArr = cstmt.getArray(2);
} catch( Exception e) {
e.printStackTrace();
}
JDBC code
October 1, 201326
try {
cstmt = conn.prepareCall("{ call
TEST_PKG.REC_PROC(?,?) }");
//PLSQL RECORD type binding
Struct struct =
conn.createStruct("TEST_PKG.R_TYP", new Object[]
{12345, "B"});
cstmt.setObject(1, struct);
cstmt.registerOutParameter(2, Types.STRUCT,
"TEST_PKG.R_TYP");
cstmt.execute();
//get PLSQL RECORD type out parameter value
Struct outStruct = (Struct)cstmt.getObject(2);
} catch( Exception e) {
e.printStackTrace();
}
JDBC code
October 1, 201327
CREATE OR REPLACE PACKAGE PACK1 AS
TYPE EMPLOYEE_ROWTYPE_ARRAY IS TABLE OF
EMPLOYEES%ROWTYPE;
END PACK1;
CallableStatement cstmt = conn.prepareCall("BEGIN
SELECT * BULK COLLECT INTO :1 FROM EMPLOYEE;
END;");
cstmt.registerOutParameter(1,OracleTypes.ARRAY,
"PACK1.EMPLOYEE_ROWTYPE_ARRAY");
cstmt.execute();
Array a = cstmt.getArray(1);
References
October 1, 201328
 http://docs.oracle.com/cd/E16655_01/appdev.121
/e17622/release_changes.htm
 http://www.toadworld.com/platforms/oracle/b/we
blog/archive/2013/07/01/oracle-database-12c-
new-pl-sql-features.aspx
 http://docs.oracle.com/cd/E16655_01/java.121/e1
7657/apxref.htm#CHEIIJCC
 http://www.oracle-base.com/articles/12c/with-
clause-enhancements-12cr1.php
Q&A
?

More Related Content

What's hot

#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Php 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxPhp 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxDamien Seguy
 
Bypass dbms assert
Bypass dbms assertBypass dbms assert
Bypass dbms assertfangjiafu
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09Michelangelo van Dam
 
JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about youAlexander Casall
 
Using OTP and gen_server Effectively
Using OTP and gen_server EffectivelyUsing OTP and gen_server Effectively
Using OTP and gen_server EffectivelyKen Pratt
 
Data Tracking: On the Hunt for Information about Your Database
Data Tracking: On the Hunt for Information about Your DatabaseData Tracking: On the Hunt for Information about Your Database
Data Tracking: On the Hunt for Information about Your DatabaseMichael Rosenblum
 
Perl Sucks - and what to do about it
Perl Sucks - and what to do about itPerl Sucks - and what to do about it
Perl Sucks - and what to do about it2shortplanks
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutesAntonio Goncalves
 
Managing Unstructured Data: Lobs in the World of JSON
Managing Unstructured Data: Lobs in the World of JSONManaging Unstructured Data: Lobs in the World of JSON
Managing Unstructured Data: Lobs in the World of JSONMichael Rosenblum
 

What's hot (20)

SQL Tracing
SQL TracingSQL Tracing
SQL Tracing
 
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
 
Php 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxPhp 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php benelux
 
Bypass dbms assert
Bypass dbms assertBypass dbms assert
Bypass dbms assert
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
 
JavaFX Pitfalls
JavaFX PitfallsJavaFX Pitfalls
JavaFX Pitfalls
 
Oracle RDBMS Workshop (Part1)
Oracle RDBMS Workshop (Part1)Oracle RDBMS Workshop (Part1)
Oracle RDBMS Workshop (Part1)
 
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
 
PHPUnit testing to Zend_Test
PHPUnit testing to Zend_TestPHPUnit testing to Zend_Test
PHPUnit testing to Zend_Test
 
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
 
Triggers and Stored Procedures
Triggers and Stored ProceduresTriggers and Stored Procedures
Triggers and Stored Procedures
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09
 
JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about you
 
Using OTP and gen_server Effectively
Using OTP and gen_server EffectivelyUsing OTP and gen_server Effectively
Using OTP and gen_server Effectively
 
Download It
Download ItDownload It
Download It
 
Data Tracking: On the Hunt for Information about Your Database
Data Tracking: On the Hunt for Information about Your DatabaseData Tracking: On the Hunt for Information about Your Database
Data Tracking: On the Hunt for Information about Your Database
 
Perl Sucks - and what to do about it
Perl Sucks - and what to do about itPerl Sucks - and what to do about it
Perl Sucks - and what to do about it
 
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes
 
Managing Unstructured Data: Lobs in the World of JSON
Managing Unstructured Data: Lobs in the World of JSONManaging Unstructured Data: Lobs in the World of JSON
Managing Unstructured Data: Lobs in the World of JSON
 

Viewers also liked

Oracle Database 12c new features for the developers.
Oracle Database 12c new features for the developers.Oracle Database 12c new features for the developers.
Oracle Database 12c new features for the developers.Ramin Orujov
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service designRamin Orujov
 
İxtisas Seçimi və Sertifikatlar - Şəbəkə - Cisco
İxtisas Seçimi və Sertifikatlar - Şəbəkə - Ciscoİxtisas Seçimi və Sertifikatlar - Şəbəkə - Cisco
İxtisas Seçimi və Sertifikatlar - Şəbəkə - CiscoTexnologiya Azərbaycan
 
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...Ramin Orujov
 
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanları
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanlarıİKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanları
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanlarıRamin Orujov
 
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Uğur Eskici
 
Rulesimple Hizmetlerimiz
Rulesimple HizmetlerimizRulesimple Hizmetlerimiz
Rulesimple HizmetlerimizCan Taner
 
Syllabus ref02
Syllabus ref02Syllabus ref02
Syllabus ref02SongTu
 
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?James Coplien
 
Cooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemCooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemJoana Paulo Pardal
 
Seminar on mobile os
Seminar on mobile osSeminar on mobile os
Seminar on mobile osabani12
 
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri Ramin Orujov
 
Selendroid in Action
Selendroid in ActionSelendroid in Action
Selendroid in ActionDominik Dary
 
The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...Merve Aydogan
 

Viewers also liked (20)

Oracle Database 12c new features for the developers.
Oracle Database 12c new features for the developers.Oracle Database 12c new features for the developers.
Oracle Database 12c new features for the developers.
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service design
 
İxtisas Seçimi və Sertifikatlar
İxtisas Seçimi və Sertifikatlarİxtisas Seçimi və Sertifikatlar
İxtisas Seçimi və Sertifikatlar
 
İxtisas Seçimi və Sertifikatlar - Şəbəkə - Cisco
İxtisas Seçimi və Sertifikatlar - Şəbəkə - Ciscoİxtisas Seçimi və Sertifikatlar - Şəbəkə - Cisco
İxtisas Seçimi və Sertifikatlar - Şəbəkə - Cisco
 
AZEROUG ilk gorus
AZEROUG ilk gorusAZEROUG ilk gorus
AZEROUG ilk gorus
 
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...
İKT sahəsindəki beynəlxalq sertifikatlar və onların önəmi - Qafqaz Universite...
 
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanları
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanlarıİKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanları
İKT sahəsində əsas i̇stiqamətlər və i̇ş i̇mkanları
 
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Rulesimple Hizmetlerimiz
Rulesimple HizmetlerimizRulesimple Hizmetlerimiz
Rulesimple Hizmetlerimiz
 
Syllabus ref02
Syllabus ref02Syllabus ref02
Syllabus ref02
 
Introduction
IntroductionIntroduction
Introduction
 
Kullanıcı Deneyimi & Kullanılabilirlik
Kullanıcı Deneyimi & KullanılabilirlikKullanıcı Deneyimi & Kullanılabilirlik
Kullanıcı Deneyimi & Kullanılabilirlik
 
Pruebas exploratorias
Pruebas exploratoriasPruebas exploratorias
Pruebas exploratorias
 
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
 
Cooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemCooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue system
 
Seminar on mobile os
Seminar on mobile osSeminar on mobile os
Seminar on mobile os
 
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri
Oracle 11g PL/SQL proqramlamlaşdırma yenilikləri
 
Selendroid in Action
Selendroid in ActionSelendroid in Action
Selendroid in Action
 
The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...
 

Similar to IEEE Day 2013 Oracle Database 12c: new features for developers

Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management Systemsweetysweety8
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013Andrejs Vorobjovs
 
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
 
Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLErick Vidbaz
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cConnor McDonald
 
Cloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black MagicCloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black MagicScott Jenner
 
Improving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLImproving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLGuatemala User Group
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Developmentrehaniltifat
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPChristopher Jones
 
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
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new featuresAlfredo Krieg
 
Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2Ajith Narayanan
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
 
Oracle db subprograms
Oracle db subprogramsOracle db subprograms
Oracle db subprogramsSimon Huang
 

Similar to IEEE Day 2013 Oracle Database 12c: new features for developers (20)

Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013
 
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
 
Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQL
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
 
Cloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black MagicCloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black Magic
 
Improving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLImproving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQL
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development
 
4. plsql 1
4. plsql 14. plsql 1
4. plsql 1
 
Awr report error
Awr report errorAwr report error
Awr report error
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHP
 
10053 otw
10053 otw10053 otw
10053 otw
 
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...
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
 
Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Oracle db subprograms
Oracle db subprogramsOracle db subprograms
Oracle db subprograms
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

IEEE Day 2013 Oracle Database 12c: new features for developers

  • 1. IEEE Day 2013 Ramin Orujov ICT/Internal Applications Team Head Azercell Telecom SCJP 6, OCE Java EE 6 WCD www.linkedin.com/in/raminorujov 01 October 2013, Qafqaz University Oracle database 12c: New features for developers
  • 2. About me Senior software developer Internal Applications Team Head@Azercell Teacher @ Qafqaz University CE dept. Co-manager of AZEROUG Founder and manager of AZERJUG October 1, 20132
  • 3. Oracle database platforms Oracle 9i – internet Oracle 10g/11g – grid Oracle 12c - cloud http://www.oracle.com/us/products/databas http://www.oracle.com/technetwork/databas October 1, 20133
  • 4. SQL new features  SEQUENCE as default column value  IDENTITY column  VARCHAR2, NVARCHAR2 32K limit  LIMIT, OFFSET support for paging  Invisible column support  Inline PL/SQL function within SQL WITH expression October 1, 20134
  • 5. SEQUENCE as default col value create sequence test_seq start with 1 increment by 1; create table test_table( id number default test_seq.nextval primary key ); http://docs.oracle.com/cd/E16655_01/server SQLRF54458 October 1, 20135
  • 6. IDENTITY column MySQL,MS SQL Server auto increment/identity create table test_table( id number generated by default on null as identity, name varchar2(10) ) insert into test_table(name) values(‘ramin’) insert into test_table(id,name) values(null, ‘ramin’) http://docs.oracle.com/cd/E16655_01/gateways.121/ DRDAA109 October 1, 20136
  • 7. VARCHAR2,NVARCHAR2 32K limit 32767 character support VARCHAR2, NVARCHAR2, RAW Initialization param MAX_STRING_SIZE = EXTENDED http://docs.oracle.com/cd/E16655_01/server October 1, 20137
  • 8. LIMIT, OFFSET support select * from ( select rownum rn, id, e.* from employees e ) where rn between 1 AND 10 order by 1; October 1, 20138
  • 10. LIMIT, OFFSET support October 1, 201310 SELECT employee_id, last_name FROM employees ORDER BY salary FETCH FIRST 10 ROWS ONLY; SELECT employee_id, last_name FROM employees ORDER BY salary OFFSET 5 ROWS FETCH NEXT 10 ROWS ONLY;
  • 11. LIMIT, OFFSET support October 1, 201311 SELECT employee_id, last_name, salary FROM employees ORDER BY salary FETCH FIRST 5 PERCENT ROWS WITH TIES; http://docs.oracle.com/cd/E16655_01/server.121
  • 12. Invisible column October 1, 201312 create table app_user( id number generated by default on null as identity, username varchar2(100) not null, passwd varchar(100) invisible ); select * from app_user; http://docs.oracle.com/cd/E16655_01/server
  • 13. Inline PL/SQL function WITH October 1, 201313 with function sqr(p_num in number) return number is begin return p_num * p_num; end; select u.user_id, sqr(u.user_id) from all_users where rownum <= 10; 2.5-3x performance improvement http://docs.oracle.com/cd/E16655_01/server.121/e17
  • 14. PL/SQL new features October 1, 201314  New way for returning cursor  Modularity with ACCESSIBLE BY  New UTL_CALL_STACK package  Using PL/SQL types in SQL context  Result cache support for functions with invoker’s right
  • 15. New way for returning cursor October 1, 201315 create procedure get_customer_order_list as cur_customer sys_refcursor; cur_order sys_refcursor; begin open cur_customer for select * from customer; open cur_order for select * from order; dbms_sql.return_result(cur_customer); dbms_sql.return_result(cur_order); end;
  • 16. New way for returning cursor October 1, 201316 // sample JDBC code String sql = “begin get_customer_order_list; end;”; Connection con = datasource.getConnection(); PreparedStatement ps = con.prepareStatement(); ps.executeQuery(sql); while(ps.getMoreResults()) { ResultSet rs = ps.getResultSet(); while(rs.next()) { … read columns } }
  • 17. Modularity with ACCESSIBLE BY October 1, 201317 package pkg_api; package pkg_api_utility; pkg_api_utility is considered to be used only by pkg_api ACCESSİBLE BY
  • 18. Modularity with ACCESSIBLE BY October 1, 201318 CREATE OR REPLACE PACKAGE pkg_api_utility ACCESSIBLE BY (pkg_api) IS PROCEDURE h1; PROCEDURE h2; END pkg_api_utility; CREATE OR REPLACE PACKAGE BODY pkg_api_utility IS PROCEDURE h1 IS BEGIN DBMS_OUTPUT.PUT_LINE('Helper procedure h1'); END; PROCEDURE h2 IS BEGIN DBMS_OUTPUT.PUT_LINE('Helper procedure h2'); END; END pkg_api_utility;
  • 19. Modularity with ACCESSIBLE BY October 1, 201319 begin pkg_api.p1; pkg_api.p2; end; begin pkg_api_utility.h1; pkg_api_utility.h2; end; ORA-06550 PLS-00904: insufficient privilege to access object PKG_API_UTILITY
  • 20. UTL_CALLSTACK package October 1, 201320 DBMS_UTILITY functions related to call/error stack: –FORMAT_CALL_STACK –FORMAT_ERROR_STACK –FORMAT_ERROR_BACKTRACE New package: UTL_CALLSTACK http://docs.oracle.com/cd/E16655_01/appdev.121/e17602/
  • 21. Result cache support for functions with invoker’s right October 1, 201321 In Oracle Database 11g Release 2 (11.2), only definer's rights PL/SQL functions could be result cached. Now, invoker's rights PL/SQL functions can also be result cached. (The identity of the invoking user is implicitly added to the key of the result.) http://docs.oracle.com/cd/E16655_01/appde v.121/e17622/release_changes.htm#LNPLS1 10
  • 22. Java new features October 1, 201322  PL/SQL boolean support in JDBC driver  PL/SQL package level collection support
  • 23. Package level collection support October 1, 201323 create or replace package TEST_PKG is type V_TYP is varray(10) of varchar2(200); type R_TYP is record(c1 pls_integer, c2 varchar2(100)); procedure VARR_PROC(p1 in V_TYP, p2 OUT V_TYP); procedure REC_PROC(p1 in R_TYP, p2 OUT R_TYP); end; /
  • 24. Package level collection support October 1, 201324 create or replace package body TEST_PKG is procedure VARR_PROC(p1 in V_TYP, p2 OUT V_TYP) is begin p2 := p1; end; procedure REC_PROC(p1 in R_TYP, p2 OUT R_TYP) is begin p2 := p1; end; end;
  • 25. JDBC code October 1, 201325 CallableStatement cstmt = null; try { cstmt = conn.prepareCall("{ call TEST_PKG.VARR_PROC(?,?) }"); Array arr = ((OracleConnection)conn).createArray("TEST_PKG.V_ TYP", new String[]{"A", "B"}); cstmt.setArray(1, arr); cstmt.registerOutParameter(2, Types.ARRAY, "TEST_PKG.V_TYP"); cstmt.execute(); //get PLSQL VARRAY type out parameter value Array outArr = cstmt.getArray(2); } catch( Exception e) { e.printStackTrace(); }
  • 26. JDBC code October 1, 201326 try { cstmt = conn.prepareCall("{ call TEST_PKG.REC_PROC(?,?) }"); //PLSQL RECORD type binding Struct struct = conn.createStruct("TEST_PKG.R_TYP", new Object[] {12345, "B"}); cstmt.setObject(1, struct); cstmt.registerOutParameter(2, Types.STRUCT, "TEST_PKG.R_TYP"); cstmt.execute(); //get PLSQL RECORD type out parameter value Struct outStruct = (Struct)cstmt.getObject(2); } catch( Exception e) { e.printStackTrace(); }
  • 27. JDBC code October 1, 201327 CREATE OR REPLACE PACKAGE PACK1 AS TYPE EMPLOYEE_ROWTYPE_ARRAY IS TABLE OF EMPLOYEES%ROWTYPE; END PACK1; CallableStatement cstmt = conn.prepareCall("BEGIN SELECT * BULK COLLECT INTO :1 FROM EMPLOYEE; END;"); cstmt.registerOutParameter(1,OracleTypes.ARRAY, "PACK1.EMPLOYEE_ROWTYPE_ARRAY"); cstmt.execute(); Array a = cstmt.getArray(1);
  • 28. References October 1, 201328  http://docs.oracle.com/cd/E16655_01/appdev.121 /e17622/release_changes.htm  http://www.toadworld.com/platforms/oracle/b/we blog/archive/2013/07/01/oracle-database-12c- new-pl-sql-features.aspx  http://docs.oracle.com/cd/E16655_01/java.121/e1 7657/apxref.htm#CHEIIJCC  http://www.oracle-base.com/articles/12c/with- clause-enhancements-12cr1.php
  • 29. Q&A ?