Professional Documents
Culture Documents
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 Oracle's products remains at the sole discretion of Oracle.
In-Memory
Performance & Scalability Security & Compliance
Agenda
Temporal Databases SQL PL/SQL and Edition Based Redefinition SQL Developer SQL Translator Application Express Java Application Continuity XML
Temporal Validity
Temporal Applications
Modeling time is hard
History Kept
o pl
ye
es
Em
complicated Querying and reporting history data is hard, as schemas evolve The result is history is only tracked for a few key tables
Often raw fact data is tracked but context is not
De
tm ar
ts en
No History
territories
8 Copyright 2013, Oracle and/or its affiliates. All rights reserved.
Tracks transactional changes to a table over its lifetime Typically used for compliance and auditing Enables the users to see the data as it was at a point in time in the past
Enables user to model & query data for real world validity Typically used for insurance policies, financial markets, trade data & future changes Users can model concepts such as the Life time of an insurance policy
All table and space management DDL is supported on Flashback Archive enabled tables
Now compatible with Oracle E-Business Suite
10
Valid Time Data read from base table (filtered using SQL)
11
custzip VARCHAR2(20),
start_time TIMESTAMP, end_time TIMESTAMP, PERIOD FOR cust_valid_time (start_time, end_time));
12
Acme Inc
Suite 17
Anytown
CA
99999
01-JAN12
INSERT INTO CUSTOMERS VALUES(1,'Acme Inc.','123 Any Street','Suite 17','Anytown','AS','99999', TO_TIMESTAMP('01JAN-12) ,NULL);
13
Acme Inc
Suite 17
Anytown
CA
99999
01-JAN12
31-May-13
14
1 1
Suite 17
Anytown Anytown
CA CA
99999 99998
01-JAN-12 01-JUN-13
31-May-13
INSERT INTO CUSTOMERS VALUES(1,'Acme Inc.',456 Another Street', NULL,'Anytown','AS','99998', TO_TIMESTAMP('01-JUN-13) ,NULL);
15
1 1
Suite 17
Anytown Anytown
CA CA
99999 99998
01-JAN-12 01-JUN-13
31-May-13
SELECT custaddr1, custaddr2, custcity, custstate, custzip FROM customers WHERE custid=1;
16
1 1
Suite 17
Anytown Anytown
CA CA
99999 99998
01-JAN-12 01-JUN-13
31-May-13
EXEC DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME('CURRENT'); SELECT custid, start_time, end_time FROM customers WHERE custid=1;
17
1 1
Suite 17
Anytown Anytown
CA CA
99999 99998
01-JAN-12 01-JUN-13
31-May-13
SELECT custid, start_time, end_time FROM customers AS OF PERIOD FOR cust_valid_time TO_TIMESTAMP('03-JUN-13');
18
19
Invisible Columns
Improved Left Outer Join Syntax
20
Pattern Matching
Simplified Analysis of Big Data
Scalable discovery of business event
sequences
Select * from Employees MATCH_RECOGNIZE ( PATTERN(X+ Z{2}) )
Ascending Order
behaviour
Financial transactions: fraud detection, double
21
Stock price
days
22
Stock price
days
23
Stock price
days
SELECT first_x, last_z FROM ticker MATCH_RECOGNIZE ( PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x LAST(z.time) AS last_z ONE ROW PER MATCH PATTERN (X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price)) Y AS (price > PREV(price)) W AS (price < PREV(price)) Z AS (price > PREV(price))
24
First_x 1 13
Last_z 9 19
13
SELECT first_x, last_z FROM ticker MATCH_RECOGNIZE ( PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x, LAST(z.time) AS last_z ONE ROW PER MATCH PATTERN (X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price)), Y AS (price > PREV(price)), W AS (price < PREV(price)), Z AS (price > PREV(price)))
19
days
25
Pattern Matching
if (!q.isEmpty() && (prev.isEmpty() || (eq(q, prev) && gt(q, next)))) { state = "S"; return state; } if (gt(q, prev) && gt(q, next)) { state = "T"; return state; } if (lt(q, prev) && lt(q, next)) { state = "B"; return state; } if (!q.isEmpty() && (next.isEmpty() || (gt(q, prev) && eq(q, next)))) { state = "E"; return state; } if (q.isEmpty() || eq(q, prev)) { state = "F"; return state; } return state; } private boolean eq(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return a.equals(b); } private boolean gt(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return Double.parseDouble(a) > Double.parseDouble(b); } private boolean lt(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return Double.parseDouble(a) < Double.parseDouble(b); } public String getState() { return this.state; } } BagFactory bagFactory = BagFactory.getInstance(); @Override public Tuple exec(Tuple input) throws IOException {
long c = 0; String line = ""; String pbkey = ""; V0Line nextLine; V0Line thisLine; V0Line processLine; V0Line evalLine = null; V0Line prevLine; boolean noMoreValues = false; String matchList = ""; ArrayList<V0Line> lineFifo = new ArrayList<V0Line>(); boolean finished = false; DataBag output = bagFactory.newDefaultBag(); if (input == null) { return null; Copyright 2013, Oracle } if (input.size() == 0) { return null;
12 Lines of SQL
26
27
PL/SQL in SQL
Example
PL/SQL Function embedded in with clause
WITH FUNCTION get_domain(url VARCHAR2) RETURN VARCHAR2 IS pos BINARY_INTEGER; len BINARY_INTEGER; BEGIN pos := INSTR(url, 'www.'); len := INSTR(SUBSTR(url, pos + 4), '.') - 1; RETURN SUBSTR(url, pos + 4, len); END; SELECT DISTINCT get_domain(catalog_url) FROM orders;
28
IDENTITY
Example
Create a table where the id column is always populated by Oracle
Create a table where the id column is populated by Oracle when not provided
CREATE TABLE t2 (id NUMBER GENERATED BY DEFAULT AS IDENTITY (START WITH 100 INCREMENT BY 10), first_name varchar2(30) );
29
32K VARCHAR2/NVARCHAR2
Example
Enable 32k support in the Oracle Database 12c
CREATE TABLE Applicants (id NUMBER GENERATED AS IDENTITY, first_name varchar2(30), last_name varchar2(30), application date, CV varchar2(32767) );
30
Row Limit
Example
Select only the first 5 rows
SELECT employee_id, last_name FROM employees ORDER BY employee_id FETCH FIRST 5 ROWS ONLY;
Select the first 5% of rows and those whose salary ties with the lowest of the 5%
ORDER BY salary
FETCH FIRST 5 PERCENT ROWS WITH TIES;
31
32
securely hide the implementation details the names and structures of the tables, and the SQL statements that manipulate them from the client.
Yet a very large number of customers refuse to do this Excuses:
Patching database PL/SQL causes unacceptable downtime
Cant pass index-by table of records to/from the client Cant provision a private sandbox database for each developer
33
by-PL/SQL-tables of records
The multitenant architecture
PDBs can be rapidly and thinly created, and then dropped, using SQL
Easy to write an app to let a developer self-provision his sandbox database
34
35
36
37
After
38
39
40
41
42
Schema Compare
View differences between schemas Generate diff scripts to source control
43
44
High Availability
Reliable Outcome of In-Flight Work (at Most Once Commit) with Transaction Guard
Masking Database Outage and Resubmission of In-Flight Work with Application
Continuity
Load-Balancing and Failover across Geographies (Worldwide) with Global Data
Service
46 Copyright 2013, Oracle and/or its affiliates. All rights reserved.
47
<?XML?>
48 Copyright 2013, Oracle and/or its affiliates. All rights reserved.
JDBC
.NET OCI SOAP HTTP FTP WebDav
Files
Folders
ACLS Versioning
XQuery
SQL/XML XSLT
Metadata
Events
Document or Message
DOM
49
49
50
In Database Archiving
51
In-Database Archiving
modified In-DB Archiving provides the ability to archive infrequently used data within the database
Archived Data is invisible by default
52
In-Database Archiving
Enable In-Database Archiving on the Sales Table ALTER TABLE SALES ROW ARCHIVAL; Archive the rows with a non zero value (null, -1, 1 etc.) UPDATE SALES set ORA_ARCHIVE_STATE = 1; Modify your session to see all rows including archived versions ALTER SESSION SET ROW ARCHIVAL VISIBILITY = ALL;
53
range of languages and approaches Oracle Database 12c continues to improve on the developers experience by providing improved tools and APIs
54
The preceding 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 Oracle's products remains at the sole discretion of Oracle.
55
56
57