SlideShare a Scribd company logo
Oracle 12c New Features
for Developers
By Complete IT Professional
www.completeitprofessional.com
Oracle 12c
• Released in 2013
• Contains a lot of new features
• Some are useful for DBAs, some are useful for developers, some for both
• As a developer, what do you need to know?
• I wrote an entire post on it:
http://www.completeitprofessional.com/oracle-12c-new-features-for-developers
• These slides explain all of those features
Increased column size limits
• VARCHAR2, NVARCHAR2, and RAW are larger than previous
Oracle versions
Data Type Oracle 11g
Limit
Oracle 11g
PL/SQL Limit
Limit in
Oracle 12c
VARCHAR2 2K 4K 32K
NVARCHAR2 2K 4K 32K
RAW 2K 4K 32K
Increased column size limits
• How can you use the new sizes?
• Change the setting called MAX_STRING_SIZE within the init.ora
file
• STANDARD – old sizes
• EXTENDED – new sizes
APPROX_COUNT_DISTINCT
• New function – APPROX_COUNT_DISTINCT
• Gives you an approximate count of records
• Faster than COUNT
• Not 100% accurate but pretty close
Row Limiting with Top N
• Getting the top N rows can be hard in Oracle
• In Oracle 12c, you can use new syntax
• FETCH FIRST 10 ROWS ONLY – shows only the first 10 rows
Row Limiting with Top N
SELECT first_name, last_name, date_of_birth
FROM student
ORDER BY date_of_birth
FETCH FIRST 10 ROWS ONLY;
Pattern Matching
• Pattern matching is easier in Oracle 12c
• Uses the MATCH_RECOGNIZE keyword
Pattern Matching Syntax
SELECT columns
FROM table
MATCH_RECOGNIZE (
PARTITION BY ...
ORDER BY ...
MEASURES ...
PATTERN...
DEFINE...
)
ORDER BY col1...
JSON in Database
• Oracle 12c now support JSON in database columns
• You can query directly inside the column data
JSON Example
{
“businessName”:”Cars Galore”,
“address”:{
“streetNumber”:”14”,
“streetName”:”Main Street”,
“city”:”Denver”,
“state”:”Colorado”,
“country”:”USA”},
“businessIndustry”:”Automotive”
}
SELECT
b.document.businessName,
b.document.address.streetNumber,
b.document.address.streetName
FROM businesses b
Lateral Clause for Inline Views
• Normally you can’t refer to columns outside an inline view
from within the inline view
• With a LATERAL clause, you can
Lateral Clause Example
SELECT first_name, last_name, school_name
FROM student s,
LATERAL (SELECT school_name
FROM school sc
WHERE sc.school_id = s.school_id)
CROSS APPLY Clause
• Similar to Lateral
• Variant of the CROSS JOIN
• Right side of the keyword can reference the column on the left
CROSS APPLY Example
SELECT first_name, last_name, school_id, school_name
FROM student s,
CROSS APPLY (SELECT school_name
FROM school sc
WHERE sc.school_id = s.school_id
AND sc.school_state = ‘California’)
OUTER APPLY Clause
• Similar to CROSS APPLY
• More like a LEFT OUTER JOIN
OUTER APPLY Example
SELECT first_name, last_name, school_id, school_name
FROM student s,
OUTER APPLY (SELECT school_name
FROM school sc
WHERE sc.school_id = s.school_id
AND sc.school_state = ‘California’)
Partial Join Evaluation
• New optimisation type
• Part of the optimisation process
• You might see it in the Explain Plan
• Partial Join Evaluation
• Also called PJE
Cascading Truncate
• Have you tried to TRUNCATE a table that had other records
referring to it, and got an error about foreign keys?
• With Oracle 12c, you can run a TRUNCATE CASCADE
• This will skip this error and delete the rows that refer to it
• Only works if the foreign key is defined as ON DELETE
CASCASE
Cascading Truncate Example
TRUNCATE TABLE parent_table_name CASCADE;
Pluggable Databases
• One of the main features in Oracle 12c
• A “root” database is created
• “Seed” database is a template for creating other databases
• “Pluggable databases” are where the data is stored
• All inside the root
Why pluggable databases?
• Easier maintenance
• Easier implementation of new databases – just copy the seed
• Easier to move to the cloud
Invisible Columns
• Columns that do not appear in the table definition or SELECT *
statements
• Use the INVISIBLE keyword when defining a column
Invisible Indexes
• Allows more than one index on a column at one time
• Create index and add the INVISIBLE keyword
Identity Columns
• Set a column to automatically generate a value
• Similar to AUTO_INCREMENT in other databases
• Add GENERATED AS IDENTITY to column definition when
creating a table
Default Values
• Simplify data entry
• Use sequences as the default values
• Or use default values only when a NULL is specified
Session Sequences
• Sequences currently keep their values for the database for all
sessions
• Session sequences are new
• They let you retain the value only for the session
• Not very useful for primary keys, but there are other uses
Sequence KEEP and NOKEEP
• KEEP and NOKEEP are keywords for creating sequences
• KEEP retains the NEXTVALUE value for replays during
Application Continuity
• NOKEEP will not retain the NEXTVALUE for these replays
• NOKEEP is the default
Data Redaction
• You can hide certain fields in certain ways
• Replace characters with spaces or numbers
• Or, change part of the information
• Good security feature
Grant Roles to PL/SQL Programs Only
• Previously, you had to grant user access to the PL/SQL
program and the table
• Now, just grant user access to the PL/SQL program
• Program will still access the table
• Makes it more secure
UTL_CALL_STACK Package
• Improvements to the call stack
• Use the UTL_CALL_STACK package to get information about
your call stack
PL/SQL ACCESSIBLE BY Clause
• Allows you to specify which packages can access other
packages
• Helps with security
• Simplifies package definition if you want to implement this
• Add the words ACCESSIBLE BY to the package when defining
PL/SQL Table Operator
• Before 12c, you could only use the TABLE operator in some
situations
• Now, you can use them with locally defined types
WITH Clause and PL/SQL Functions
• Now you can define PL/SQL functions and procedures inside a
WITH clause
• Likely improves run time
• Object is not created and stored in the database
Online DDL Statements
• DDL normally locks tables
• Some statements can now be run in “online” mode, which
does not impact any DML that is running
• Statements relate to indexes, constraints, and columns
DDL Logging
• You can enable DDL logging
• Many DDL statements are captured
• CREATE/ALTER/DROP/TRUNCATE TABLE
• CREATE/ALTER/DROP
PACKAGE/FUNCTION/VIEW/SYNONYM/SEQUENCE
• DROP USER
Bequeath Option
• Allows you to specify which user’s privileges will be used when
running a statement
• Specify either invoker’s or definer’s rights
• Invoker’s rights – the person running the statement
• Definer’s rights – the person who created the object
Period Definition
• Allows you to easily specify which records are valid at a
particular date
• Use the PERIOD clause when creating a table
• You can then use the PERIOD clause in SELECT queries
Conclusion
• Many new features in Oracle 12c
• These are all of the features I think are helpful for new developers
• Find out more here:
http://www.completeitprofessional.com/oracle-12c-new-features-for-developers

