0% found this document useful (0 votes)
73 views

Keynote 11gDatabaseDevelopment

This document outlines an agenda for an Oracle Developer Days event focusing on exploiting the full potential of the Oracle database for application development. The agenda includes sessions on database development features like caching technologies, data management, application development tools and frameworks. Specific sessions will cover topics like SQL, PL/SQL, XMLDB, SQL analytics, and database caching technologies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Keynote 11gDatabaseDevelopment

This document outlines an agenda for an Oracle Developer Days event focusing on exploiting the full potential of the Oracle database for application development. The agenda includes sessions on database development features like caching technologies, data management, application development tools and frameworks. Specific sessions will cover topics like SQL, PL/SQL, XMLDB, SQL analytics, and database caching technologies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

<Insert Picture Here>

Oracle Developer Days


Oracle Database 11g - Exploiting the full potential of
the Oracle database for application development
Thursday, September 8, 11
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver
any material, code, or functionality, and should
not be relied upon in making purchasing
decisions.
The development, release, and timing of any
features or functionality described for Oracles
products remains at the sole discretion of
Oracle.
Thursday, September 8, 11
Database Development Features
Database Caching Technologies
Data Management
Application Development
Tools and Frameworks
Agenda
Deployment
Thursday, September 8, 11
SQL
The Language of Relational Databases
Productive
Simple syntax: SELECT, INSERT, UPDATE,
DELETE, DROP, ALTER, GRANT
Set based language dont write code to iterate
Easy to relate sets of data using joins
Separation of logical and physical
Data independence dont code physical
references
Optimizers dont specify access methods
Capabilities
Transaction isolation and control
Row level locking and concurrency
Multi version read consistency
Referential integrity
Stored procedures and triggers
SELECT *
FROM EMPLOYEES
WHERE
Thursday, September 8, 11
PL/SQL
Oracles Database Stored Procedure Language
Used for triggers, functions, procedures,
packages, anonymous blocks
Robust 4GL language with native support for SQL
Packages separate specification from
implementation facilitating development of APIs
Runs identically on all operating systems
PL/SQL functions may be called from SQL
Queries
Easy to learn: If then else, variables, cursor
loops
Native compilation
Thursday, September 8, 11
PL/SQL
Develop data APIs using PL/SQL Packages
Thursday, September 8, 11
PL/SQL
Use PL/SQL Hierarchical Profiler to identify hot spots
Callee Elapsed Aggregated
OE_API 3,011 595,781
get_order 8,605 592,712
get_order static SQL line 12 7,159 7,159
get_order static SQL line 57 576,948 576,948
place_order 58 58
place_order static SQL line 207 0 0
See where your CPU time is going
Hierarchical profiler shows context
Invoke using DBMS_HPROF.START_PROFILING
Thursday, September 8, 11
Edition-Based Redefinition
Online Application Upgrade
Allows multiple editions to be available simultaneously
Compilation of editioned objects transparent to application
Views, Synonyms and PL/SQL objects can be editioned
Base Edition
New Edition
Database objects
Application v1
Application v2
Thursday, September 8, 11
Edition-Based Redefinition
Online Application Upgrade
Compile objects in new edition without affecting online users
Deploy new application version referencing new edition
Current users are not effected, they reference base edition
Phase in new application version over time
New Edition Base Edition
Application v1 Application v2
View Procedure View Procedure
1
2
3
4
1
2
3
4
Table New Column
Thursday, September 8, 11
XML DB
Manage XML Content within the Oracle Database
Consolidate storage of
relational and XML data in
Oracle 11g
Natively store XML content
XMLTYPE columns
XML Tables
Index of XML for fast access
Unload relational data to XML
Use XML Standards including
XQuery and XML Schema
XML
XML
Oracle Database
Thursday, September 8, 11
XML DB Example
Query XML Data in XMLTYPE Columns

