SlideShare a Scribd company logo
1 of 263
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
marketing stuff
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11
@connor_mc_d
connor-mcdonald.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12https://www.youtube.com/ConnorMcDonaldOracle
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
13
asktom.oracle.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
13
asktom.oracle.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
help you be more successful with Oracle
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Schema-less,
Schema-now,
Schema-later
Connor McDonald
Oracle Developer Advocate
August, 2017
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Developers
versus
DBAs
Connor McDonald
Oracle Developer Advocate
August, 2017
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
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.
Safe Harbor Statement
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
21Public
DBA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
21Public
DBA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
21Public
DBA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
21Public
DBA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
21Public
DBA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
22Public
Dev
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
22Public
Dev
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
22Public
Dev
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
22Public
Dev
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
22Public
Dev
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
23Public
DBA caution
risk averse
data longevity
security
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
23Public
DBA caution
risk averse
data longevity
security
"the stuff that slows us down"
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
24Public
Dev fast
agile
productive
delivery
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
24Public
Dev fast
agile
productive
delivery
"we're gonna get hacked"
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
both are right
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
both are needed
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
a better world
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
29Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
29Public
As part of the newcampaign we
need to recordall sales
transactions
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
29Public
As part of the newcampaign we
need to recordall sales
transactions
OK, let's seeyour requirements
documents and we'll design the
data model
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
29Public
As part of the newcampaign we
need to recordall sales
transactions
OK, let's seeyour requirements
documents and we'll design the
data model
Wedon't know any requirements,
but weneedto deploy this week
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
29Public
As part of the newcampaign we
need to recordall sales
transactions
OK, let's seeyour requirements
documents and we'll design the
data model
Wedon't know any requirements,
but weneedto deploy this week
Wecan't start anything without a
data model
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
30Public
I've got these ?
Build
screen
Store
data
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
30Public
I've got these ?
Build
screen
Store
data
That's nota data model buddy
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
30Public
I've got these ?
Build
screen
Store
data
That's nota data model buddy
But we're agile !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
30Public
I've got these ?
Build
screen
Store
data
That's nota data model buddy
But we're agile !
Not any more…
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
the next day
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
32Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
32Public
We've commenced work on the sales recording application.
We are using MongoDB as a document store
Status report
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
32Public
We've commenced work on the sales recording application.
We are using MongoDB as a document store
Status report
W….T…..H !!!!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
33Public
NOWAY !!!!
Howdo we back it up?
Howdo we secure it ?
Howdo we monitor it ?
What OSdoes it run on ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
3 months later ...
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
2 likely outcomes
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
36Public
Wefinished development 3 months ago ...
but westill haven't deployed to production
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
36Public
Wefinished development 3 months ago ...
but westill haven't deployed to production
DBA's suck
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
37Public
LMAO !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
37Public
LMAO !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
37Public
LMAO !
1
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
37Public
LMAO !
Developers suck !
1
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
both are right
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
quick turnaround .... is reality
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
unknown data model .... is reality
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
recovering your data .... is reality
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
securing your data .... is reality
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
a better way
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
Weneed schema-less data recording,
can you setup MongoDB for us ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
Weneed schema-less data recording,
can you setup MongoDB for us ?
A new tech means lots of lead time -
security, backup,etc. Do you just need
a documentstore ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
Weneed schema-less data recording,
can you setup MongoDB for us ?
A new tech means lots of lead time -
security, backup,etc. Do you just need
a documentstore ?
Yeah, the data model is unknown
and likely to evolve on the fly
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
Weneed schema-less data recording,
can you setup MongoDB for us ?
A new tech means lots of lead time -
security, backup,etc. Do you just need
a documentstore ?
Yeah, the data model is unknown
and likely to evolve on the fly
Why don’t you just useOracle
for that ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
45Public
What is hesmoking ….and where can I get
some?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 46
12c ... as a document store
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 47
SQL> CREATE TABLE orders
2 (order_details BLOB );
Table created.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 48
SQL> CREATE TABLE orders
2 (order_details BLOB,
3 CONSTRAINT is_json CHECK
4 (order_details IS JSON)
5 );
Table created.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 49
BLOB, CLOB or VARCHAR2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
encryption
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
encryption
compression
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
encryption
compressionRAC
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
encryption
compressionRAC
parallel
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
all the normal goodies apply
partitioning
indexing
encryption
compressionRAC
parallel
replication
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
51Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
51Public
Sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50
a quick word on our demos
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
53Public
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.time.ZonedDateTime;
import oracle.jdbc.internal.OraclePreparedStatement;
public class LoadOrderJSON {
public static void main(String[] args) {
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@//localhost:1521/db122");
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
54Public
try {
OraclePreparedStatement pstmt = (OraclePreparedStatement)con.prepareStatement(
"insert into orders values ( utl_raw.cast_to_raw(:order_details) )"
);
pstmt.setString(1, "{"date": "2016-05-03 10:40:36","loyaltyCardNo": 1230,
"location": { "city": "Dallas", "state": "TX" },
"salesAmount": 7.55, "order": [ { "item": "Espresso",
"size": "small", "sales_amount": 2.10,
"coffee_used_gram": 10 }, { "item": "Espresso",
"size": "large", "salesAmount": 2.50, "coffeeUsedGram": 25 }, {
"item": "Americano", "size": "medium",
"salesAmount": 2.95, "coffeeUsedGram": 15 }]}");
boolean done;
done = pstmt.execute();
System.out.print("Done");
} catch (SQLException e) {
e.printStackTrace();
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
55Public
C:temp>javac LoadOrderJSON.java
C:temp>java LoadOrderJSON
Done
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
56Public
SQL> select * from orders;
ORDER_DETAILS
------------------------------------------------------------
7B2264617465223A2022323031362D30352D30332031303A34303A333622
2C226C6F79616C7479436172644E6F223A20313233302C2020226C6F6361
74696F6E223A207B20202020202263697479223A202244616C6C6173222C
2020202020227374617465223A202254582220207D2C20202273616C6573
416D6F756E74223A20372E35352C2020226F72646572223A205B20207B20
202020226974656D223A2022457370726573736F222C202020202273697A
65223A2022736D616C6C222C202020202273616C65735F616D6F756E7422
3A20322E31302C2020202022636F666665655F757365645F6772616D223A
20313020207D2C20207B20202020226974656D223A202245737072657373
6F222C202020202273697A65223A20226C61726765222C20202020227361
6C6573416D6F756E74223A20322E35302C2020202022636F666665655573
65644772616D223A20323520207D2C20207B20202020226974656D223A20
22416D65726963616E6F222C202020202273697A65223A20226D65646975
6D222C202020202273616C6573416D6F756E74223A20322E39352C202020
2022636F66666565557365644772616D223A20313520207D5D7D
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
57Public
OK, Ican store my data just like a
document store
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
57Public
OK, Ican store my data just like a
document store
Well, it's not"just". We've now got it
secure,backedup, like ourexisting
systems
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
57Public
OK, Ican store my data just like a
document store
Well, it's not"just". We've now got it
secure,backedup, like ourexisting
systems
Thanks… you saved us from having to
learn MongoDB API's. We're a week
ahead of schedule
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
57Public
OK, Ican store my data just like a
document store
Well, it's not"just". We've now got it
secure,backedup, like ourexisting
systems
Thanks… you saved us from having to
learn MongoDB API's. We're a week
ahead of scheduleBut I have to ask, seriously, why not
model the data ? Whyuse a
document store at all ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
58Public
Well...here's my JSON
var myjson = '{"firstname":"Joe",
"surname":"Cooldude",
"jobs":["Developer",
"Gettin Stuff Done"]
}';
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
58Public
Well...here's my JSON
And here's the codeto make it an
object
Done !
var myjson = '{"firstname":"Joe",
"surname":"Cooldude",
"jobs":["Developer",
"Gettin Stuff Done"]
}';
var contact = JSON.parse(jsontext);
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
58Public
Well...here's my JSON
And here's the codeto make it an
object
Done !
var myjson = '{"firstname":"Joe",
"surname":"Cooldude",
"jobs":["Developer",
"Gettin Stuff Done"]
}';
var contact = JSON.parse(jsontext);
OK, Imust admit
that's pretty cool
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
the next day
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
60Public
Our initial gain looks like it might be chewed up.
To load data into Oracle, we need the Oracle client installed and
configured. We've never done that, and to fetch the data we'll need
to skill up on JDBC and how it handles these "BLOB" things.
Estimate impact is around 7 days
Status report
DBA <dba@mycompany.com>
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
60Public
Our initial gain looks like it might be chewed up.
To load data into Oracle, we need the Oracle client installed and
configured. We've never done that, and to fetch the data we'll need
to skill up on JDBC and how it handles these "BLOB" things.
Estimate impact is around 7 days
Status report
DBA <dba@mycompany.com>
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
61Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
61Public
I saw the status report. What's the
drama ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
61Public
I saw the status report. What's the
drama ?
Wethought a document model
would make ourcodeeasier.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
61Public
I saw the status report. What's the
drama ?
Wethought a document model
would make ourcodeeasier.
But there's bucket loads of JDBC
codeto write. That's all newto us
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
61Public
I saw the status report. What's the
drama ?
Wethought a document model
would make ourcodeeasier.
But there's bucket loads of JDBC
codeto write. That's all newto us
That's databases for you. Lots of
coding needed
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
62Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Can't wejust do REST calls like
non-database apps ?
62Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Can't wejust do REST calls like
non-database apps ?
62Public
Er...no.
Databases don’t work like that
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Can't wejust do REST calls like
non-database apps ?
62Public
Er...no.
Databases don’t work like that
becauseI don’t knowwith
REST is
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Can't wejust do REST calls like
non-database apps ?
62Public
Er...no.
Databases don’t work like that
Let me explain
becauseI don’t knowwith
REST is
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 63
REST = Representational State Transfer
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 64
client-server request/response
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 64
client-server request/response
stateless
simple (get, put, …)consistent (URI)
JSON
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 65
http://myserver.com/orders/100234
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 65
http://myserver.com/orders/100234
"GET me the orders for customer 100234"
"HERE is an order for customer 100234"
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
66Public
OK, I've read some stuff. I think can
allow accessvia REST
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
66Public
OK, I've read some stuff. I think can
allow accessvia REST
Man...we'reback towaiting on a
DBA again. This will take months
:-(
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
66Public
OK, I've read some stuff. I think can
allow accessvia REST
Man...we'reback towaiting on a
DBA again. This will take months
:-(
OK...how long please ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
66Public
OK, I've read some stuff. I think can
allow accessvia REST
Man...we'reback towaiting on a
DBA again. This will take months
:-(
OK...how long please ?
Dude ...
buy mea six packand I mightjust
have one ready for you in 30 mins
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
66Public
OK, I've read some stuff. I think can
allow accessvia REST
Man...we'reback towaiting on a
DBA again. This will take months
:-(
OK...how long please ?
Dude ...
buy mea six packand I mightjust
have one ready for you in 30 mins
wow...aDBA that drinks
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
67Public
Sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 68
ORDS (Oracle Rest Data Services)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 69
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 69
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
70Public
SQL> BEGIN
2 ORDS.ENABLE_SCHEMA(p_enabled => TRUE,
3 p_schema => 'SCOTT',
4 p_url_mapping_type => 'BASE_PATH',
5 p_url_mapping_pattern => 'scott',
6 p_auto_rest_auth => FALSE);
7 commit;
8 END;
9 /
PL/SQL procedure successfully completed.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
71Public
SQL> BEGIN
2 ORDS.ENABLE_OBJECT(p_enabled => TRUE,
3 p_schema => 'SCOTT',
4 p_object => 'ORDERS',
5 p_object_type => 'VIEW',
6 p_object_alias => 'rest_orders',
7 p_auto_rest_auth => FALSE);
8
9 commit;
10 END;
11 /
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
72Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
73Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
74Public
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
public class LoadOrderREST {
public static void main(String[] args) throws ClientProtocolException, IOException {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://localhost:8080/ords/scott/rest_orders/");
StringEntity input = new StringEntity("{ "order_details" : "[[ my json ]]" }");
input.setContentType("application/json;charset=UTF-8");
post.setEntity(input);
HttpResponse response = client.execute(post);
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line = "";
while ((line = rd.readLine()) != null) {
System.out.println(line);
}
}
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
75Public
cool, all I need now is
a simple POST call
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 76
anywhere …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Configuring REST on Oracle Cloud
77
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Configuring REST on Oracle Cloud
78
Give the service a
name and specify
the prefix
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Configuring REST on Oracle Cloud
79
Specify the rest of
the URL
demo/geraldorders
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Configuring REST on Oracle Cloud
80
Specify the type of
service
Specify the actual
command to be
used by the
service
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
81Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
81Public
Thanks, that means wehavea document
store, with easy REST access,and no
database codeto write !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
81Public
Thanks, that means wehavea document
store, with easy REST access,and no
database codeto write !
Yeah…isn't that cool ...(sigh)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
81Public
Thanks, that means wehavea document
store, with easy REST access,and no
database codeto write !
Yeah…isn't that cool ...(sigh)
Man...what is the world coming to :-(
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
a few days later
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
83Public
Our initial gain looks like it might be chewed up.
We need to build a parser for our JSON documents to extract the
fields from the document.
We're also seeing network issues in some of our testing
Status report
DBA <dba@mycompany.com>
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
83Public
Our initial gain looks like it might be chewed up.
We need to build a parser for our JSON documents to extract the
fields from the document.
We're also seeing network issues in some of our testing
Status report
DBA <dba@mycompany.com>
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
84Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
84Public
I saw the status report. What's the
drama ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
84Public
I saw the status report. What's the
drama ?
JSONis great for objects. But we
need to produce reports. So we're
building a parser
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
84Public
I saw the status report. What's the
drama ?
JSONis great for objects. But we
need to produce reports. So we're
building a parser
But it's slow - I'm dragging whole
blobs across the network !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
84Public
I saw the status report. What's the
drama ?
JSONis great for objects. But we
need to produce reports. So we're
building a parser
But it's slow - I'm dragging whole
blobs across the network !
Thedatabase can do that for you, just
with simple SQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
85Public
sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 86
12c ... native JSON SQL support
dot notation
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 87
SQL> desc ORDERS
NAME TYPE
------------------ -----------
ORDER_DETAILS BLOB
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 87
SQL> desc ORDERS
NAME TYPE
------------------ -----------
ORDER_DETAILS BLOB
{"date": "2016-05-03 10:40:36",
"loyaltyCardNo": 1230,
"location": {
"city": "Dallas",
"state": "TX”},
"salesAmount": 7.55,
"order": [ {
"item": "Espresso”, …. }
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 88
SQL> SELECT o.order_details.location.city
2 FROM orders o;
Location
--------------------
Dallas
Los Angeles
New York
San Francisco
Washington
{"date": "2016-05-03 10:40:36",
"loyaltyCardNo": 1230,
"location": {
"city": "Dallas",
"state": "TX”},
"salesAmount": 7.55,
"order": [ {
"item": "Espresso”, ... }
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
89Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
89Public
Thanks for that.
Nowwecan bring just what we
need across the network
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
89Public
Thanks for that.
Nowwecan bring just what we
need across the network
And don't forget, we can even
compress the data across the network
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
89Public
Thanks for that.
Nowwecan bring just what we
need across the network
And don't forget, we can even
compress the data across the network
Cool. We can ditch the parser and
just use SQL queries.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
90Public
We are done !
Status report
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 91
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
a few days later
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
93Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
93Public
All going well ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
93Public
All going well ?
Yes…big success. Now we're
integrating the data with the CRM
system.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
93Public
All going well ?
Yes…big success. Now we're
integrating the data with the CRM
system.
We'vestarted a project to match
the sales data to the customers
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
93Public
All going well ?
Yes…big success. Now we're
integrating the data with the CRM
system.
We'vestarted a project to match
the sales data to the customers
A project?
Isn't the CRM system running in
Oracle..on the same box ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
94Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
94Public
Yeah, butthat’s a relational system.
Wejust have documents as blobs.
We'rewriting java classes to match
it all up
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
94Public
Yeah, butthat’s a relational system.
Wejust have documents as blobs.
We'rewriting java classes to match
it all up Wecan integrate at the database
level. No needto doit in the
application
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
94Public
Yeah, butthat’s a relational system.
Wejust have documents as blobs.
We'rewriting java classes to match
it all up Wecan integrate at the database
level. No needto doit in the
application
But how? You don’t know what is
in ourblobs ? Hell, even wedon’t
know what is in ourblobs
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
94Public
Yeah, butthat’s a relational system.
Wejust have documents as blobs.
We'rewriting java classes to match
it all up Wecan integrate at the database
level. No needto doit in the
application
But how? You don’t know what is
in ourblobs ? Hell, even wedon’t
know what is in ourblobs
That's ok. Thedatabase can do
all that for us
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
95Public
sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 96
12c ... JSON data guide
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 97
metadata discovery
attributes
optional deep analysis
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 98
automatic generation
virtual columns
relational views
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 99
SQL> SELECT JSON_DATAGUIDE(o.order_details) FROM orders o;
JSON_DATAGUIDE(O.ORDER_DETAILS)
----------------------------------------------------------------------
[ {"o:path": "$.date", "type": "string", "o:length": 32 },
{"o:path": "$.order", "type": "array", "o:length": 256 },
{"o:path": "$.location", "type": "object", "o:length": 32},
{"o:path": "$.location.city", "type": "string", "o:length": 8},
...
...
{ "o:path": "$.salesAmount", "type": "number", "o:length": 4 },
{ "o:path": "$.loyaltyCardNo","type": "number", "o:length": 8}]
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 100
then ... standard SQL queries
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 101
SQL> select
2 c.c_name,
3 o.order_details.location.city,
4 sum(to_number(o.order_details.salesamount)) total
5 from
6 customers c,
7 orders o
8 where
9 c.c_custid = o.order_details.loyaltycardno
10 group by
11 c.c_name,
12 o.order_details.location.city
13 order by total desc
14 fetch first 10 rows only;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
102Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
102Public
Whoa there cowboy !
I knowa little bit of SQL, butthat’s way
outside my league
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
102Public
Whoa there cowboy !
I knowa little bit of SQL, butthat’s way
outside my league Don’t panic !
Wecan abstract this away in a
view. Yourqueries will stay nice
and simple
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
103Public
sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 104
SQL> create or replace view TOP_TEN_CUSTOMERS as
2 select c.c_name,
3 o.order_details.location.city,
4 sum(to_number(o.order_details.salesamount)) total
5 from customers c,
6 orders o
7 where c.c_custid = o.order_details.loyaltycardno
8 group by c.c_name,
9 o.order_details.location.city
10 order by total desc
11 fetch first 10 rows only;
View created.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
105Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
105Public
Thanks for that. ButI don’t think
that will work. By next week, we'll
have 2 million records.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
105Public
Thanks for that. ButI don’t think
that will work. By next week, we'll
have 2 million records. And ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
105Public
Thanks for that. ButI don’t think
that will work. By next week, we'll
have 2 million records. And ?
There's only onedatabase. We're
going to deploy parallel app servers to
handlethe volume. We'll bring the
data down locally
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
105Public
Thanks for that. ButI don’t think
that will work. By next week, we'll
have 2 million records. And ?
There's only onedatabase. We're
going to deploy parallel app servers to
handlethe volume. We'll bring the
data down locally
Have you forgotten the network dramas
?
Howabout wehavethe answeralready
prepared ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
106Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
106Public
Theanswer already prepared?
How?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
106Public
Theanswer already prepared?
How? Wecan store summarised data
based on the detail
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
106Public
Theanswer already prepared?
How? Wecan store summarised data
based on the detail
Yeah..no thanks.
Then I'd have to changeall my codeto
use that newtable
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
106Public
Theanswer already prepared?
How? Wecan store summarised data
based on the detail
Yeah..no thanks.
Then I'd have to changeall my codeto
use that newtable
What if I said you wont havetochangea
single line of code?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
107Public
sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 108
materialized views
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 109
not just for warehouses
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 109
not just for warehouses
fast refresh on commit refresh
on query refresh
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 110
SQL> create materialized view TOP_CUSTOMERS_MV
2 enable query rewrite
3 as select c.c_name,
4 o.order_details.location.city,
5 sum(to_number(o.order_details.salesamount)) total
6 from customers c,
7 orders o
8 where c.c_custid = o.order_details.loyaltycardno
9 group by c.c_name,
10 o.order_details.location.city;
Materialized view created.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 111
SQL> select c.c_name,
2 o.order_details.location.city,
3 sum(to_number(o.order_details.salesamount)) total
4 from customers c,
5 orders o
6 where c.c_custid = o.order_details.loyaltycardno
7 group by c.c_name,
8 o.order_details.location.city
9 order by total desc
10 fetch first 10 rows only;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 111
SQL> select c.c_name,
2 o.order_details.location.city,
3 sum(to_number(o.order_details.salesamount)) total
4 from customers c,
5 orders o
6 where c.c_custid = o.order_details.loyaltycardno
7 group by c.c_name,
8 o.order_details.location.city
9 order by total desc
10 fetch first 10 rows only;
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 10 | 20550 |
|* 1 | VIEW | | 10 | 20550 |
|* 2 | WINDOW SORT PUSHED RANK | | 1 | 2029 |
| 3 | MAT_VIEW REWRITE ACCESS FULL| TOP_CUSTOMERS_MV | 1 | 2029 |
---------------------------------------------------------------------------
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 112
SQL> select c.c_name,
2 o.order_details.location.city,
3 sum(to_number(o.order_details.salesamount)) total
4 from customers c,
5 orders o
6 where c.c_custid = o.order_details.loyaltycardno
7 group by c.c_name,
8 o.order_details.location.city
9 order by total desc
10 fetch first 10 rows only;
Elapsed: 00:00:01.02
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
113Public
This is awesome!
All of ourreports arenow nearly
instantaneous
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 114
a few weeks later
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
115Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
115Public
I need another 77
materialized views
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
115Public
I need another 77
materialized views Why ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
115Public
I need another 77
materialized views Why ?
Ourapp is so well liked, that
marketing want full SQL access for
adhocreports
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
115Public
I need another 77
materialized views Why ?
Ourapp is so well liked, that
marketing want full SQL access for
adhocreportsThat probably wont work, because
adhocSQL means whatever querythey
like
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
116Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
116Public
I'm gonnaget fired
I gaveeveryone access to ourorder
history table, and promised super fast
results :-(
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
116Public
I'm gonnaget fired
I gaveeveryone access to ourorder
history table, and promised super fast
results :-( Have you considered the in-memory
columnstore?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
116Public
I'm gonnaget fired
I gaveeveryone access to ourorder
history table, and promised super fast
results :-( Have you considered the in-memory
columnstore?
Ourstuff is already in RAM.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
117Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
117Public
Yes, it's in RAM, butthat’s the buffer cache,
which is great forstoring and retrieving
rows of data
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
117Public
Yes, it's in RAM, butthat’s the buffer cache,
which is great forstoring and retrieving
rows of data
Marketing people don’t want rows. They to
scan all of the data. They need a columnar
format
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
117Public
Yes, it's in RAM, butthat’s the buffer cache,
which is great forstoring and retrieving
rows of data
Marketing people don’t want rows. They to
scan all of the data. They need a columnar
format
Wha ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
118Public
sounds like lies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 119
12c ... in-memory option
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Buffer Cache
New In-Memory
Column Store
SALES SALES
Row
Format
Column
Format
SALES
typical
row level
operations
analytic
large scale
operations
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 121
even when it's JSON
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Relational
In-Memory Colum Store
In-Memory
Virtual Columns
In-Memory
JSON Format
Relational Virtual JSON
122
{"date": "2016-05-03 10:40:36",
"loyaltyCardNo": 1230,
"location": {
"city": "Dallas",
"state": "TX”},
"salesAmount": 7.55,
"order": [ {
"item": "Espresso”, …. }
}
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 123
SQL> ALTER TABLE ORDERS_HISTORY ADD city as
2 (JSON_VALUE(order_details, '$.location.city'));
SQL> ALTER TABLE ORDERS_HISTORY ADD state as
2 (JSON_VALUE(order_details, '$.location.state'));
SQL> ALTER TABLE ORDERS_HISTORY ADD salesamount as
2 (JSON_VALUE(order_details, '$.salesAmount'));
SQL> ALTER TABLE ORDERS_HISTORY ADD loyaltycardno as
2 (JSON_VALUE(order_details, '$.loyaltyCardNo'));
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 124
SQL> ALTER TABLE customers INMEMORY;
SQL> ALTER TABLE orders_history INMEMORY;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 124
SQL> ALTER TABLE customers INMEMORY;
SQL> ALTER TABLE orders_history INMEMORY;
SQL> ALTER TABLE orders_history INMEMORY
2 (ORDER_DETAILS,CITY,STATE,LOYALTYCARDNO,SALESAMOUNT);
SQL> show parameter inmemory_virtual_columns
NAME TYPE VALUE
------------------------------------ ----------- ----------
inmemory_virtual_columns string MANUAL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 125
SQL> SELECT /*+ FULL(c) */ count(*) FROM customers c;
SQL> SELECT /*+ FULL(o) */ count(*) FROM orders_history o;
SQL> SELECT
2 segment_name,
3 populate_status,
4 bytes_not_populated
5 FROM v$im_segments;
SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED
-------------------------- ------------- -------------------
ORDERS_HISTORY STARTED 351797248
CUSTOMERS COMPLETED 0
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 125
SQL> SELECT /*+ FULL(c) */ count(*) FROM customers c;
SQL> SELECT /*+ FULL(o) */ count(*) FROM orders_history o;
SQL> SELECT
2 segment_name,
3 populate_status,
4 bytes_not_populated
5 FROM v$im_segments;
SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED
-------------------------- ------------- -------------------
ORDERS_HISTORY STARTED 351797248
CUSTOMERS COMPLETED 0
SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED
-------------------------- ------------- -------------------
ORDERS_HISTORY COMPLETED 0
CUSTOMERS COMPLETED 0
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 126
SQL> SELECT
2 c.name,
3 c.cust_id loyaltyCardNo,
4 o.city,
5 o.state,
6 SUM(salesamount) total
7 FROM customers c,
8 orders_history o
9 WHERE c.cust_id = o.loyaltycardno
10 and o.salesamount > 20
11 GROUP BY c.name,
12 c.cust_id,
13 o.city,
14 o.state
15 ORDER BY total Desc
16 FETCH FIRST 10 ROWS ONLY;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 126
SQL> SELECT
2 c.name,
3 c.cust_id loyaltyCardNo,
4 o.city,
5 o.state,
6 SUM(salesamount) total
7 FROM customers c,
8 orders_history o
9 WHERE c.cust_id = o.loyaltycardno
10 and o.salesamount > 20
11 GROUP BY c.name,
12 c.cust_id,
13 o.city,
14 o.state
15 ORDER BY total Desc
16 FETCH FIRST 10 ROWS ONLY;
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 10 | 41080 |
| 1 | SORT ORDER BY | | 10 | 41080 |
|* 2 | VIEW | | 10 | 41080 |
|* 3 | WINDOW SORT PUSHED RANK | | 167K| 69M|
| 4 | HASH GROUP BY | | 167K| 69M|
|* 5 | HASH JOIN | | 167K| 69M|
| 6 | TABLE ACCESS INMEMORY FULL| CUSTOMERS | 5000 | 65000 |
|* 7 | TABLE ACCESS INMEMORY FULL| ORDERS_HISTORY | 167K| 67M|
--------------------------------------------------------------------------
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 127
SQL> SELECT c.name,
2 c.cust_id loyaltyCardNo,
3 o.city,
4 o.state,
5 SUM(salesamount) total
6 FROM customers c,
7 orders_history o
8 WHERE c.cust_id = o.loyaltycardno
9 and o.salesamount > 20
10 GROUP BY c.name,
11 c.cust_id,
12 o.city,
13 o.state
14 ORDER BY total Desc
15 FETCH FIRST 10 ROWS ONLY;
...
Statistics
----------------------------------------------------------
0 recursive calls
3 db block gets
19 consistent gets
0 physical reads
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
128Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
128Public
That is supercool. How doI keep
the column format stuff in sync
with the real data
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
128Public
That is supercool. How doI keep
the column format stuff in sync
with the real data
That's all automatic. No additional work
for you to do.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 129
the next day :-)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
What's happened ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
What's happened ?
Marketing can now run all
these reports with ease.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
What's happened ?
Marketing can now run all
these reports with ease.
Isn't that a good thing ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
What's happened ?
Marketing can now run all
these reports with ease.
Isn't that a good thing ?
There arerunning any SQL they
want, and emailing confidential
data all over the place !!!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
130Public
Yeah...you'regonna be upset about
this
What's happened ?
Marketing can now run all
these reports with ease.
Isn't that a good thing ?
There arerunning any SQL they
want, and emailing confidential
data all over the place !!!
Oh dear...
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ? Whats the confidential data
?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ? Whats the confidential data
?
Customer ID number and
their email address
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ? Whats the confidential data
?
Customer ID number and
their email address
Howabout if that is maskedout
of all of their reports ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ? Whats the confidential data
?
Customer ID number and
their email address
Howabout if that is maskedout
of all of their reports ?Wecant do that - they use their
ownreporting tool. Wehave no
control over it
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
131Public
Can you take away all oftheir
access
while wefigure something out ? Whats the confidential data
?
Customer ID number and
their email address
Howabout if that is maskedout
of all of their reports ?Wecant do that - they use their
ownreporting tool. Wehave no
control over it
Thedatabase can automatically
do it for us !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
132Public
that has gotta belies …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 133
data redaction policies
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 134
SQL> BEGIN
2 dbms_redact.add_policy(
3 object_schema => user,
4 object_name => 'customers',
5 column_name => 'c_custid',
6 policy_name => 'redact_Loyalty_card',
7 function_type => DBMS_REDACT.FULL,
8 expression => '1=1'
9 );
10 END;
11 /
PL/SQL procedure successfully completed.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 135
SQL> BEGIN
2 dbms_redact.alter_policy(
3 object_schema => user,
4 object_name => 'customers',
5 column_name => 'c_email',
6 policy_name => 'redact_Loyalty_card',
7 function_type => DBMS_REDACT.regexp,
8 regexp_pattern => dbms_redact.re_pattern_email_address,
9 regexp_replace_string => dbms_redact.re_redact_email_name,
10 regexp_position => dbms_redact.re_beginning,
11 regexp_occurrence => dbms_redact.re_all,
12 expression => '1=1'
13 );
14 END;
15 /
PL/SQL procedure successfully completed.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 136
SQL> select c_custid, c_name, c_city, c_state, c_email
2 from customers
3 where rownum <= 5;
C_CUSTID C_NAME C_CITY C_STATE C_EMAIL
---------- ------------------------- -------------------- --------------- ----------------
0 Jose Manuel Urman New York NY xxxx@gmail.com
0 Luis Popp New York NY xxxx@yahoo.com
0 Den Raphaely New York NY xxxx@outlook.com
0 Alexander Khoo New York NY xxxx@oracle.com
0 Shelli Baida New York NY xxxx@gmail.com
5 rows selected.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 137
note: security of distribution
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
138Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
138Public
Amazing !
Can this flow through to my REST
queries as well ?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
138Public
Amazing !
Can this flow through to my REST
queries as well ? Of course!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
139Public
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
139Public
Well, instead of months of
development, wecranked this outin a
week. Thereis so much cool stuff in
the database
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
139Public
Well, instead of months of
development, wecranked this outin a
week. Thereis so much cool stuff in
the database
And thanks for including mein the
discussions. I know more about
your app now, so we can keep it
evolving and improving into the
future.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
140Public
Let us have a very cliché'dhappy end
to this story, and celebratory drink
together and become best of friends
Let us have a veryhappy end to this
story, and celebratory drink together
and becomebest of friends
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
140Public
Let us have a very cliché'dhappy end
to this story, and celebratory drink
together and become best of friends
Let us have a veryhappy end to this
story, and celebratory drink together
and becomebest of friends
CHEERS !
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
141
Summary: Relational Database Unfashionable Legacy
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Summary: Oracle Database 12c Universal Peace Maker
141
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Summary: Oracle Database 12c Universal Peace Maker
141
Flexibility
Native JSON support
REST Services
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Summary: Oracle Database 12c Universal Peace Maker
141
Flexibility
Native JSON support
REST Services
Scalability
Scale-out or Scale-up
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Summary: Oracle Database 12c Universal Peace Maker
141
Flexibility
Native JSON support
REST Services
Scalability
Scale-out or Scale-up
Real-Time Analytics
JSON in the In-Memory
Column Store
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Summary: Oracle Database 12c Universal Peace Maker
141
Flexibility
Native JSON support
REST Services
Scalability
Scale-out or Scale-up
Real-Time Analytics
JSON in the In-Memory
Column Store
Security
Data encrypted at rest
Data Redaction
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
#MakeDataGreatAgain

More Related Content

Similar to Developers vs DBA's - APACOUC webinar 2017

Oracle Cloud Café hybrid Cloud 19 mai 2016
Oracle Cloud Café hybrid Cloud 19 mai 2016Oracle Cloud Café hybrid Cloud 19 mai 2016
Oracle Cloud Café hybrid Cloud 19 mai 2016Sorathaya Sirimanotham
 
Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016Bastien Leblanc
 
The Oracle Autonomous Database
The Oracle Autonomous DatabaseThe Oracle Autonomous Database
The Oracle Autonomous DatabaseConnor McDonald
 
Theresa Rogers - Content Strategy to the Rescue!
Theresa Rogers - Content Strategy to the Rescue!Theresa Rogers - Content Strategy to the Rescue!
Theresa Rogers - Content Strategy to the Rescue!LavaConConference
 
Oracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridOracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridJohan Louwers
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereGraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereJ On The Beach
 
Oracle: Building Cloud Native Applications
Oracle: Building Cloud Native ApplicationsOracle: Building Cloud Native Applications
Oracle: Building Cloud Native ApplicationsKelly Goetsch
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...vasuballa
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationMark Swarbrick
 
Oracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager ExperienceOracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager Experiencessuserce1bac1
 
#OOW16 - Risk Management Cloud / GRC General Session
#OOW16 - Risk Management Cloud / GRC General Session#OOW16 - Risk Management Cloud / GRC General Session
#OOW16 - Risk Management Cloud / GRC General SessionDane Roberts
 
AUSOUG Analytics Update - Nov 14 2018
AUSOUG Analytics Update - Nov 14 2018AUSOUG Analytics Update - Nov 14 2018
AUSOUG Analytics Update - Nov 14 2018Jason Lowe
 
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]vasuballa
 
Oracle IaaS/PaaS - Experience Technology Night
Oracle IaaS/PaaS - Experience Technology NightOracle IaaS/PaaS - Experience Technology Night
Oracle IaaS/PaaS - Experience Technology NightLuis Albinati
 

Similar to Developers vs DBA's - APACOUC webinar 2017 (20)

Oracle Cloud Café hybrid Cloud 19 mai 2016
Oracle Cloud Café hybrid Cloud 19 mai 2016Oracle Cloud Café hybrid Cloud 19 mai 2016
Oracle Cloud Café hybrid Cloud 19 mai 2016
 
Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016
 
OEM13c_PPT.pptx
OEM13c_PPT.pptxOEM13c_PPT.pptx
OEM13c_PPT.pptx
 
The Oracle Autonomous Database
The Oracle Autonomous DatabaseThe Oracle Autonomous Database
The Oracle Autonomous Database
 
Theresa Rogers - Content Strategy to the Rescue!
Theresa Rogers - Content Strategy to the Rescue!Theresa Rogers - Content Strategy to the Rescue!
Theresa Rogers - Content Strategy to the Rescue!
 
Oracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridOracle cloud, private, public and hybrid
Oracle cloud, private, public and hybrid
 
MySQL 8
MySQL 8MySQL 8
MySQL 8
 
Enterprise manager 13c
Enterprise manager 13cEnterprise manager 13c
Enterprise manager 13c
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereGraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster Everywhere
 
Oracle: Building Cloud Native Applications
Oracle: Building Cloud Native ApplicationsOracle: Building Cloud Native Applications
Oracle: Building Cloud Native Applications
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
B4 making dev_ops_really_work
B4 making dev_ops_really_workB4 making dev_ops_really_work
B4 making dev_ops_really_work
 
Oracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager ExperienceOracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager Experience
 
#OOW16 - Risk Management Cloud / GRC General Session
#OOW16 - Risk Management Cloud / GRC General Session#OOW16 - Risk Management Cloud / GRC General Session
#OOW16 - Risk Management Cloud / GRC General Session
 
AUSOUG Analytics Update - Nov 14 2018
AUSOUG Analytics Update - Nov 14 2018AUSOUG Analytics Update - Nov 14 2018
AUSOUG Analytics Update - Nov 14 2018
 
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
OOW16 - Advanced Architectures for Oracle E-Business Suite [CON6705]
 
Oracle IaaS/PaaS - Experience Technology Night
Oracle IaaS/PaaS - Experience Technology NightOracle IaaS/PaaS - Experience Technology Night
Oracle IaaS/PaaS - Experience Technology Night
 

More from Connor McDonald

Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestConnor McDonald
 
Sangam 19 - Analytic SQL
Sangam 19 - Analytic SQLSangam 19 - Analytic SQL
Sangam 19 - Analytic SQLConnor McDonald
 
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsConnor McDonald
 
Sangam 19 - Successful Applications on Autonomous
Sangam 19 - Successful Applications on AutonomousSangam 19 - Successful Applications on Autonomous
Sangam 19 - Successful Applications on AutonomousConnor McDonald
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesConnor McDonald
 
UKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresUKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresConnor McDonald
 
APEX tour 2019 - successful development with autonomous
APEX tour 2019 - successful development with autonomousAPEX tour 2019 - successful development with autonomous
APEX tour 2019 - successful development with autonomousConnor McDonald
 
APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne Connor McDonald
 
OOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsOOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsConnor McDonald
 
OOW19 - Read consistency
OOW19 - Read consistencyOOW19 - Read consistency
OOW19 - Read consistencyConnor McDonald
 
OOW19 - Slower and less secure applications
OOW19 - Slower and less secure applicationsOOW19 - Slower and less secure applications
OOW19 - Slower and less secure applicationsConnor McDonald
 
OOW19 - Killing database sessions
OOW19 - Killing database sessionsOOW19 - Killing database sessions
OOW19 - Killing database sessionsConnor McDonald
 
OOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresOOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresConnor McDonald
 
Latin America Tour 2019 - 18c and 19c featues
Latin America Tour 2019   - 18c and 19c featuesLatin America Tour 2019   - 18c and 19c featues
Latin America Tour 2019 - 18c and 19c featuesConnor McDonald
 
Latin America tour 2019 - Flashback
Latin America tour 2019 -  FlashbackLatin America tour 2019 -  Flashback
Latin America tour 2019 - FlashbackConnor McDonald
 
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019  - 10 great sql featuresLatin America Tour 2019  - 10 great sql features
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
 
Latin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingLatin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingConnor McDonald
 
Latin America Tour 2019 - slow data and sql processing
Latin America Tour 2019  - slow data and sql processingLatin America Tour 2019  - slow data and sql processing
Latin America Tour 2019 - slow data and sql processingConnor McDonald
 

More from Connor McDonald (20)

Flashback ITOUG
Flashback ITOUGFlashback ITOUG
Flashback ITOUG
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
 
Sangam 19 - Analytic SQL
Sangam 19 - Analytic SQLSangam 19 - Analytic SQL
Sangam 19 - Analytic SQL
 
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tips
 
Sangam 19 - Successful Applications on Autonomous
Sangam 19 - Successful Applications on AutonomousSangam 19 - Successful Applications on Autonomous
Sangam 19 - Successful Applications on Autonomous
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
 
UKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresUKOUG 2019 - SQL features
UKOUG 2019 - SQL features
 
APEX tour 2019 - successful development with autonomous
APEX tour 2019 - successful development with autonomousAPEX tour 2019 - successful development with autonomous
APEX tour 2019 - successful development with autonomous
 
APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne
 
OOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsOOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAs
 
OOW19 - Read consistency
OOW19 - Read consistencyOOW19 - Read consistency
OOW19 - Read consistency
 
OOW19 - Slower and less secure applications
OOW19 - Slower and less secure applicationsOOW19 - Slower and less secure applications
OOW19 - Slower and less secure applications
 
OOW19 - Killing database sessions
OOW19 - Killing database sessionsOOW19 - Killing database sessions
OOW19 - Killing database sessions
 
OOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresOOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL features
 
Latin America Tour 2019 - 18c and 19c featues
Latin America Tour 2019   - 18c and 19c featuesLatin America Tour 2019   - 18c and 19c featues
Latin America Tour 2019 - 18c and 19c featues
 
Latin America tour 2019 - Flashback
Latin America tour 2019 -  FlashbackLatin America tour 2019 -  Flashback
Latin America tour 2019 - Flashback
 
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019  - 10 great sql featuresLatin America Tour 2019  - 10 great sql features
Latin America Tour 2019 - 10 great sql features
 
Latin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingLatin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matching
 
Latin America Tour 2019 - slow data and sql processing
Latin America Tour 2019  - slow data and sql processingLatin America Tour 2019  - slow data and sql processing
Latin America Tour 2019 - slow data and sql processing
 
ANSI vs Oracle language
ANSI vs Oracle languageANSI vs Oracle language
ANSI vs Oracle language
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Developers vs DBA's - APACOUC webinar 2017

  • 1.
  • 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | marketing stuff
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11 @connor_mc_d connor-mcdonald.com
  • 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12https://www.youtube.com/ConnorMcDonaldOracle
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13 asktom.oracle.com
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13 asktom.oracle.com
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | help you be more successful with Oracle
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Schema-less, Schema-now, Schema-later Connor McDonald Oracle Developer Advocate August, 2017
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Developers versus DBAs Connor McDonald Oracle Developer Advocate August, 2017
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 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. Safe Harbor Statement
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21Public DBA
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21Public DBA
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21Public DBA
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21Public DBA
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21Public DBA
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22Public Dev
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22Public Dev
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22Public Dev
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22Public Dev
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22Public Dev
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 23Public DBA caution risk averse data longevity security
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 23Public DBA caution risk averse data longevity security "the stuff that slows us down"
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24Public Dev fast agile productive delivery
  • 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24Public Dev fast agile productive delivery "we're gonna get hacked"
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | both are right
  • 30. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | both are needed
  • 31. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 32. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 33. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | a better world
  • 34. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29Public
  • 35. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29Public As part of the newcampaign we need to recordall sales transactions
  • 36. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29Public As part of the newcampaign we need to recordall sales transactions OK, let's seeyour requirements documents and we'll design the data model
  • 37. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29Public As part of the newcampaign we need to recordall sales transactions OK, let's seeyour requirements documents and we'll design the data model Wedon't know any requirements, but weneedto deploy this week
  • 38. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29Public As part of the newcampaign we need to recordall sales transactions OK, let's seeyour requirements documents and we'll design the data model Wedon't know any requirements, but weneedto deploy this week Wecan't start anything without a data model
  • 39. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30Public I've got these ? Build screen Store data
  • 40. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30Public I've got these ? Build screen Store data That's nota data model buddy
  • 41. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30Public I've got these ? Build screen Store data That's nota data model buddy But we're agile !
  • 42. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30Public I've got these ? Build screen Store data That's nota data model buddy But we're agile ! Not any more…
  • 43. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | the next day
  • 44. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 32Public
  • 45. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 32Public We've commenced work on the sales recording application. We are using MongoDB as a document store Status report
  • 46. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 32Public We've commenced work on the sales recording application. We are using MongoDB as a document store Status report W….T…..H !!!!
  • 47. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 33Public NOWAY !!!! Howdo we back it up? Howdo we secure it ? Howdo we monitor it ? What OSdoes it run on ?
  • 48. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3 months later ...
  • 49. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 2 likely outcomes
  • 50. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36Public Wefinished development 3 months ago ... but westill haven't deployed to production
  • 51. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36Public Wefinished development 3 months ago ... but westill haven't deployed to production DBA's suck
  • 52. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 37Public LMAO !
  • 53. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 37Public LMAO !
  • 54. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 37Public LMAO ! 1
  • 55. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 37Public LMAO ! Developers suck ! 1
  • 56. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | both are right
  • 57. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | quick turnaround .... is reality
  • 58. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | unknown data model .... is reality
  • 59. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | recovering your data .... is reality
  • 60. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | securing your data .... is reality
  • 61. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | a better way
  • 62. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 63. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public
  • 64. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public Weneed schema-less data recording, can you setup MongoDB for us ?
  • 65. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public Weneed schema-less data recording, can you setup MongoDB for us ? A new tech means lots of lead time - security, backup,etc. Do you just need a documentstore ?
  • 66. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public Weneed schema-less data recording, can you setup MongoDB for us ? A new tech means lots of lead time - security, backup,etc. Do you just need a documentstore ? Yeah, the data model is unknown and likely to evolve on the fly
  • 67. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public Weneed schema-less data recording, can you setup MongoDB for us ? A new tech means lots of lead time - security, backup,etc. Do you just need a documentstore ? Yeah, the data model is unknown and likely to evolve on the fly Why don’t you just useOracle for that ?
  • 68. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 45Public What is hesmoking ….and where can I get some?
  • 69. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 46 12c ... as a document store
  • 70. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 47 SQL> CREATE TABLE orders 2 (order_details BLOB ); Table created.
  • 71. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 48 SQL> CREATE TABLE orders 2 (order_details BLOB, 3 CONSTRAINT is_json CHECK 4 (order_details IS JSON) 5 ); Table created.
  • 72. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 49 BLOB, CLOB or VARCHAR2
  • 73. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply
  • 74. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning
  • 75. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing
  • 76. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing encryption
  • 77. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing encryption compression
  • 78. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing encryption compressionRAC
  • 79. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing encryption compressionRAC parallel
  • 80. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 all the normal goodies apply partitioning indexing encryption compressionRAC parallel replication
  • 81. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 51Public
  • 82. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 51Public Sounds like lies …
  • 83. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 50 a quick word on our demos
  • 84. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 53Public import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; import java.time.ZonedDateTime; import oracle.jdbc.internal.OraclePreparedStatement; public class LoadOrderJSON { public static void main(String[] args) { Connection con = null; Statement stmt = null; ResultSet rs = null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); con = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@//localhost:1521/db122"); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); }
  • 85. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 54Public try { OraclePreparedStatement pstmt = (OraclePreparedStatement)con.prepareStatement( "insert into orders values ( utl_raw.cast_to_raw(:order_details) )" ); pstmt.setString(1, "{"date": "2016-05-03 10:40:36","loyaltyCardNo": 1230, "location": { "city": "Dallas", "state": "TX" }, "salesAmount": 7.55, "order": [ { "item": "Espresso", "size": "small", "sales_amount": 2.10, "coffee_used_gram": 10 }, { "item": "Espresso", "size": "large", "salesAmount": 2.50, "coffeeUsedGram": 25 }, { "item": "Americano", "size": "medium", "salesAmount": 2.95, "coffeeUsedGram": 15 }]}"); boolean done; done = pstmt.execute(); System.out.print("Done"); } catch (SQLException e) { e.printStackTrace(); }
  • 86. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 55Public C:temp>javac LoadOrderJSON.java C:temp>java LoadOrderJSON Done
  • 87. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 56Public SQL> select * from orders; ORDER_DETAILS ------------------------------------------------------------ 7B2264617465223A2022323031362D30352D30332031303A34303A333622 2C226C6F79616C7479436172644E6F223A20313233302C2020226C6F6361 74696F6E223A207B20202020202263697479223A202244616C6C6173222C 2020202020227374617465223A202254582220207D2C20202273616C6573 416D6F756E74223A20372E35352C2020226F72646572223A205B20207B20 202020226974656D223A2022457370726573736F222C202020202273697A 65223A2022736D616C6C222C202020202273616C65735F616D6F756E7422 3A20322E31302C2020202022636F666665655F757365645F6772616D223A 20313020207D2C20207B20202020226974656D223A202245737072657373 6F222C202020202273697A65223A20226C61726765222C20202020227361 6C6573416D6F756E74223A20322E35302C2020202022636F666665655573 65644772616D223A20323520207D2C20207B20202020226974656D223A20 22416D65726963616E6F222C202020202273697A65223A20226D65646975 6D222C202020202273616C6573416D6F756E74223A20322E39352C202020 2022636F66666565557365644772616D223A20313520207D5D7D
  • 88. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 57Public OK, Ican store my data just like a document store
  • 89. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 57Public OK, Ican store my data just like a document store Well, it's not"just". We've now got it secure,backedup, like ourexisting systems
  • 90. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 57Public OK, Ican store my data just like a document store Well, it's not"just". We've now got it secure,backedup, like ourexisting systems Thanks… you saved us from having to learn MongoDB API's. We're a week ahead of schedule
  • 91. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 57Public OK, Ican store my data just like a document store Well, it's not"just". We've now got it secure,backedup, like ourexisting systems Thanks… you saved us from having to learn MongoDB API's. We're a week ahead of scheduleBut I have to ask, seriously, why not model the data ? Whyuse a document store at all ?
  • 92. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 58Public Well...here's my JSON var myjson = '{"firstname":"Joe", "surname":"Cooldude", "jobs":["Developer", "Gettin Stuff Done"] }';
  • 93. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 58Public Well...here's my JSON And here's the codeto make it an object Done ! var myjson = '{"firstname":"Joe", "surname":"Cooldude", "jobs":["Developer", "Gettin Stuff Done"] }'; var contact = JSON.parse(jsontext);
  • 94. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 58Public Well...here's my JSON And here's the codeto make it an object Done ! var myjson = '{"firstname":"Joe", "surname":"Cooldude", "jobs":["Developer", "Gettin Stuff Done"] }'; var contact = JSON.parse(jsontext); OK, Imust admit that's pretty cool
  • 95. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | the next day
  • 96. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 60Public Our initial gain looks like it might be chewed up. To load data into Oracle, we need the Oracle client installed and configured. We've never done that, and to fetch the data we'll need to skill up on JDBC and how it handles these "BLOB" things. Estimate impact is around 7 days Status report DBA <dba@mycompany.com>
  • 97. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 60Public Our initial gain looks like it might be chewed up. To load data into Oracle, we need the Oracle client installed and configured. We've never done that, and to fetch the data we'll need to skill up on JDBC and how it handles these "BLOB" things. Estimate impact is around 7 days Status report DBA <dba@mycompany.com>
  • 98. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 61Public
  • 99. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 61Public I saw the status report. What's the drama ?
  • 100. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 61Public I saw the status report. What's the drama ? Wethought a document model would make ourcodeeasier.
  • 101. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 61Public I saw the status report. What's the drama ? Wethought a document model would make ourcodeeasier. But there's bucket loads of JDBC codeto write. That's all newto us
  • 102. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 61Public I saw the status report. What's the drama ? Wethought a document model would make ourcodeeasier. But there's bucket loads of JDBC codeto write. That's all newto us That's databases for you. Lots of coding needed
  • 103. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 62Public
  • 104. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Can't wejust do REST calls like non-database apps ? 62Public
  • 105. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Can't wejust do REST calls like non-database apps ? 62Public Er...no. Databases don’t work like that
  • 106. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Can't wejust do REST calls like non-database apps ? 62Public Er...no. Databases don’t work like that becauseI don’t knowwith REST is
  • 107. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Can't wejust do REST calls like non-database apps ? 62Public Er...no. Databases don’t work like that Let me explain becauseI don’t knowwith REST is
  • 108. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 63 REST = Representational State Transfer
  • 109. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 64 client-server request/response
  • 110. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 64 client-server request/response stateless simple (get, put, …)consistent (URI) JSON
  • 111. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 65 http://myserver.com/orders/100234
  • 112. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 65 http://myserver.com/orders/100234 "GET me the orders for customer 100234" "HERE is an order for customer 100234"
  • 113. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 66Public OK, I've read some stuff. I think can allow accessvia REST
  • 114. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 66Public OK, I've read some stuff. I think can allow accessvia REST Man...we'reback towaiting on a DBA again. This will take months :-(
  • 115. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 66Public OK, I've read some stuff. I think can allow accessvia REST Man...we'reback towaiting on a DBA again. This will take months :-( OK...how long please ?
  • 116. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 66Public OK, I've read some stuff. I think can allow accessvia REST Man...we'reback towaiting on a DBA again. This will take months :-( OK...how long please ? Dude ... buy mea six packand I mightjust have one ready for you in 30 mins
  • 117. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 66Public OK, I've read some stuff. I think can allow accessvia REST Man...we'reback towaiting on a DBA again. This will take months :-( OK...how long please ? Dude ... buy mea six packand I mightjust have one ready for you in 30 mins wow...aDBA that drinks
  • 118. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 67Public Sounds like lies …
  • 119. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 68 ORDS (Oracle Rest Data Services)
  • 120. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 69
  • 121. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 69
  • 122. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 70Public SQL> BEGIN 2 ORDS.ENABLE_SCHEMA(p_enabled => TRUE, 3 p_schema => 'SCOTT', 4 p_url_mapping_type => 'BASE_PATH', 5 p_url_mapping_pattern => 'scott', 6 p_auto_rest_auth => FALSE); 7 commit; 8 END; 9 / PL/SQL procedure successfully completed.
  • 123. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 71Public SQL> BEGIN 2 ORDS.ENABLE_OBJECT(p_enabled => TRUE, 3 p_schema => 'SCOTT', 4 p_object => 'ORDERS', 5 p_object_type => 'VIEW', 6 p_object_alias => 'rest_orders', 7 p_auto_rest_auth => FALSE); 8 9 commit; 10 END; 11 /
  • 124. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 72Public
  • 125. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 73Public
  • 126. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 74Public import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; public class LoadOrderREST { public static void main(String[] args) throws ClientProtocolException, IOException { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost("http://localhost:8080/ords/scott/rest_orders/"); StringEntity input = new StringEntity("{ "order_details" : "[[ my json ]]" }"); input.setContentType("application/json;charset=UTF-8"); post.setEntity(input); HttpResponse response = client.execute(post); BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); String line = ""; while ((line = rd.readLine()) != null) { System.out.println(line); } } }
  • 127. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 75Public cool, all I need now is a simple POST call
  • 128. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 76 anywhere …
  • 129. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Configuring REST on Oracle Cloud 77
  • 130. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Configuring REST on Oracle Cloud 78 Give the service a name and specify the prefix
  • 131. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Configuring REST on Oracle Cloud 79 Specify the rest of the URL demo/geraldorders
  • 132. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Configuring REST on Oracle Cloud 80 Specify the type of service Specify the actual command to be used by the service
  • 133. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 81Public
  • 134. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 81Public Thanks, that means wehavea document store, with easy REST access,and no database codeto write !
  • 135. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 81Public Thanks, that means wehavea document store, with easy REST access,and no database codeto write ! Yeah…isn't that cool ...(sigh)
  • 136. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 81Public Thanks, that means wehavea document store, with easy REST access,and no database codeto write ! Yeah…isn't that cool ...(sigh) Man...what is the world coming to :-(
  • 137. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | a few days later
  • 138. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 83Public Our initial gain looks like it might be chewed up. We need to build a parser for our JSON documents to extract the fields from the document. We're also seeing network issues in some of our testing Status report DBA <dba@mycompany.com>
  • 139. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 83Public Our initial gain looks like it might be chewed up. We need to build a parser for our JSON documents to extract the fields from the document. We're also seeing network issues in some of our testing Status report DBA <dba@mycompany.com>
  • 140. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 84Public
  • 141. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 84Public I saw the status report. What's the drama ?
  • 142. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 84Public I saw the status report. What's the drama ? JSONis great for objects. But we need to produce reports. So we're building a parser
  • 143. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 84Public I saw the status report. What's the drama ? JSONis great for objects. But we need to produce reports. So we're building a parser But it's slow - I'm dragging whole blobs across the network !
  • 144. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 84Public I saw the status report. What's the drama ? JSONis great for objects. But we need to produce reports. So we're building a parser But it's slow - I'm dragging whole blobs across the network ! Thedatabase can do that for you, just with simple SQL
  • 145. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 85Public sounds like lies …
  • 146. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 86 12c ... native JSON SQL support dot notation
  • 147. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 87 SQL> desc ORDERS NAME TYPE ------------------ ----------- ORDER_DETAILS BLOB
  • 148. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 87 SQL> desc ORDERS NAME TYPE ------------------ ----------- ORDER_DETAILS BLOB {"date": "2016-05-03 10:40:36", "loyaltyCardNo": 1230, "location": { "city": "Dallas", "state": "TX”}, "salesAmount": 7.55, "order": [ { "item": "Espresso”, …. } }
  • 149. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 88 SQL> SELECT o.order_details.location.city 2 FROM orders o; Location -------------------- Dallas Los Angeles New York San Francisco Washington {"date": "2016-05-03 10:40:36", "loyaltyCardNo": 1230, "location": { "city": "Dallas", "state": "TX”}, "salesAmount": 7.55, "order": [ { "item": "Espresso”, ... } }
  • 150. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 89Public
  • 151. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 89Public Thanks for that. Nowwecan bring just what we need across the network
  • 152. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 89Public Thanks for that. Nowwecan bring just what we need across the network And don't forget, we can even compress the data across the network
  • 153. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 89Public Thanks for that. Nowwecan bring just what we need across the network And don't forget, we can even compress the data across the network Cool. We can ditch the parser and just use SQL queries.
  • 154. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 90Public We are done ! Status report
  • 155. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 91
  • 156. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | a few days later
  • 157. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 93Public
  • 158. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 93Public All going well ?
  • 159. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 93Public All going well ? Yes…big success. Now we're integrating the data with the CRM system.
  • 160. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 93Public All going well ? Yes…big success. Now we're integrating the data with the CRM system. We'vestarted a project to match the sales data to the customers
  • 161. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 93Public All going well ? Yes…big success. Now we're integrating the data with the CRM system. We'vestarted a project to match the sales data to the customers A project? Isn't the CRM system running in Oracle..on the same box ?
  • 162. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94Public
  • 163. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94Public Yeah, butthat’s a relational system. Wejust have documents as blobs. We'rewriting java classes to match it all up
  • 164. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94Public Yeah, butthat’s a relational system. Wejust have documents as blobs. We'rewriting java classes to match it all up Wecan integrate at the database level. No needto doit in the application
  • 165. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94Public Yeah, butthat’s a relational system. Wejust have documents as blobs. We'rewriting java classes to match it all up Wecan integrate at the database level. No needto doit in the application But how? You don’t know what is in ourblobs ? Hell, even wedon’t know what is in ourblobs
  • 166. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94Public Yeah, butthat’s a relational system. Wejust have documents as blobs. We'rewriting java classes to match it all up Wecan integrate at the database level. No needto doit in the application But how? You don’t know what is in ourblobs ? Hell, even wedon’t know what is in ourblobs That's ok. Thedatabase can do all that for us
  • 167. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 95Public sounds like lies …
  • 168. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 96 12c ... JSON data guide
  • 169. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 97 metadata discovery attributes optional deep analysis
  • 170. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 98 automatic generation virtual columns relational views
  • 171. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 99 SQL> SELECT JSON_DATAGUIDE(o.order_details) FROM orders o; JSON_DATAGUIDE(O.ORDER_DETAILS) ---------------------------------------------------------------------- [ {"o:path": "$.date", "type": "string", "o:length": 32 }, {"o:path": "$.order", "type": "array", "o:length": 256 }, {"o:path": "$.location", "type": "object", "o:length": 32}, {"o:path": "$.location.city", "type": "string", "o:length": 8}, ... ... { "o:path": "$.salesAmount", "type": "number", "o:length": 4 }, { "o:path": "$.loyaltyCardNo","type": "number", "o:length": 8}]
  • 172. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 100 then ... standard SQL queries
  • 173. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 101 SQL> select 2 c.c_name, 3 o.order_details.location.city, 4 sum(to_number(o.order_details.salesamount)) total 5 from 6 customers c, 7 orders o 8 where 9 c.c_custid = o.order_details.loyaltycardno 10 group by 11 c.c_name, 12 o.order_details.location.city 13 order by total desc 14 fetch first 10 rows only;
  • 174. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 102Public
  • 175. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 102Public Whoa there cowboy ! I knowa little bit of SQL, butthat’s way outside my league
  • 176. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 102Public Whoa there cowboy ! I knowa little bit of SQL, butthat’s way outside my league Don’t panic ! Wecan abstract this away in a view. Yourqueries will stay nice and simple
  • 177. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 103Public sounds like lies …
  • 178. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 104 SQL> create or replace view TOP_TEN_CUSTOMERS as 2 select c.c_name, 3 o.order_details.location.city, 4 sum(to_number(o.order_details.salesamount)) total 5 from customers c, 6 orders o 7 where c.c_custid = o.order_details.loyaltycardno 8 group by c.c_name, 9 o.order_details.location.city 10 order by total desc 11 fetch first 10 rows only; View created.
  • 179. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 105Public
  • 180. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 105Public Thanks for that. ButI don’t think that will work. By next week, we'll have 2 million records.
  • 181. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 105Public Thanks for that. ButI don’t think that will work. By next week, we'll have 2 million records. And ?
  • 182. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 105Public Thanks for that. ButI don’t think that will work. By next week, we'll have 2 million records. And ? There's only onedatabase. We're going to deploy parallel app servers to handlethe volume. We'll bring the data down locally
  • 183. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 105Public Thanks for that. ButI don’t think that will work. By next week, we'll have 2 million records. And ? There's only onedatabase. We're going to deploy parallel app servers to handlethe volume. We'll bring the data down locally Have you forgotten the network dramas ? Howabout wehavethe answeralready prepared ?
  • 184. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 106Public
  • 185. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 106Public Theanswer already prepared? How?
  • 186. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 106Public Theanswer already prepared? How? Wecan store summarised data based on the detail
  • 187. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 106Public Theanswer already prepared? How? Wecan store summarised data based on the detail Yeah..no thanks. Then I'd have to changeall my codeto use that newtable
  • 188. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 106Public Theanswer already prepared? How? Wecan store summarised data based on the detail Yeah..no thanks. Then I'd have to changeall my codeto use that newtable What if I said you wont havetochangea single line of code?
  • 189. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 107Public sounds like lies …
  • 190. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 108 materialized views
  • 191. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 109 not just for warehouses
  • 192. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 109 not just for warehouses fast refresh on commit refresh on query refresh
  • 193. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 110 SQL> create materialized view TOP_CUSTOMERS_MV 2 enable query rewrite 3 as select c.c_name, 4 o.order_details.location.city, 5 sum(to_number(o.order_details.salesamount)) total 6 from customers c, 7 orders o 8 where c.c_custid = o.order_details.loyaltycardno 9 group by c.c_name, 10 o.order_details.location.city; Materialized view created.
  • 194. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 111 SQL> select c.c_name, 2 o.order_details.location.city, 3 sum(to_number(o.order_details.salesamount)) total 4 from customers c, 5 orders o 6 where c.c_custid = o.order_details.loyaltycardno 7 group by c.c_name, 8 o.order_details.location.city 9 order by total desc 10 fetch first 10 rows only;
  • 195. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 111 SQL> select c.c_name, 2 o.order_details.location.city, 3 sum(to_number(o.order_details.salesamount)) total 4 from customers c, 5 orders o 6 where c.c_custid = o.order_details.loyaltycardno 7 group by c.c_name, 8 o.order_details.location.city 9 order by total desc 10 fetch first 10 rows only; --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 10 | 20550 | |* 1 | VIEW | | 10 | 20550 | |* 2 | WINDOW SORT PUSHED RANK | | 1 | 2029 | | 3 | MAT_VIEW REWRITE ACCESS FULL| TOP_CUSTOMERS_MV | 1 | 2029 | ---------------------------------------------------------------------------
  • 196. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 112 SQL> select c.c_name, 2 o.order_details.location.city, 3 sum(to_number(o.order_details.salesamount)) total 4 from customers c, 5 orders o 6 where c.c_custid = o.order_details.loyaltycardno 7 group by c.c_name, 8 o.order_details.location.city 9 order by total desc 10 fetch first 10 rows only; Elapsed: 00:00:01.02
  • 197. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 113Public This is awesome! All of ourreports arenow nearly instantaneous
  • 198. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 114 a few weeks later
  • 199. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 115Public
  • 200. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 115Public I need another 77 materialized views
  • 201. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 115Public I need another 77 materialized views Why ?
  • 202. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 115Public I need another 77 materialized views Why ? Ourapp is so well liked, that marketing want full SQL access for adhocreports
  • 203. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 115Public I need another 77 materialized views Why ? Ourapp is so well liked, that marketing want full SQL access for adhocreportsThat probably wont work, because adhocSQL means whatever querythey like
  • 204. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 116Public
  • 205. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 116Public I'm gonnaget fired I gaveeveryone access to ourorder history table, and promised super fast results :-(
  • 206. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 116Public I'm gonnaget fired I gaveeveryone access to ourorder history table, and promised super fast results :-( Have you considered the in-memory columnstore?
  • 207. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 116Public I'm gonnaget fired I gaveeveryone access to ourorder history table, and promised super fast results :-( Have you considered the in-memory columnstore? Ourstuff is already in RAM.
  • 208. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 117Public
  • 209. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 117Public Yes, it's in RAM, butthat’s the buffer cache, which is great forstoring and retrieving rows of data
  • 210. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 117Public Yes, it's in RAM, butthat’s the buffer cache, which is great forstoring and retrieving rows of data Marketing people don’t want rows. They to scan all of the data. They need a columnar format
  • 211. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 117Public Yes, it's in RAM, butthat’s the buffer cache, which is great forstoring and retrieving rows of data Marketing people don’t want rows. They to scan all of the data. They need a columnar format Wha ?
  • 212. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 118Public sounds like lies …
  • 213. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 119 12c ... in-memory option
  • 214. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Buffer Cache New In-Memory Column Store SALES SALES Row Format Column Format SALES typical row level operations analytic large scale operations
  • 215. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 121 even when it's JSON
  • 216. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Relational In-Memory Colum Store In-Memory Virtual Columns In-Memory JSON Format Relational Virtual JSON 122 {"date": "2016-05-03 10:40:36", "loyaltyCardNo": 1230, "location": { "city": "Dallas", "state": "TX”}, "salesAmount": 7.55, "order": [ { "item": "Espresso”, …. } }
  • 217. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 123 SQL> ALTER TABLE ORDERS_HISTORY ADD city as 2 (JSON_VALUE(order_details, '$.location.city')); SQL> ALTER TABLE ORDERS_HISTORY ADD state as 2 (JSON_VALUE(order_details, '$.location.state')); SQL> ALTER TABLE ORDERS_HISTORY ADD salesamount as 2 (JSON_VALUE(order_details, '$.salesAmount')); SQL> ALTER TABLE ORDERS_HISTORY ADD loyaltycardno as 2 (JSON_VALUE(order_details, '$.loyaltyCardNo'));
  • 218. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 124 SQL> ALTER TABLE customers INMEMORY; SQL> ALTER TABLE orders_history INMEMORY;
  • 219. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 124 SQL> ALTER TABLE customers INMEMORY; SQL> ALTER TABLE orders_history INMEMORY; SQL> ALTER TABLE orders_history INMEMORY 2 (ORDER_DETAILS,CITY,STATE,LOYALTYCARDNO,SALESAMOUNT); SQL> show parameter inmemory_virtual_columns NAME TYPE VALUE ------------------------------------ ----------- ---------- inmemory_virtual_columns string MANUAL
  • 220. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 125 SQL> SELECT /*+ FULL(c) */ count(*) FROM customers c; SQL> SELECT /*+ FULL(o) */ count(*) FROM orders_history o; SQL> SELECT 2 segment_name, 3 populate_status, 4 bytes_not_populated 5 FROM v$im_segments; SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED -------------------------- ------------- ------------------- ORDERS_HISTORY STARTED 351797248 CUSTOMERS COMPLETED 0
  • 221. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 125 SQL> SELECT /*+ FULL(c) */ count(*) FROM customers c; SQL> SELECT /*+ FULL(o) */ count(*) FROM orders_history o; SQL> SELECT 2 segment_name, 3 populate_status, 4 bytes_not_populated 5 FROM v$im_segments; SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED -------------------------- ------------- ------------------- ORDERS_HISTORY STARTED 351797248 CUSTOMERS COMPLETED 0 SEGMENT_NAME POPULATE_STAT BYTES_NOT_POPULATED -------------------------- ------------- ------------------- ORDERS_HISTORY COMPLETED 0 CUSTOMERS COMPLETED 0
  • 222. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 126 SQL> SELECT 2 c.name, 3 c.cust_id loyaltyCardNo, 4 o.city, 5 o.state, 6 SUM(salesamount) total 7 FROM customers c, 8 orders_history o 9 WHERE c.cust_id = o.loyaltycardno 10 and o.salesamount > 20 11 GROUP BY c.name, 12 c.cust_id, 13 o.city, 14 o.state 15 ORDER BY total Desc 16 FETCH FIRST 10 ROWS ONLY;
  • 223. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 126 SQL> SELECT 2 c.name, 3 c.cust_id loyaltyCardNo, 4 o.city, 5 o.state, 6 SUM(salesamount) total 7 FROM customers c, 8 orders_history o 9 WHERE c.cust_id = o.loyaltycardno 10 and o.salesamount > 20 11 GROUP BY c.name, 12 c.cust_id, 13 o.city, 14 o.state 15 ORDER BY total Desc 16 FETCH FIRST 10 ROWS ONLY; -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | -------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 10 | 41080 | | 1 | SORT ORDER BY | | 10 | 41080 | |* 2 | VIEW | | 10 | 41080 | |* 3 | WINDOW SORT PUSHED RANK | | 167K| 69M| | 4 | HASH GROUP BY | | 167K| 69M| |* 5 | HASH JOIN | | 167K| 69M| | 6 | TABLE ACCESS INMEMORY FULL| CUSTOMERS | 5000 | 65000 | |* 7 | TABLE ACCESS INMEMORY FULL| ORDERS_HISTORY | 167K| 67M| --------------------------------------------------------------------------
  • 224. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 127 SQL> SELECT c.name, 2 c.cust_id loyaltyCardNo, 3 o.city, 4 o.state, 5 SUM(salesamount) total 6 FROM customers c, 7 orders_history o 8 WHERE c.cust_id = o.loyaltycardno 9 and o.salesamount > 20 10 GROUP BY c.name, 11 c.cust_id, 12 o.city, 13 o.state 14 ORDER BY total Desc 15 FETCH FIRST 10 ROWS ONLY; ... Statistics ---------------------------------------------------------- 0 recursive calls 3 db block gets 19 consistent gets 0 physical reads
  • 225. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 128Public
  • 226. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 128Public That is supercool. How doI keep the column format stuff in sync with the real data
  • 227. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 128Public That is supercool. How doI keep the column format stuff in sync with the real data That's all automatic. No additional work for you to do.
  • 228. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 129 the next day :-)
  • 229. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public
  • 230. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this
  • 231. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this What's happened ?
  • 232. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this What's happened ? Marketing can now run all these reports with ease.
  • 233. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this What's happened ? Marketing can now run all these reports with ease. Isn't that a good thing ?
  • 234. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this What's happened ? Marketing can now run all these reports with ease. Isn't that a good thing ? There arerunning any SQL they want, and emailing confidential data all over the place !!!
  • 235. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 130Public Yeah...you'regonna be upset about this What's happened ? Marketing can now run all these reports with ease. Isn't that a good thing ? There arerunning any SQL they want, and emailing confidential data all over the place !!! Oh dear...
  • 236. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public
  • 237. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ?
  • 238. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ? Whats the confidential data ?
  • 239. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ? Whats the confidential data ? Customer ID number and their email address
  • 240. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ? Whats the confidential data ? Customer ID number and their email address Howabout if that is maskedout of all of their reports ?
  • 241. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ? Whats the confidential data ? Customer ID number and their email address Howabout if that is maskedout of all of their reports ?Wecant do that - they use their ownreporting tool. Wehave no control over it
  • 242. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 131Public Can you take away all oftheir access while wefigure something out ? Whats the confidential data ? Customer ID number and their email address Howabout if that is maskedout of all of their reports ?Wecant do that - they use their ownreporting tool. Wehave no control over it Thedatabase can automatically do it for us !
  • 243. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 132Public that has gotta belies …
  • 244. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 133 data redaction policies
  • 245. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 134 SQL> BEGIN 2 dbms_redact.add_policy( 3 object_schema => user, 4 object_name => 'customers', 5 column_name => 'c_custid', 6 policy_name => 'redact_Loyalty_card', 7 function_type => DBMS_REDACT.FULL, 8 expression => '1=1' 9 ); 10 END; 11 / PL/SQL procedure successfully completed.
  • 246. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 135 SQL> BEGIN 2 dbms_redact.alter_policy( 3 object_schema => user, 4 object_name => 'customers', 5 column_name => 'c_email', 6 policy_name => 'redact_Loyalty_card', 7 function_type => DBMS_REDACT.regexp, 8 regexp_pattern => dbms_redact.re_pattern_email_address, 9 regexp_replace_string => dbms_redact.re_redact_email_name, 10 regexp_position => dbms_redact.re_beginning, 11 regexp_occurrence => dbms_redact.re_all, 12 expression => '1=1' 13 ); 14 END; 15 / PL/SQL procedure successfully completed.
  • 247. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 136 SQL> select c_custid, c_name, c_city, c_state, c_email 2 from customers 3 where rownum <= 5; C_CUSTID C_NAME C_CITY C_STATE C_EMAIL ---------- ------------------------- -------------------- --------------- ---------------- 0 Jose Manuel Urman New York NY xxxx@gmail.com 0 Luis Popp New York NY xxxx@yahoo.com 0 Den Raphaely New York NY xxxx@outlook.com 0 Alexander Khoo New York NY xxxx@oracle.com 0 Shelli Baida New York NY xxxx@gmail.com 5 rows selected.
  • 248. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 137 note: security of distribution
  • 249. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 138Public
  • 250. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 138Public Amazing ! Can this flow through to my REST queries as well ?
  • 251. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 138Public Amazing ! Can this flow through to my REST queries as well ? Of course!
  • 252. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 139Public
  • 253. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 139Public Well, instead of months of development, wecranked this outin a week. Thereis so much cool stuff in the database
  • 254. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 139Public Well, instead of months of development, wecranked this outin a week. Thereis so much cool stuff in the database And thanks for including mein the discussions. I know more about your app now, so we can keep it evolving and improving into the future.
  • 255. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 140Public Let us have a very cliché'dhappy end to this story, and celebratory drink together and become best of friends Let us have a veryhappy end to this story, and celebratory drink together and becomebest of friends
  • 256. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 140Public Let us have a very cliché'dhappy end to this story, and celebratory drink together and become best of friends Let us have a veryhappy end to this story, and celebratory drink together and becomebest of friends CHEERS !
  • 257. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 141 Summary: Relational Database Unfashionable Legacy
  • 258. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Summary: Oracle Database 12c Universal Peace Maker 141
  • 259. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Summary: Oracle Database 12c Universal Peace Maker 141 Flexibility Native JSON support REST Services
  • 260. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Summary: Oracle Database 12c Universal Peace Maker 141 Flexibility Native JSON support REST Services Scalability Scale-out or Scale-up
  • 261. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Summary: Oracle Database 12c Universal Peace Maker 141 Flexibility Native JSON support REST Services Scalability Scale-out or Scale-up Real-Time Analytics JSON in the In-Memory Column Store
  • 262. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Summary: Oracle Database 12c Universal Peace Maker 141 Flexibility Native JSON support REST Services Scalability Scale-out or Scale-up Real-Time Analytics JSON in the In-Memory Column Store Security Data encrypted at rest Data Redaction
  • 263. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | #MakeDataGreatAgain

Editor's Notes

  1. Pagination Size number of rows that will be returned per HTTP GET. It’s not necessary for put but it’s there by default in the GUI.
  2. Json documents have always been supported with Database In-Memory but in 12.2 we have improved the format we use to store the JSON document in memory. The new format allows us to scan and filter the data within each document much more efficiently than ever before. It’s also possible to create additional In-Memory expression on JSON documents using the JSON_VALUE functions, which will be automatically materialized and maintained the results in the In-Memory column store. Oracle will automatic redirect queries to use the In-Memory Expressions instead of the base JSON column.
  3. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact
  4. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact
  5. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact
  6. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact
  7. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact
  8. Oracle Database 12c may not be the dinosaur your developers think it is Database 12c offers great flexibility by offering native support for JSON and REST APIs Whether you want to scale up or scale out your solution Oracle Database 12c can offer a stable fully functional platform You get full security too as all data is encrypted at rest automatically with Exadata Express Cloud service Plus you can redact