More Related Content

What's hot

Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Alex Zaballa
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
Marco Gralike
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback Features
Pini Dibask
 
The Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12cThe Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12c
David Yahalom
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesSaiful
 
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
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Pini Dibask
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Christian Gohmann
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
pasalapudi
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
Alex Zaballa
 
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
Andy Colvin
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
Red Stack Tech
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance Strategy
Guatemala User Group
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified
Pini Dibask
 
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data RedactionOracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Alex Zaballa
 
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
Alex Zaballa
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
Alex Zaballa
 

What's hot (19)

Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback Features
 
The Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12cThe Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12c
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slides
 
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...
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - Presentation
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTS
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
 
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 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance Strategy
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified
 
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data RedactionOracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
 
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 

Viewers also liked

Oracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12cOracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12cAndrey Akulov
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
Guatemala User Group
 
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis
 
Sql сборник рецептов
Sql сборник рецептовSql сборник рецептов
Sql сборник рецептовknoppix
 
Все самые важные команды SQL за 60 минут
Все самые важные команды SQL за 60 минутВсе самые важные команды SQL за 60 минут
Все самые важные команды SQL за 60 минут
SkillFactory
 
Weblogic Cluster monitoring
Weblogic Cluster monitoringWeblogic Cluster monitoring
Weblogic Cluster monitoring
Aditya Bhuyan
 