Year Department Estimate Actual
2010 Accounting 570,000 560,000
2010 Operations 255,000 265,000
2009 Accounting 540,000 555,000
2009 Operations 240,000 242,000
select xtab.year, d.dname, xtab.actual, xtab.estimate
from WWV_DEMO_DEPT d,
XMLTable ('/Budget/History/Budget'
passing BUDGET COLUMNS
YEAR VARCHAR2(4) PATH 'Year',
ESTIMATE NUMBER(20) PATH 'Estimate',
ACTUAL NUMBER(20) PATH 'Actual') xtab
Thursday, September 8, 11
SQL Analytics
Industrys most complete implementation
Ranking functions
Window Aggregate
functions
LAG/LEAD functions
Reporting Aggregate
functions
Statistical Aggregates
Linear Regression
Descriptive Statistics
Correlations
Cross Tabs
Hypothesis Testing
Distribution Fitting
Statistics SQL Analytics
Thursday, September 8, 11
SQL Analytics - Example
Listing values of a Group By column
select deptno,
listagg( ename, '; ' )
within group(order by ename)
as department_employees
from emp
group by deptno
DEPTNO DEPARTMENT EMPLOYEES
10 CLARK; KING; MILLER
20 ADAMS; FORD; JONES; SCOTT; SMITH
30 ALLEN; BLAKE; JAMES; MARTIN; TURNER;
WARD
Thursday, September 8, 11
SQL Analytics - Example
Referencing Previous Row Values
select application,
to_char(run_date,day) run_date,
rows_processed,
rows_processed - lag(rows_processed, 1, 0)
over (order by rows_processed )as difference
from application_log
order by run_date
Application Run Date Rows Processed Difference
Daily Load Monday 850 0
Daily Load Tuesday 875 25
Daily Load Wednesday 860 -15
Daily Load Thursday 890 30
Daily Load Friday 900 10
Thursday, September 8, 11
SQL PIVOT
Rotate rows into columns and vice versa
Create aggregated cross-tabular result set
Project many columns as filtered summaries of one
column
New syntax PIVOT and UNPIVOT
select * from sales
pivot
(sum(amount)
for quarter in
Q1,Q2,Q3,Q4);
PROD QUARTER AMOUNT
Shoe
s
Q1 2000
Shoe
s
Q2 1000
Jeans Q1 1000
Jeans Q3 500
Jeans Q3 100
Jeans Q4 1000
PROD Q1 Q2 Q3 Q4
Shoes 2000 1000 Null Null
Jeans 1000 Null 600 1000
Thursday, September 8, 11
Oracle Database JVM
Write Database Stored Procedures in Java
Load Java in the database and expose via PL/SQL
Leverage native and open source Java functionality
Run Java where it makes the most sense
Provide features not native to PL/SQL
Complements Java deployed in the Mid Tier
Improve performance of data heavy Java
Leverage Java Skills
New in Oracle Database 11gR1
JIT Compiler
Java Management Extensions (JMX)
Thursday, September 8, 11
Oracle Database JVM
Write Database Stored Procedures in Java
Create or replace public class Hello
{
static public void world()
{
System.out.println("Hello World");
return; }
}
/
create or replace procedure hello
as language java
name Hello.world();
Thursday, September 8, 11
Database Development Features
Database Caching Technologies
Data Management
Application Development
Tools and Frameworks
Agenda
Thursday, September 8, 11
Database Caching Technologies
SQL Result Set Cache
Cache queries and sub queries
Shared by all sessions
Full consistency and proper
semantics
2x - 100x speedup
PL/SQL Function Cache
Automatic invalidation
Shared by all sessions
Use for deterministic functions
Thursday, September 8, 11
SQL Result Set Cache
Query Annotation and Alter Table Syntax
Query Annotation Syntax
select /*+ result_cache */
ename, job
from employees where deptno in (10,30,40);
Table Level Result Set Caching