Weblogic Cluster Installation
Weblogic Cluster InstallationWeblogic Cluster Installation
Weblogic Cluster Installation
Aditya Bhuyan
 
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at ScaleOracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
C2B2 Consulting
 
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Principled Technologies
 
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
Rakuten Group, Inc.
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
DLT Solutions
 
Weblogic Cluster advanced performance tuning
Weblogic Cluster advanced performance tuningWeblogic Cluster advanced performance tuning
Weblogic Cluster advanced performance tuning
Aditya Bhuyan
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
prathap kumar
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
Vigilant Technologies
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12cCosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Gustavo Rene Antunez
 

Viewers also liked (17)

Oracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12cOracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12c
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
 
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
 
Sql сборник рецептов
Sql сборник рецептовSql сборник рецептов
Sql сборник рецептов
 
Все самые важные команды SQL за 60 минут
Все самые важные команды SQL за 60 минутВсе самые важные команды SQL за 60 минут
Все самые важные команды SQL за 60 минут
 
Weblogic Cluster monitoring
Weblogic Cluster monitoringWeblogic Cluster monitoring
Weblogic Cluster monitoring
 
Weblogic Cluster Installation
Weblogic Cluster InstallationWeblogic Cluster Installation
Weblogic Cluster Installation
 
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at ScaleOracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
 
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
 
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
 
Weblogic Cluster advanced performance tuning
Weblogic Cluster advanced performance tuningWeblogic Cluster advanced performance tuning
Weblogic Cluster advanced performance tuning
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
 
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12cCosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
 

Similar to Oracle 12c New Features for Developers

oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
Nancy Thomas
 
Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*Plus
Chhom Karath
 
Database Objects
Database ObjectsDatabase Objects
Database Objects
Salman Memon
 
Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Brij Mishra
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
MuksNoor
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
Vinay Kumar
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
FayChan8
 
PL/SQL
PL/SQLPL/SQL
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
Reuven Lerner
 
Less07 schema
Less07 schemaLess07 schema
Less07 schemaImran Ali
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptx
Kulbir4
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
Md. Mahedee Hasan
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
Introduction to PLSQL.PPT
Introduction to PLSQL.PPTIntroduction to PLSQL.PPT
Introduction to PLSQL.PPT
SujayaBiju
 
SQL Intro
SQL IntroSQL Intro
SQL Intro
koppenolski
 
Pl sql best practices document
Pl sql best practices documentPl sql best practices document
Pl sql best practices document
Ashwani Pandey
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
Vassilis Bekiaris
 
Sql coding-standard-sqlserver
Sql coding-standard-sqlserverSql coding-standard-sqlserver
Sql coding-standard-sqlserver
lochaaaa
 
Unit 4 plsql
Unit 4  plsqlUnit 4  plsql
Unit 4 plsql
DrkhanchanaR
 

Similar to Oracle 12c New Features for Developers (20)

oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
 
Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*Plus
 
Database Objects
Database ObjectsDatabase Objects
Database Objects
 
Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
 
PL/SQL
PL/SQLPL/SQL
PL/SQL
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Less07 schema
Less07 schemaLess07 schema
Less07 schema
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptx
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Introduction to PLSQL.PPT
Introduction to PLSQL.PPTIntroduction to PLSQL.PPT
Introduction to PLSQL.PPT
 