alter table employees result_cache (mode force);
Thursday, September 8, 11
PL/SQL Function Cache Example
CREATE FUNCTION format_name (
p_first_name IN VARCHAR2,
p_last_name IN VARCHAR2)
RETURN VARCHAR2
RESULT_CACHE
IS
v_name VARCHAR2(4000)
BEGIN
RETURN p_first_name || ' ' || p_last_name;
END format_name;
Thursday, September 8, 11
Database Caching Technologies
Client Result Cache
Recommended for small read-
intensive tables
6X reduction in CPU usage
15% to 20% in response time
Invoked by setting the init.ora
parameters
Database Smart Cache
Extends SGA buffer cache
Smart database caching
Solaris and Oracle Enterprise Linux
only
Buffer Cache
Flash
Thursday, September 8, 11
TimesTen In-Memory Database Cache
In-memory RDBMS for real-time applications
Fast, consistent response
time with low latency
Standard SQL and PL/SQL
Cache subsets with read/
write; tables, rows,
columns
Automatic
synchronization with
Oracle Database
Built-in high availability
(HA) and data persistence
Scale-out cache grid
Applications: Financial and Telco Services, Web Portal, CRM
IMDB Cache Grid
TimesTen DB
Application
TimesTen DB
Application
Thursday, September 8, 11
TimesTen In-Memory Database Cache
Flexible Cache Group Configuration
Full relational access with
transaction support.
CREATE Asynchronous
Writethrough Cache Group
custCache FROM customer (
cust_id
(number(10,0), ..
) , acct ( acct_id, ..,
foreign key (cust_id)
, orders (..);
Application
Transactions
Cache Groups
Automatic Data
Synchronization
Thursday, September 8, 11
Database Development Features
Database Caching Technologies
Data Management
Application Development
Tools and Frameworks
Agenda
Thursday, September 8, 11
Advanced Compression Option
Significant reductions in data volumes
Benefits for both OLTP and DW solutions
Transparent to the application and works with all data
types
EBS queries run 250% faster
DML operations are 3% slower
OLTP Data Warehousing Archival No Compression
3x 10x 20x
Thursday, September 8, 11
Advanced Compression Syntax Example
CREATE TABLE employees(
emplyee_id NUMBER,
first_name VARCHAR2(50),
last_name VARCHAR2(50)
) COMPRESS FOR OLTP;
Thursday, September 8, 11
Oracle SecureFiles
High Performance Large Object Storage
Substantial Performance Improvement
Performance comparable to or greater than file systems
Compression
De-duplication
Encryption
Compatible with existing Oracle BLOB/CLOB
syntax
Compression and De-Duplication require
Advanced Compression Option
Thursday, September 8, 11
Oracle SecureFiles
Compression and De-Duplication
CREATE TABLE images (
image_id NUMBER,
image BLOB)
LOB(image)
STORE AS SECUREFILE (
TABLESPACE lob_tbs COMPRESS);
Thursday, September 8, 11
Oracle Partitioning
Improve performance and manageability transparently
Better query performance using partition
elimination
Partitioned data is easier to backup and recover
Use lower cost storage for less used partitions
Large Table
Partition by
Column
Composite
Partition
Thursday, September 8, 11
Oracle Partitioning
Combining compression and partitioning
Archival Compression DW Compression OLTP Compression
Maximize performance of active data
Increase compression and use lower cost
storage for less used partitions
Thursday, September 8, 11
Flashback
Flashback, Flashback Data Archive

Flashback: Query, Table, Tablespace, Transaction, Database

Flashback available based on redo retention

Flashback Data Archive provides infinite flashback and


requires the Total Recall database option
Time
Current Data
Undo
Thursday, September 8, 11
Flashback Example
Flashback query to a point in time
select *
from employees
as of timestamp
to_timestamp('2003-04-04 09:30:00',
'yyyy-mm-dd hh:mi:ss')
where name = :b1;
Thursday, September 8, 11
Database Development Features
Database Caching Technologies
Data Management
Application Development
Tools and Frameworks
Agenda
Thursday, September 8, 11
Oracle Supports All Popular Application
Development Frameworks
Thursday, September 8, 11
Oracle SQL Developer
No Cost IDE for the Oracle Database
Lightweight, graphical user interface
Enhances database development productivity
Browsing, creating, editing, debugging and
reporting
Integrated migration capabilities
Easy installation
Download and unzip
Uses thin JDBC driver => No Oracle Home
required
Free, Extensible and fully supported
1.5 million users
Supported feature of the Oracle database
Thursday, September 8, 11
Oracle SQL Developer
No cost IDE for the Oracle Database
Database Data Modeling
PL/SQL Unit Testing Database Migrations
From third-party databases
Database development
Thursday, September 8, 11
Java
Worlds Most Popular Programming Platform
Thursday, September 8, 11
Oracle and Java
Oracle is leading the Java community
Oracle users Java everywhere
Applications
Middleware
Database
Development Tools
Thursday, September 8, 11
Java Development Tools
Three Tools for the Java Development Community
Eclipse
Certified plugins on top of core Eclipse
Focus on Java coding
EJB/JPA, Spring, WebServices, WebLogic
NetBeans
The IDE for Java FX Developers
Supports Java EE 6.0, Java FX and Java ME
Community Focused
Oracle Jdeveloper 11gR1
IDE for Fusion Middleware Developers
Development Platform for Oracle ADF
Visual, Declarative, WYSIWYG
Thursday, September 8, 11
Efficient Java Persistence with Oracle JDBC 11g
JDBC 4.0, IPV6
Built-in Advanced Security in JDBC-Thin
Support for Query Change Notification
Result Cache (JDBC-OCI): 5-8 x Faster
Native AQ interface: 40-300% Faster
LOB PreFetch, Zero Copy SecureFiles LOB
Scalable and Reliable Java Persistence with
Universal Connection Pool
Fast Connection Failover (RAC, Data Guard)
Runtime Connection Load Balancing
Web Session Affinity
Transaction Affinity
JDBC and UCP
Efficient , Scalable and Reliable Java Persistence
Thursday, September 8, 11
Database-Centric Web Application Development Tool
No cost option of the Oracle Database
Distributed with database 10gR2, 11gR1, 11gR2 and XE
Latest Version available on OTN
Oracle Application Express (APEX)
Thursday, September 8, 11
Oracle Application Express (APEX)
Runs within Database Self Service Provisioning
Leverages SQL Skills Rapid Browser Based Development
Point your browser and start developing Build reports and charts using SQL
Out-of-the-box elastic private cloud service Simple to manage, highly scalable
Thursday, September 8, 11
Full Support for .NET and Visual
Studio
Same APIs, Same Tools
Easy to Learn, Easy to Migrate
Freely Available
Full Support for Oracle Database
Run All Editions of the Oracle Database
Real Application Clusters (RAC)
Data Guard, Data types,
Run Oracle Database Everywhere
Linux
Unix (Sun, IBM, HP)
Microsoft Windows
Oracle Support for .NET
Thursday, September 8, 11
Oracle Support for .NET
Thursday, September 8, 11
Open Source Language Drivers for Oracle

Building Agile Web Applications with


Oracle Database

Connection Scalability with Database


Resident Connection Pool (DRCP)

PHP OCI8
Available on php.net, PECL, Zend Server, Unbreakable
Linux Network and http://oss.oracle.com/projects/php

Ruby OCI8
http://ruby-oci8.rubyforge.org/en/

Python Cx-Oracle
http://cx-oracle.sourceforge.net

Perl DBD::Oracle
http://search.cpan.org/~pythian/DBD-Oracle-1.23/
Oracle.pm

Thursday, September 8, 11
Oracle Database 11g
Exploiting the full potential of the Oracle database
Thursday, September 8, 11
Thursday, September 8, 11

You might also like