SQL Intro
SQL IntroSQL Intro
SQL Intro
 
Pl sql best practices document
Pl sql best practices documentPl sql best practices document
Pl sql best practices document
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
 
Sql coding-standard-sqlserver
Sql coding-standard-sqlserverSql coding-standard-sqlserver
Sql coding-standard-sqlserver
 
Unit 4 plsql
Unit 4  plsqlUnit 4  plsql
Unit 4 plsql
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 

Oracle 12c New Features for Developers

  • 1. Oracle 12c New Features for Developers By Complete IT Professional www.completeitprofessional.com
  • 2. Oracle 12c • Released in 2013 • Contains a lot of new features • Some are useful for DBAs, some are useful for developers, some for both • As a developer, what do you need to know? • I wrote an entire post on it: http://www.completeitprofessional.com/oracle-12c-new-features-for-developers • These slides explain all of those features
  • 3. Increased column size limits • VARCHAR2, NVARCHAR2, and RAW are larger than previous Oracle versions Data Type Oracle 11g Limit Oracle 11g PL/SQL Limit Limit in Oracle 12c VARCHAR2 2K 4K 32K NVARCHAR2 2K 4K 32K RAW 2K 4K 32K
  • 4. Increased column size limits • How can you use the new sizes? • Change the setting called MAX_STRING_SIZE within the init.ora file • STANDARD – old sizes • EXTENDED – new sizes
  • 5. APPROX_COUNT_DISTINCT • New function – APPROX_COUNT_DISTINCT • Gives you an approximate count of records • Faster than COUNT • Not 100% accurate but pretty close
  • 6. Row Limiting with Top N • Getting the top N rows can be hard in Oracle • In Oracle 12c, you can use new syntax • FETCH FIRST 10 ROWS ONLY – shows only the first 10 rows
  • 7. Row Limiting with Top N SELECT first_name, last_name, date_of_birth FROM student ORDER BY date_of_birth FETCH FIRST 10 ROWS ONLY;
  • 8. Pattern Matching • Pattern matching is easier in Oracle 12c • Uses the MATCH_RECOGNIZE keyword
  • 9. Pattern Matching Syntax SELECT columns FROM table MATCH_RECOGNIZE ( PARTITION BY ... ORDER BY ... MEASURES ... PATTERN... DEFINE... ) ORDER BY col1...
  • 10. JSON in Database • Oracle 12c now support JSON in database columns • You can query directly inside the column data
  • 11. JSON Example { “businessName”:”Cars Galore”, “address”:{ “streetNumber”:”14”, “streetName”:”Main Street”, “city”:”Denver”, “state”:”Colorado”, “country”:”USA”}, “businessIndustry”:”Automotive” } SELECT b.document.businessName, b.document.address.streetNumber, b.document.address.streetName FROM businesses b
  • 12. Lateral Clause for Inline Views • Normally you can’t refer to columns outside an inline view from within the inline view • With a LATERAL clause, you can
  • 13. Lateral Clause Example SELECT first_name, last_name, school_name FROM student s, LATERAL (SELECT school_name FROM school sc WHERE sc.school_id = s.school_id)
  • 14. CROSS APPLY Clause • Similar to Lateral • Variant of the CROSS JOIN • Right side of the keyword can reference the column on the left
  • 15. CROSS APPLY Example SELECT first_name, last_name, school_id, school_name FROM student s, CROSS APPLY (SELECT school_name FROM school sc WHERE sc.school_id = s.school_id AND sc.school_state = ‘California’)
  • 16. OUTER APPLY Clause • Similar to CROSS APPLY • More like a LEFT OUTER JOIN
  • 17. OUTER APPLY Example SELECT first_name, last_name, school_id, school_name FROM student s, OUTER APPLY (SELECT school_name FROM school sc WHERE sc.school_id = s.school_id AND sc.school_state = ‘California’)
  • 18. Partial Join Evaluation • New optimisation type • Part of the optimisation process • You might see it in the Explain Plan • Partial Join Evaluation • Also called PJE
  • 19. Cascading Truncate • Have you tried to TRUNCATE a table that had other records referring to it, and got an error about foreign keys? • With Oracle 12c, you can run a TRUNCATE CASCADE • This will skip this error and delete the rows that refer to it • Only works if the foreign key is defined as ON DELETE CASCASE
  • 20. Cascading Truncate Example TRUNCATE TABLE parent_table_name CASCADE;
  • 21. Pluggable Databases • One of the main features in Oracle 12c • A “root” database is created • “Seed” database is a template for creating other databases • “Pluggable databases” are where the data is stored • All inside the root
  • 22. Why pluggable databases? • Easier maintenance • Easier implementation of new databases – just copy the seed • Easier to move to the cloud
  • 23. Invisible Columns • Columns that do not appear in the table definition or SELECT * statements • Use the INVISIBLE keyword when defining a column
  • 24. Invisible Indexes • Allows more than one index on a column at one time • Create index and add the INVISIBLE keyword
  • 25. Identity Columns • Set a column to automatically generate a value • Similar to AUTO_INCREMENT in other databases • Add GENERATED AS IDENTITY to column definition when creating a table
  • 26. Default Values • Simplify data entry • Use sequences as the default values • Or use default values only when a NULL is specified
  • 27. Session Sequences • Sequences currently keep their values for the database for all sessions • Session sequences are new • They let you retain the value only for the session • Not very useful for primary keys, but there are other uses
  • 28. Sequence KEEP and NOKEEP • KEEP and NOKEEP are keywords for creating sequences • KEEP retains the NEXTVALUE value for replays during Application Continuity • NOKEEP will not retain the NEXTVALUE for these replays • NOKEEP is the default
  • 29. Data Redaction • You can hide certain fields in certain ways • Replace characters with spaces or numbers • Or, change part of the information • Good security feature
  • 30. Grant Roles to PL/SQL Programs Only • Previously, you had to grant user access to the PL/SQL program and the table • Now, just grant user access to the PL/SQL program • Program will still access the table • Makes it more secure
  • 31. UTL_CALL_STACK Package • Improvements to the call stack • Use the UTL_CALL_STACK package to get information about your call stack
  • 32. PL/SQL ACCESSIBLE BY Clause • Allows you to specify which packages can access other packages • Helps with security • Simplifies package definition if you want to implement this • Add the words ACCESSIBLE BY to the package when defining
  • 33. PL/SQL Table Operator • Before 12c, you could only use the TABLE operator in some situations • Now, you can use them with locally defined types
  • 34. WITH Clause and PL/SQL Functions • Now you can define PL/SQL functions and procedures inside a WITH clause • Likely improves run time • Object is not created and stored in the database
  • 35. Online DDL Statements • DDL normally locks tables • Some statements can now be run in “online” mode, which does not impact any DML that is running • Statements relate to indexes, constraints, and columns
  • 36. DDL Logging • You can enable DDL logging • Many DDL statements are captured • CREATE/ALTER/DROP/TRUNCATE TABLE • CREATE/ALTER/DROP PACKAGE/FUNCTION/VIEW/SYNONYM/SEQUENCE • DROP USER
  • 37. Bequeath Option • Allows you to specify which user’s privileges will be used when running a statement • Specify either invoker’s or definer’s rights • Invoker’s rights – the person running the statement • Definer’s rights – the person who created the object
  • 38. Period Definition • Allows you to easily specify which records are valid at a particular date • Use the PERIOD clause when creating a table • You can then use the PERIOD clause in SELECT queries
  • 39. Conclusion • Many new features in Oracle 12c • These are all of the features I think are helpful for new developers • Find out more here: http://www.completeitprofessional.com/oracle-12c-new-features-for-developers