application development with oracle database · application continuity migration framework html5...
TRANSCRIPT
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ApplicationDevelopmentwiththeOracleDatabase
GeraldVenzl
MasterProductManagerOracleDevelopment2nd ofApril2019
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SafeHarborStatement
Thefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.
OracleConfidential – Internal/Restricted/HighlyRestricted 3
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
4
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
5
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ContinuousOracleDatabaseInnovationsPreservingcustomer’sinvestmentthougheachnewComputingEra
StoredProceduresPartitioningParallelQuery
UnstructuredData
ResourceManagementRealApplicationClusters
DataGuardXML
BigDataSQLMultitenantIn-Memory
JSON
BigData&CloudInternetClient-Server
6
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
StoredProcedures&TriggersReferentialIntegrityDistributedTransactionsAQLOBsSpatial
OnlineOperationsRACDataGuardFlashbackSelf-ManagingDatabaseEnterpriseManagerResourceManagement
AutomaticStorageMgmtEncryptionRealApplication TestingRowCompressionColumnar CompressionSmartScansFlashCache
RPatternMatchingOpenSource DriversJSONRESTDataServicesNoSQL DatabaseApplication ContinuityMigrationFrameworkHTML5– Desktop&BrowserJavascriptOpensourceCloud
Java.NETPHPXMLAPEX
Multitenant DatabaseIn-MemoryColumnStore
Release 1985– 1997:6,7 and8 1998– 2012:8i, 9i,10g,11g 2013- 2019: 19c
Developer
Engine
ApplicationDevelopmentOverTheYears
Internet
Mobile&Cloud
OLTPthroughput (RowLocking,MVRC)ParallelQueryPartitioning
OpenSourceDrivers(Python, Node.js andR)
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
8
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
DevelopmentServices
CloudtoOn-Premise,Clustering,
Microservices,Sharding, Security,
HighAvailability,Isolation,
ZeroDataLoss,Administration
DataSupport
Node.js,Python, .NET,Java,
PHP,Ruby,PL/SQL,C,C++,
Perl,Go,EBR,RESTServices,
AdvandedQueuing,
APEX,SODA,DockerRelational, JSON,XML,Spatial,Graph,RDF,Text,Binary.ObjectStores,HDFS,Kafka,NoSQLStoresPlatformServices
AnalyticalServices
SQL,R,Columnar In-Memory,AdvancedAnalytics,MachineLearning,AI
OracleDatabaseasaDataPlatform
InfrastructureServicesPublicCloud,CloudatCustomer,Exadata,BDA,ZDLRA
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
10
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 11
“Polyglotpersistencewilloccurovertheenterpriseasdifferentapplicationsusedifferentdatastoragetechnologies.Itwillalsooccurwithinasingleapplicationasdifferentpartsofan
application’sdatastorehavedifferentaccesscharacteristics.”
MartinFowler&PramodSadalage,Feb.2012http://martinfowler.com/articles/nosql-intro-original.pdf
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Source:Thefutureis:NoSQL Databases PolyglotPersistencehttp://martinfowler.com/articles/nosql-intro-original.pdf
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
TwoApproachestoPolyglotPersistence
13
RelationalDatabase
Key-valueStore
GraphDatabase
JSON/XMLDatabase
Single-model Multi-model
RelationalData
Key-valueData
GraphData
JSON&XMLData
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ConsiderationsforPolyglotPersistence
14
Multi-modelPolyglot:• Benefitsofconsolidationandstandardization• Standardizedadministration• Consistentdatasecuritypolicies• Simpleintegrationacrossmultipledataformats• Transactionsanddataconsistency
Single-modelPolyglot:• Benefitsofspecialization• SpecializedAPIs• Specializeddataformats• Specializedaccessmethodsandindexes
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
Complexity
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
Complexity
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
1990s
Complexity
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
Complexity
1990s
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
2000s
Complexity
1990s
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
2000s
Complexity
1990s
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Evolutionofdatamanagement
1970s
CobolISAM
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
2000s 2010s
Complexity
1990s
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Multi-modelprevailsovertimeComplexity
1970s
RelationalSQL
1980s
ObjectDBs
Multi-ModelSQL
XMLXPath
Multi-ModelSQL
JSON
Multi-ModelSQL
1990s 2000s 2010s 20??
CobolISAM
Multi-ModelSQL
Next“big”thing
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
PolyglotPersistenceMarketTrends• Single-modelarchitecturesaremostpervasivefor‘edge’applications
– Newbusiness&workloadrequirements
• Businessapplicationsnaturallyconvergetomulti-modelarchitectures– Today’s‘edge’applicationsaretomorrow’smainstreambusinessapplications– Efficienciesofmulti-modelarchitectureoverrideadvantagesofspecial-purposesystemsovertime
• Therewillalwaysbesingle-modelpolyglotarchitectures– Becausetherearealwaysnew‘edge’applications–Oracle’ssingle-modelarchitectures:
• OracleBerkeleyDB,OracleNoSQL Database,Essbase,OracleBigDataSpatialandGraph
23
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Oraclesupportsmultiplesingle-modeldatastores– Relational
– Key/Value
– XML
OracleProductStrategyforPolyglotPersistenceSupportBoth– Customerchooseswhichonetouse
Multi-model
• OracleDatabasesupportsmulti-modelpersistence– Relational
– XML
– JSON
– Text
– Graph&Spatial
• OracleDatabaseprovidesintegratedaccesstoalldatabaseobjects
- Spatial- Graph
- OLAP
Single-model
• Oracleintegratessingle-modelpolyglotenvironmentsviaBigDataSQL
Spatial
Graph
OLAP
NoSQL
Relational
XML
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
25
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
2019mostpopulardevelopmentlanguages
26
Stackoverflow
1JavaScript 4PHP2Java 5C#3Python 6C++
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
OracleDatabasefortheDeveloper
LANGUAGE DRIVER
C OCI,ODPI-C
C++ OCCI
Java JDBC
.NET ODP.NET
Node.js node-oracledb
Python cx_Oracle
PHP OCI8,PDO_OCI
R ROracle
Go goracle,rana,mattn
Rust mimir
Ruby ruby-oci8
Perl DBD::Oracle
SupportingallmajordevelopmentenvironmentsandAPIs
…andODBC,OLEDB,Pro*C,Pro*COBOL,Pro*Fortran,SQLJ
OpenSourceDrivers(Third-partymaintainers)
OpenSourceDrivers(Oraclecontributions)
OracleprovidedDrivers
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
JSON
JSONSupportinOracleDatabasePowerfulSQLAnalytics
JSON
DataaccessedviaRESTfulserviceornativeAPI’s
Datapersisted indatabaseInJSON
DataanalyzedviaSQL
OracleDatabase
SQL
Public 28
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONSupportinOracleDatabaseFastApplicationDevelopment+PowerfulSQLAccess
Public 29
Applicationdevelopers:AccessJSONdocumentsusingRESTAPI
POST /my_database/my_schema/customers HTTP/1.0Content-Type: application/jsonBody: {"firstName": "John",“lastName”: "Smith","age": 25,"address": {
"streetAddress": "21 2nd Street","city": "New York","state": "NY","postalCode": "10021“,"isBusiness" : false },
"phoneNumbers": [{"type": "home","number": "212 555-1234“ },{"type": "fax","number": "646 555-4567“ } ]
}
SELECTc.json_document.firstName,c.json_document.lastName,c.json_document.address.city
FROM customers c;
firstName lastName address.city----------- ----------- --------------“John” “Smith” “New York”
Analyticaltoolsandbusinessusers:QueryJSONusingSQL
JSON
Copyright©2015Oracleand/oritsaffiliates.Allrightsreserved.|
Oraclevs MongoDBOracle Mongo DB
Document-store :Store,index,andqueryJSONdocuments ✓ ✓
SimpleDocument-CentricAPI’sandREST support ✓ ✓
QuerybyExample(QBE) capability ✓ ✓
JoinswithinDocuments,Within Collections andAcrossCollections ✓ WithinDocumentsOnly
JoinswithRelational,XML,SpatialandTextContent ✓ Limited Support forText
StandardizedQueryLanguage ✓
Integration withIndustryLeadingBI,AnalyticalandReportingtools
✓
ConcurrencyControl, ACIDTransactions,ReadConsistency ✓ -
EnterpriseBackup/RecoveryandDisasterRecovery ✓
Architected forconsolidationandmultitenancy ✓
30
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
OracleRESTDataServices
31
REST-enableyourdata
JSON
OracleDatabase(Relational)
OracleDatabase(DocumentStore)
OracleNoSQL Database
OracleRESTDataServices
REST
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
OracleRESTDataServicesHTTP(s)APIApp-DevwithRelationalTablesinOracleDatabase
{“custno”: 1001,“name”:“ScottKing”,“address”:“500Mainstreet,InnovationCA”,“orders”:[{“orderno”: 404,
“orderdate”:“Feb27,2014”,“status”:“inprocess”}}}
{“orderno”: 303,“orderdate”:“Feb26,2014”,“status”:“inprocess”}]}
JSON
HTTP(s)
https://myhost/myapp/hr/customerorders/1001
OracleRESTDataServices
SQL
ORDSmapsstandardURIrequeststocorrespondingrelationalSQL(notschemaless): e.g.SQLSELECTfromcustomersandorderstable.ORDSalsotransformstheSQLresults intothehighlypopularJavaScriptObjectNotation(JSON),otherformatsincludeHTML,binaryandCSV.
Fullycommitted tosupportinganyandallstandardsrequiredbyFusion/SaaS /FMW;weareactively engagedintheongoingdialog.
SQLresulttoJSON
transformation
URIRequestorHTTP(s) postmappedtoSQLrequest
JDBCConnection
Pool
URIModule
TemplateContextRoot
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
OracleRESTDataServicesExample:QueryreturningJSONforcustomer1001
{“custno”: 1001,“name”:“ScottKing”,“address”:“500OracleParkway,RedwoodShores,CA,94065”,“country”:“USA”,“class”:“A”,“orders”:[{“orderno”: 303,
“orderdate”:“Feb26,2014”,“status”:“inprocess”},{“orderno”: 202,“orderdate”:“Jan16,2014”,“status”:“processed”},{“orderno”: 101,“orderdate”:“Dec2,2013”,“status”:“processed”}]}
http://myhost/myapplication/custorders/simplequery {custno:1001}• MapURIrequesttodataaccesstemplate• Bindcustno (1001)tobindcustno• Executeselect statementbelow• Noteembeddedcursorexpression• SetformattoJSON
JSONResult
selectc.*,cursor(select*fromordersowhereo.custno =c.custno)ordersfromcustomerscwherec.custno =:bindcustno
DataAccessTemplate
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
• DeveloperFocus– BASE&ACIDtxns
– Tables/JSON/Binary
– C,Java,Python&Node.jsAPIs
– SecondaryIndexes
• OperationsFocus– ElasticConfiguration
– SecureAccess
– DataCenterSupport
– Onlinemanagement
• DifferentiatingFeatures– ACIDtransactions
– Onlinerollingupgrades
– Streaminglargeobjectsupport
– StrongOracletechnologyIntegration
– EngineeredSystemsandCommodityHW
34
Application
StorageNodesDatacenterB
StorageNodesDatacenterA
Application
NoSQLDBDriver
Application
NoSQLDBDriver
Application
Oracle’scommitmenttoSingle-modelPolyglotOracleNoSQLDatabase
http://www.oracle.com/us/products/database/nosql/
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
Oracle’scommitmenttoSingle-modelPolyglotOracleBigDataSpatial&Graph
• Massively-ScalableGraphDatabase– Scalestotrillionsofedges
– ApacheHBase
– OracleNoSQLDatabase
• In-MemoryGraphAnalytics– Morethan30graphanalysisalgorithms
• Simple,standardinterfaces– Java
– Tinkerpop:Blueprints,Gremlin,Rexster
– Python
35
Detecting Components and Communities
Ranking/Walking
Evaluating Communities
∑ ∑
Path-Finding
www.oracle.com/database/big-data-spatial-and-graph
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
OracleonDocker
• OracleDatabaseisfullysupportedonDocker–OracleLinux7– RedHatEnterpriseLinux7
• OracleimageonDocker Store
• Docker buildfilesonGitHub
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
OracleonDocker• Docker containercontainssingle-PDBCDB• PDBcanbeplugged,unplugged,etc.• PDBcanmovebi-directional
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
Docker Store
• Oracle12.1&12.2imagesareavailableonDockerStoreRegistry– https://store.docker.com
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
Docker buildfilesavailableonGitHub
• Repository:https://github.com/oracle/docker-images
• Buildfilesfor18c,12.2,12.1,11.2.0.2XE
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
LiveSQL.oracle.com
40
ThefullpowerofOracleSQLinyourbrowser
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
41
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
OracleOnGitHub
OracleConfidential – Internal/Restricted/HighlyRestricted 42
www.github.com/oracle
• OfficialOraclerepresentationonGitHub
• ExamplesandtoolsforDocker,Java,SQL,Python,Node.js,PL/SQL
• Reposregularlyadded
• MainsourceforOpenSourcecomponents
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
IntroducingSimpleOracleDocumentAccess(SODA)• AnabstractAPIdefinitionfor
– CollectionManagement:Abilitytocreateanddropcollections– Create,Retrieve,UpdateandDelete(CRUD)operationsondocuments– Listoperationsoncollections–Query-by-Example(QBE)forsearchingcollections– Utilityandcontrolfunctions
• CreateandDropIndexes• BulkInsert
• ImplementationscurrentlyavailableforJAVAandREST
• SupportforNODE.jsandotherlanguagesforthcoming
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
SODAforJava• SODAimplementationfortheJavaDeveloper
• DeveloperscanstoreJSONdocumentsintheOracleDatabasewithoutlearningJDBCorSQL
• UsesastandardJDBCconnectiontotalktothedatabase• Supportstransactions• Enableshybridapplicationdevelopment
–MixandMatchSODAandJDBCbasedoperationsinasingleapplication
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
node-oracledbforNode.js
45
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
node-oracledb
• Asimple,stableOracleDatabasedriverwithout-of-theboxperformance
• OngoingcontributionsfromOracle– SupportforlatestOracleDatabasefeatures– 26releasessinceJanuary2015
• Modulardesign– Underlying,simpleDBaccesslayerbasedonOCI
46
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
node-oracledb• Opensource development,releaseandsupportunderApache2.0license
– GitHub repository(www.github.com/oracle/node-oracledb)– InstallablefromNPMregistry(www.npmjs.com/package/oracledb)– Approx.monthlyreleasecycle
UserscancontributeundertheOracleContributorAgreement.Thankstoallwhohavecontributedcode,documentationandideas
47
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
cx_OracleforPython
48
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
cx_Oracle
• Asimple,stableOracleDatabasedriverwithout-of-theboxperformance
• OngoingcontributionsfromOracle– SupportforlatestOracleDatabasefeatures
• Modulardesign– Underlying,simpleDBaccesslayerbasedonOCI
49
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
cx_Oracle
• Opensource development,releaseandsupportunderBSDlicense– GitHubrepository(https://github.com/oracle/python-cx_Oracle)– InstallablefromNPMregistry(https://oracle.github.io/python-cx_Oracle/)– Approx.monthlyreleasecycle
UserscancontributeundertheOracleContributorAgreement.Thankstoallwhohavecontributedcode,documentationandideas
50
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
51
6
7
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
Overall
52Public
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
OracleDatabase12c“UndertheRadar”Features
53
OnlineTableMove JSON
RealTimeMaterializedViews
IndexCompression
AutoGeneratedSequencesLongIdentifiersOnlineTablespace Encryption
PropertyGraph
SQLPlanManagementEnhancementsTopNQue
ries
InvisibleColumnsLongerVarchars
SecurityAssessmentTool
LiveSQL
IndexUsageStats
ApplicationContinuity
AutoListPartitioning
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
128-byteidentifiersforobjects
54
CREATE TABLE VERY_VERY_LONG_TABLE_NAME_IDENTIFIER_THAT_IS_58_BYTES_LONG(
VERY_VERY_LONG_TEXT_COLUMN_WITH_DATA_TYPE_VARCHAR2_THAT_IS_72_BYTES_LONG VARCHAR2(25));
Table VERY_VERY_LONG_TABLE_NAME_IDENTIFIER_THAT_IS_58_BYTES_LONG created.
INSERT INTO VERY_VERY_LONG_TABLE_NAME_IDENTIFIER_THAT_IS_58_BYTES_LONGVALUES ('Hello World!');
1 row inserted.
SELECT * FROM VERY_VERY_LONG_TABLE_NAME_IDENTIFIER_THAT_IS_58_BYTES_LONG;
VERY_VERY_LONG_TEXT_COLUM-------------------------Hello World!
Public
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
Case-insensitiveDatabaseandColumn-levelCollationGreatlysimplifiesmigrationofcase-insensitivefunctionalityof3rd-partyproducts
55
• Linguistic-sensitiveoperations,e.g.,comparisonandsorting,onthecolumnhonorthedeclaredcollation
• Unspecifiedcolumncollationisinheritedfromthedefaultcollationpropertyoftheparenttableorschema
• COLLATE operatorcanbeusedtocastanexplicitcollationanywhereinanexpression
CREATE TABLE product( id NUMBER,
name VARCHAR2(50) COLLATE BINARY_CI,comments VARCHAR2(500)
) DEFAULT COLLATION BINARY;
SELECT name, comments FROM productWHERE name LIKE '%BASE%' OR
comments COLLATE BINARY_CI LIKE '%REPORT%';
NAME COMMENTS _Oracle Database Activity-Based ManagementBusiness Intelligence Replaces Reports
_CI=case-insensitive
InheritsBINARY
Public
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
PL/SQLdeprecatepragma
CREATE PROCEDURE p AUTHID DEFINER ISPRAGMA DEPRECATE (p, 'p is deprecated. You must use p2 instead.');
BEGINDBMS_Output.Put_Line('p');
END p;
PLW-06019: entity P is deprecated
CREATE PROCEDURE q authid Definer isBEGINp();DBMS_Output.Put_Line('q');
END q;
PLW-06020:reference to a deprecated entity: p is deprecated. You must use p2 instead.
Public 56
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.| 57
• Approximationsforexpensiveaggregatecalculations:
APPROX_COUNT_DISTINCT(12.1)APPROX_PERCENTILEAPPROX_MEDIAN
– 6-13Xfaster,accuracytypicallywithin<1%
• UsewithZEROcodechanges– approx_for_aggregation=TRUE
• Accuracyanderrorrateprovided
Newin12.2ApproximateQueryProcessing
Deliverssignificantlyfaster analysisforinteractive andhighlyiterative dataexploration
± 0.012798%
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
Top-NapproximateaggregationInteractiveresponsetimesagainstterabytesofdata
• Approximateresultsforcommontop-Nqueries– Howmanyapproximatepageviewsdidthetopfiveblogpostsgetlastweek?
– Whatwerethetop50customersineachregionandtheirapproximatespending?
• Orderofmagnitudefasterprocessingwithhighaccuracy(errorrate<0.5%)
• NewapproximatefunctionsAPPROX_COUNT(),APPROX_SUM(),APPROX_RANK()
58
SELECT blog_post, APPROX_COUNT(*)FROM weblogGROUP BY blog_postFETCH FIRST 5 ROWS ONLY;
SELECT region, customer_name, APPROX_RANK(PARTITION BY region
ORDER BY APPROX_SUM(sales) DESC) appr_rank,APPROX_SUM(sales) appr_sales
FROM sales_transactionsGROUP BY region, customer_nameHAVING APPROX_RANK(..) <=50;
Top5blogswithapproximatehits Top50customersperregionwithapproximatespending
OracleConfidential – Internal
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
InlineexternaltablesTransparentlyaccessexternaldata
• Externaltabledefinitionprovidedatruntime– Similartoinlineview
• Noneedtopre-createexternaltablesthatareusedonetimeonly– Increaseddeveloperproductivity
59
INSERT INTO salesSELECT sales_xt.*FROM EXTERNAL(
(prod_id number, … )TYPE ORACLE_LOADER …LOCATION ’new_sales_kw13')REJECT LIMIT UNLIMITED );
CREATE TABLE sales_xt(prod_id number, … )TYPE ORACLE_LOADER …LOCATION ’new_sales_kw13')REJECT LIMIT UNLIMITED );
INSERT INTO sales SELECT * FROM sales_xt;
DROP TABLE sales_xt;
OracleConfidential – Internal
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
Privatetemporarytablestransienttablesusefulforreportingapplications
Globaltemporarytables
• Persistent,shared(global)tabledefinition
• Temporary,private(session-based)datacontent– Dataphysicallyexistsforatransactionorsession
– Session-privatestatistics
ACC_TMP
ACC_TMPACC_TMP
Privatetemporarytables(18c)
• Temporary,private(session-based)tabledefinition– Privatetablenameandshape
• Temporary,private(session-based)datacontent– Sessionortransactionduration
ACC_PTMPACC_PTMP
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
OracleDatabase12TemporalSupportTransactionTimeTemporal(FlashbackDataArchive)
§ Trackstransactionalchangestoatableoveritslifetime
§ Typicallyusedforcomplianceandauditing
§ Enablestheuserstoseethedataasitwasatapointintimeinthepast
ValidTimeTemporal
§ Enables user to model & query data for “real world validity”
§ Typically used for insurance policies, financial markets, trade data & future changes
§ Users can model concepts such as the “Life time of an insurance policy”
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ValidTimeTemporalExample
CREATE TABLE customers(
custid NUMBER,custname VARCHAR2(30),
custaddr1 VARCHAR2(50),
custaddr2 VARCHAR2(50),
custcity VARCHAR2(50),
custstate VARCHAR2(2),custzip VARCHAR2(20),
start_time TIMESTAMP,
end_time TIMESTAMP,
PERIOD FOR cust_valid_time (start_time, end_time));
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
INSERT INTO CUSTOMERS VALUES(1,'Acme Inc.','123 AnyStreet','Suite 17','Anytown','AS','99999', TO_TIMESTAMP('01-JAN-15’) ,NULL);
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15 31-MAY-15
UPDATE customersSET end_time = TO_TIMESTAMP('31-MAY-15’)WHERE custid = 1;
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
INSERT INTO CUSTOMERS VALUES(1,'Acme Inc.',’456 Another Street', NULL,'Anytown','AS','99998', TO_TIMESTAMP('01-JUN-15’) ,NULL);
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15 31-MAY-15
1 Acme Inc 456AnotherStreet
Anytown CA 99998 01-JUN-15
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SELECT custaddr1, custaddr2, custcity, custstate, custzipFROM customers WHERE custid = 1;
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15 31-MAY-15
1 Acme Inc 456AnotherStreet
Anytown CA 99998 01-JUN-15
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
EXEC DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME('CURRENT');
SELECT custid, start_time, end_timeFROM customers WHERE custid=1;
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15 31-MAY-15
1 Acme Inc 456AnotherStreet
Anytown CA 99998 01-JUN-15
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SELECT custid, start_time, end_timeFROM customersAS OF PERIOD FOR cust_valid_time TO_TIMESTAMP('03-JUN-15');
custid custname custaddr1 custaddr2 custcity custstate custzip start_time end_time
1 Acme Inc 123AnyStreet
Suite17 Anytown CA 99999 01-JAN-15 31-MAY-15
1 Acme Inc 456AnotherStreet
Anytown CA 99998 01-JUN-15
ValidTimeTemporalExample
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Select * from Employees MATCH_RECOGNIZE (…PATTERN(X+ Z{2})…)
• Scalablediscoveryofbusinesseventsequences– Clickstream logs:sessionization,searchbehaviour– Financialtransactions:frauddetection,doublebottom(“W”)stockanalysis
– Telco:droppedcalls–Medicalsensors:automatedmedicalobservationsanddetections
Patternsaredefinedusingregularexpressions
Ascend
ingOrder
SQLPatternMatchingSimplifiedAnalysisofData
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SQLPatternMatchingExample:FindDoubleBottom(W)
• Finddoublebottom(W)patternsandreport:
• Beginningandendingdateofthepattern
• AveragePriceIncreaseinthesecondascent
• Modifythesearchtofindonlypatternsthatlastedlessthanaweek
PATTERN (X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price))
days
Stock price
X
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SQLPatternMatching
• Finddoublebottom(W)patternsandreport:
• Beginningandendingdateofthepattern
• AveragePriceIncreaseinthesecondascent
• Modifythesearchtofindonlypatternsthatlastedlessthanaweek
PATTERN (X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price))
Y AS (price > PREV(price))
days
X Y
Stock price
Example:FindDoubleBottom(W)
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SQLPatternMatching
• Finddoublebottom(W)patternsandreport:
• Beginningandendingdateofthepattern
• AveragePriceIncreaseinthesecondascent
• Modifythesearchtofindonlypatternsthatlastedlessthanaweek
daysSELECT first_x, last_zFROM ticker MATCH_RECOGNIZE (
PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x
LAST(z.time) AS last_zONE ROW PER MATCHPATTERN (X+ Y+ W+ Z+)DEFINE X AS (price < PREV(price))
Y AS (price > PREV(price))W AS (price < PREV(price))Z AS (price > PREV(price))
X Y W Z
Stock price
Example:FindDoubleBottom(W)
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SQLPatternMatching
1 9 13 19 days
Stock price
SELECT first_x, last_zFROM ticker MATCH_RECOGNIZE (
PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x,
LAST(z.time) AS last_zONE ROW PER MATCHPATTERN (X+ Y+ W+ Z+)DEFINE X AS (price < PREV(price)),
Y AS (price > PREV(price)),W AS (price < PREV(price)),Z AS (price > PREV(price)))
First_x Last_z
1 9
13 19
• Finddoublebottom(W)patternsandreport:
• Beginningandendingdateofthepattern
• AveragePriceIncreaseinthesecondascent
• Modifythesearchtofindonlypatternsthatlastedlessthanaweek
Example:FindDoubleBottom(W)
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
} else {next = lineNext.getQuantity();
}
if (!q.isEmpty() && (prev.isEmpty() || (eq(q, prev) && gt(q, next)))) {state = "S";return state;
}
if (gt(q, prev) && gt(q, next)) {state = "T";return state;
}
if (lt(q, prev) && lt(q, next)) {state = "B";return state;
}
if (!q.isEmpty() && (next.isEmpty() || (gt(q, prev) && eq(q, next)))) {state = "E";return state;
}
if (q.isEmpty() || eq(q, prev)) {state = "F";return state;
}
return state;}
private boolean eq(String a, String b) {if (a.isEmpty() || b.isEmpty()) {
return false;}return a.equals(b);
}
private boolean gt(String a, String b) {if (a.isEmpty() || b.isEmpty()) {
return false;}return Double.parseDouble(a) > Double.parseDouble(b);
}
private boolean lt(String a, String b) {if (a.isEmpty() || b.isEmpty()) {
return false;}return Double.parseDouble(a) < Double.parseDouble(b);
}
public String getState() {return this.state;
}}BagFactory bagFactory = BagFactory.getInstance();
@Overridepublic Tuple exec(Tuple input) throws IOException {
long c = 0;String line = "";String pbkey = "";V0Line nextLine;V0Line thisLine;V0Line processLine;V0Line evalLine = null;V0Line prevLine;boolean noMoreValues = false;String matchList = "";ArrayList<V0Line> lineFifo = new ArrayList<V0Line>();boolean finished = false;
DataBag output = bagFactory.newDefaultBag();
if (input == null) {return null;
}if (input.size() == 0) {
return null;}Object o = input.get(0);if (o == null) {
return null;}
//Object o = input.get(0);if (!(o instanceof DataBag)) {
int errCode = 2114;String msg = "Expected input to be DataBag, but"
SELECT first_x, last_zFROM ticker MATCH_RECOGNIZE (
PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x,
LAST(z.time) AS last_zONE ROW PER MATCHPATTERN (X+ Y+ W+ Z+)DEFINE X AS (price < PREV(price)),
Y AS (price > PREV(price)),W AS (price < PREV(price)),Z AS (price > PREV(price) AND
z.time - FIRST(x.time) <= 7 ))
250+LinesofJava 12LinesofSQL
Lesscode,easiertomaintain,fastertowrite
SQLPatternMatchingMorepowertodirectlyappliedtoyourdata
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
PL/SQLinSQLPL/SQLfunctionsembeddedin“with”clause
WITHFUNCTION get_domain(url VARCHAR2) RETURN VARCHAR2 ISpos BINARY_INTEGER;len BINARY_INTEGER;
BEGINpos := INSTR(url, 'www.');len := INSTR(SUBSTR(url, pos + 4), '.') - 1;RETURN SUBSTR(url, pos + 4, len);
END;SELECTDISTINCT get_domain(catalog_url)
FROMorders;
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
IDENTITYAutoincrementforOracle
• Createatablewithanidcolumnthatisalwayspopulated
• Createatablewithanidcolumnthatispopulatedifnotprovided
CREATE TABLE t1(id NUMBER GENERATED AS IDENTITY,first_name VARCHAR2(30)
);
CREATE TABLE t2(id NUMBER GENERATED BY DEFAULT AS IDENTITY
(START WITH 100 INCREMENT BY 10),first_name varchar2(30)
);
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
32kVARCHAR2/NVARCHAR2Longerstringstostore
• Enable32kVARCHAR2support
• Createatablewith32kVARCHAR2
ALTER SYSTEM set MAX_STRING_SIZE = EXTENDED scope = SPFILE;
CREATE TABLE Applicants(id NUMBER GENERATED AS IDENTITY,first_name VARCHAR2(30),last_name VARCHAR2(30),application DATE,CV VARCHAR2(32767)
);
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
RowLimitSQLStandardforrowlimiting
• Selectonlythefirst5rows
• Selectonlythefirst5%ofrowsincludingrowsthat“tie”
SELECT employee_id, last_nameFROM employeesORDER BY employee_idFETCH FIRST 5 ROWS ONLY;
SELECT employee_id, last_name, salaryFROM employeesORDER BY salaryFETCH FIRST 5 PERCENT ROWS WITH TIES;
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
PolymorphicTables: Self-Describing,FullyDynamicSQL• PartofANSI2016• Encapsulatesophisticatedalgorithms
– Hidesimplementationofalgorithms
– Leveragepowerful,dynamiccapabilitiesofSQL
– Passinanytable-columnsforprocessing
– ReturnsSQLrowset (table,JSON,XMLdocetc.)
• E.g.returncreditscoreandassociatedrisklevel
79
CREDITRISKALGORITHM
SQLQUERY
POLYMORPHIC TABLEFUNCTION
INPUTS:
TABLE JSONXML ANALYTICVIEW
SELECT state_id, . . ., AVG(credit_score), riskFROM CREDIT_RISK(
tab => scott.customers,cols => columns(dob, zip,loan_default),outs => columns(credit_score, risk_level))
WHERE risk_level = ‘High’GROUP BY state_id;
SCOTT.CREDIT_RISK
HHHH
STATE_ID RISKA_SCOREPOP LOANS A_LOAN
OracleConfidential – Internal
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• JMSsupport
• PL/SQL,OCI,JDBC,.NETsupport• IntegratedwiththeDatabase• MessagingGateway
OracleAdvancedQueuing(AQ)MessagingandNotificationintheDatabase
PL/SQL
JMS
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Asinglelogicalqueuewithmany�shards�– A�shard� isawayofobtaininghigherconcurrencyandthroughputviahorizontalpartitioning.
• Automaticmanagementofsessionaffinitytoshards
• Automaticmanagementoftablepartitionstoavoidcontention
• Automaticmanagementofpartitioninstanceaffinity
• Integratedwiththedatabasetooptimizeperformance
AQ-JMSShardedQueuesNewwith12.1.0.2
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Higherthroughput• Lesssystemresourceconsumption
• Manyenqueuers anddequeuers acrossmultipleRACinstances
• Largenumberofsubscribers
AQ-JMSShardedQueuesKeybenefits
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
AQShardedQueuesArchitectureforScalabilityandPerformance
Instance1
PartShardENQ DEQ
PartShardENQ DEQ
PartShardENQ DEQ
Instance2
Instance3
SinglelogicalqueuemodelPhysicalQueue:partitionsmappedtoshardswithinstanceaffinityonRAC
ENQ
ENQ
ENQ
DEQ
DEQ
DEQ
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Higherthroughput• Lesssystemresourceconsumption
• Largenumberofsubscribers
• Event-basedlistenerwithfewerdatabaseconnections• Manyconcurrentenqueuers anddequeuers acrossmultipleRACinstances
• BackwardsCompatibleforStandardJMSbasedapplications– justrecreatetheAQinthedatabase
AQ-JMSShardedQueuesKeybenefits
1,024
2,048
4,096
8,192
16,384
32,768
65,536
131,072
1 2 4 8 16 32 64 128
dequ
eues
/sec
ond
dequeuer threads
Nonsharded - 1node
Sharded- 4nodes
JMS Queue withsame number of enq and deq threadscommitting after every
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViews
OracleConfidential – Internal/Restricted/HighlyRestricted 85
• Movesbusinesslogic(Aggregations,Hierarchies,Calculations)backintodatabase
• SimpleSQLforcomplexanalyticqueries– nojoinsorGROUP-BYclausesnecessary
• Worksontopofpre-existingtablesorviews– nopersistentstorage
• Built-indatavisualizationviaAPEX
Copyright©2016 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViews
• AnewtypeofviewintheOracleDatabase– BusinessmodelandcalculationrulesareembeddedwithintheAnalyticView
• AnalyticViewsaseasilyqueriedwithsimple SQLandMDX–WithasmartAnalyticView,SQLgenerationiseasy–MDXProvider(OLEDBforOLAP)supportsExcelPivotTableconnections
• Accessdatafromtables,views,externaltablesandBigDataSQL– UseAnalyticViewstoorganizeandpresentawidevarietyofdata
AnewtypeofviewintheOracleDatabase
86OracleConfidential – InternalandHighlyRestricted
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsEasierAccessToYourData
OracleConfidential – Internal/Restricted/HighlyRestricted 87
CSV
YourData
AnalyticView
Organized&
Enhanced
SQL
SimpleSQL YourApplications
Copyright©2016 Oracleand/oritsaffiliates.Allrightsreserved.|
ThreeNewDatabaseObjects• AttributeDimensions
– Maptodataobjectswithdimension/attributedata
– Identifytherolesofcolumns
• Hierarchies– Organizeslevelsintoaggregationanddrillpaths
– AnewtypeofviewthatcanbequeriedwithSQL
• AnalyticViews– Mapstodataobjectswithfact/measuredata
– AnewtypeofviewthatancanbequerieswithSQLandMDX
Total
Region
Country Country
Region
Country CountryAttributeDimension
DataSources
Attributes
Keys
Levels
DescriptionsAnalyticView
FactTables
Hierarchies
AggregationRules
Measures
Calculations
88OracleConfidential – InternalandHighlyRestricted
Copyright©2016 Oracleand/oritsaffiliates.Allrightsreserved.|
ThreeNewDatabaseObjects• AttributeDimensions • Hierarchies • AnalyticViews
Total
Region
Country Country
Region
Country CountryAttributeDimension
DataSources
Attributes
Keys
Levels
DescriptionsAnalyticView
FactTables
Hierarchies
AggregationRules
Measures
Calculations
89OracleConfidential – InternalandHighlyRestricted
CREATE OR REPLACE HIERARCHY time_hierCLASSIFICATION caption VALUE 'CALENDAR'CLASSIFICATION description VALUE'CALENDAR'
USING time_attr_dim(month CHILD OFquarter CHILD OFyear)
CREATE OR REPLACE ATTRIBUTE DIMENSION time_attr_dimUSING time_dimATTRIBUTES(year_id
CLASSIFICATION caption VALUE 'YEAR_ID'CLASSIFICATION description VALUE 'YEAR ID',
year_nameCLASSIFICATION caption VALUE 'YEAR_NAME'CLASSIFICATION description VALUE 'Year', …)
LEVEL monthCLASSIFICATION caption VALUE 'MONTH'CLASSIFICATION description VALUE 'Month'KEY month_id…DETERMINES (month_end_date,quarter_id,season,season_order,month_of_year,month_of_quarter) …
CREATE OR REPLACE ANALYTIC VIEW sales_avCLASSIFICATION caption VALUE 'Sales AV'CLASSIFICATION description VALUE
'Sales Analytic View'CLASSIFICATION created_by VALUE 'George Jones'
USING sales_factDIMENSION BY(time_attr_dimKEY month_id REFERENCES month_idHIERARCHIES (time_hier DEFAULT,time_season_hier,time_year_season_hier,time_month_of_qtr_hier),…
)MEASURES(sales FACT sales
CLASSIFICATION caption VALUE 'Sales'CLASSIFICATION description VALUE 'Sales'CLASSIFICATION format_string
VALUE '$999,999,999,999.99',units FACT unitsCLASSIFICATION caption VALUE 'Units'CLASSIFICATION description VALUE 'Units Sold'CLASSIFICATION format_string
VALUE '999,999,999,999', …
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsOrganizeandEnhanceData
• Transformsdataintoabusinessmodelandpresentationlayerinthedatabase– Dataisorganizedforeasyaccessandnavigation– Dataiseasilyextendedwithinterestingcalculationsandaggregations– DataiseasilyqueriedwithsimpleSQL
• EasilydefinedwithSQL– CompleteapplicationsdefinedwithjustafewSQLstatements– SupportedbySQLDeveloper
OracleConfidential – Internal/Restricted/HighlyRestricted 90
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsBetterforEveryone
• Forthedatawarehousearchitectanddeveloper– Easilyextendstarschemawithaggregatedataandcalculations
• Fortheapplicationdeveloper– SimplifiesmetadatamanagementandSQLgeneration
• Forthebusinessuser– Built-in,browser-baseddatavisualizationviaAPEXapplication
OracleConfidential – Internal/Restricted/HighlyRestricted 91
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViews• Howwouldyoubuildthisapplication?– AnalysisofhealthinsurancecoverageratesintheUnitedStates
– Coverageratesbytime,countiesandstates
– Geographiccomparisons–Measureimprovementovertime– Interactivedatavisualizationtoolsforendusers
OracleConfidential – Internal/Restricted/HighlyRestricted 92
HealthInsuranceCoverageRatesbyState,2014
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViews• Thisapplicationcanbebuiltwith5SQLstatements– Create2hierarchies(4SQLstatements)– Create1analyticview(1SQLstatement)
• InstantlyaccessibleviaAPEXbaseddatavisualizer
• EntirelyintheDatabase
OracleConfidential – Internal/Restricted/HighlyRestricted 93
DataTables,Views,etc.
AnalyticView
Simple SQL
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 94
FactdataisselectedfromanalyticviewsusingSQL
Analyticviewsareviewsontopofastarschema.
Nostoragestructures
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'STATE')ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 95
TheHIERARCHIESclausespecifiesthedimensionsandhierarchiesforthisquery
NoJOINorGROUPBYclausesinanalyticviewqueries
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'STATE'ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 96
Standardizedcolumnssuchas‘member_name’areselected
fromthehierarchies
Atypicalstarquerywouldinsteadselectacolumnsuchas
‘time.year’
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'STATE'ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 97
LevelsofaggregationarespecifiedintheWHEREclause
Whenfilteringonthelevel‘State’forthetimehierarchy,
themembernamedwillincludeCalifornia,NewYork,etc
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'STATE'ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 98
Todrill,justupdatetheWHEREclause.Everythingelseremains
thesame.
Thecalculationsautomaticallyusenewhierarchylevels.
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'COUNTY'ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsSimpleSQL
OracleConfidential – Internal/Restricted/HighlyRestricted 99
SELECT time_hier.member_name AS TIME,geog_hier.member_name AS GEOGRAPHY,pct_insured_diff_us_avg
FROM insured_av HIERARCHIES(time_hier,geog_hier)WHERE time_hier.level_name = 'YEAR'AND geog_hier.level_name = 'COUNTY'ORDER BY time_hier.hier_order ,geog_hier.hier_order;
Toselectacalculation,justselectcolumns
Calculationsareexpressintheanalyticviewsotheycanjustbe
selectedinthequery
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsEmbeddedCalculations
• Easilycreatenewmeasures– Simplifiedsyntaxbasedonbusinessmodel
– Includesdimensionalandhierarchicalfunctions
100OracleConfidential– Internal
SHARE_OF(pct_uninsured HIERARCHYgeog_hierMEMBER country ['USA']) – 1)
AddPercentUninsuredDifferencefromUSAveragewith
asinglelineofcode
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
AnalyticViewsEmbeddedCalculations
101OracleConfidential– Internal
LAG_DIFF_PERCENT(pct_insured)OVER (HIERARCHY time_hierOFFSET 1 ACROSS ANCESTOR AT LEVEL year)
Addtimeseriescalculationswithasinglelineofcode
Copyright©2016 Oracleand/oritsaffiliates.Allrightsreserved.| 102
“Standard”andAnalyticViews“Standard”View Analytic View
Data Sources(FROM) Yes Yes
Joins Yes Yes
BusinessModel-BasedCalculations No Yes
Automatic HierarchicalColumns No Yes
AutomaticMulti-LevelAggregation No Yes
AutomaticFilterExpansion No Yes
AutomaticOuterJoin No Yes
AutomaticOrderofCalculation No Yes
PresentationMetadata No Yes
OracleConfidential – InternalandHighlyRestricted
Copyright©2016 Oracleand/oritsaffiliates.Allrightsreserved.|
MachineLearningandAdvancedAnalytics
• MachineLearningAlgorithmsavailablesince9iRelease2(2002)• Newalgorithmsin18
– RandomForestsforClassification
– NeuralNetworksforbothclassificationandregression– ExplicitSemanticAnalysisMLalgorithmextendedtosupportclassification
– TimeSeriesviaExponentialSmoothing
– CURdecomposition-basedalgorithmforattributeandrowimportance
• New abilitytoexportMLmodelstoCandJavaforapplicationsdeployment
OracleConfidential – Internal
Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|
PropertyGraphImprovements
• PGQL– PropertyGraphQueryLanguage– SQL-like declarative language to queryin-memoryand in-database PropertyGraph
– Supportsgraph patternmatchingand recursivepath queries
– Proposingas ISOstandard;Languageis alsolicensed underApachehttps://github.com/oracle/pgql-lang
• In-memoryvirtualcolumnsforRDFGraph– Upto100Xfasterqueriesperformance
• RDFGraphnetworksnowsupportlist-hashcompositepartitioning– 5to10timesqueryperformanceimprovement
PGQL
SQL WITH temp(device_id, device_name) AS (-- Anchor member:SELECT device_id, nameFROM DevicesWHERE name = 'Regulator, HVMV_Sub_RegB‘
UNION ALL-- Recursive member:SELECT Devices.device_id, Devices.nameFROM temp, Devices, Connections conn1,
Connections conn2, ConnectorsWHERE temp.device_id = conn1.to_device_id
AND conn1.from_connector_id = Connectors.connector_id
AND Connectors.connector_id = conn2.from_connector_id
AND conn2.to_device_id = Devices.device_idAND temp.device_id != Devices.device_id)
CYCLE device_id SET cycle TO 1 DEFAULT 0SELECT DISTINCT device_nameFROM tempWHERE cycle = 0AND device_name = 'Regulator, HVMV_Sub_RegB'
PATH connects_to := (from) <- (connector) -> (to)SELECT y.nameWHERE (x:Device) -/:connects_to*/-> (y:Device),
x.name = 'Regulator, HVMV_Sub_RegB'),x != y
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONSupport
105Public
Copyright©2015 Oracleand/oritsaffiliates.Allrightsreserved.|
JSONQueriesusingSQL• SimpleQueries
• AdvancedqueriesusingJSONpathexpressions
– ComplieswithSQL:2016syntax
106
SELECT j.PO_DOCUMENTFROM J_PURCHASEORDER jWHERE j.PO_DOCUMENT.PONumber = 1600;
SELECT JSON_VALUE(PO_DOCUMENT, '$.LineItems[0].Part.UnitPrice’ returning NUMBER(5,3))
FROM J_PURCHASEORDER pWHERE JSON_VALUE(PO_DOCUMENT, '$.PONumber' RETURNING
NUMBER(10)) = 1600;
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONintegrationwithPL/SQL• NewPL/SQLobjectsenablefinegrainedmanipulationofJSONcontent
– JSON_OBJECT_T :forworkingwithJSONobjects– JSON_ARRAY_T :forworkingwithJSONArrays– JSON_OBJECT_TandJSON_ARRAY_TaresubtypesofJSON_ELEMENT_T
• TheseobjectsprovideasetofmethodsformanipulatingJSON
• PiecewiseupdatesofJSONdocumentsnowsupportedinPL/SQL
Public 107
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONintegrationwithPL/SQLWITH FUNCTION updateTax(JSON_DOC in VARCHAR2 ) RETURN VARCHAR2 IS
jo JSON_OBJECT_T; price NUMBER;taxRate NUMBER;
BEGINjo := JSON_OBJECT_T(JSON_DOC);taxRate := jo.get_Number('taxRate');price := jo.get_Number('total');jo.put('totalIncludingTax', price * (1+taxRate));RETURN jo.to_string();
END;ORDERS AS (
SELECT '{"taxRate":0.175,"total":10.00}' JSON_DOCUMENT FROM dual
)SELECT JSON_DOCUMENT, updateTax(JSON_DOCUMENT)FROM ORDERS;
JSON_DOCUMENT UPDATETAX(JSON_DOCUMENT)------------------------------- ---------------------------------------------------------{"taxRate":0.175,"total":10.00} {"taxRate":0.175,"total":10.00,"totalIncludingTax":11.75}
Public 108
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
DataGuide:UnderstandingyourJSONdocuments
• Metadatadiscovery:discoversthestructureofcollectionofJSONdocuments–Optional:deepanalysisofJSONforListofValues,ranges,sizingetc.
• AutomaticallyGenerates– Virtualcolumns– Relationalviews
• De-normalizedrelationalviewsforarrays
– Reports/SynopsisofJSONstructure
Public 109
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 110
DataGuide:AutomaticSchemaInference
SQL> desc MOVIE_TICKETSNAME TYPE--------------------- -----------BOOKING_ID RAW(16)BOOKING_TIME TIMESTAMP(6) BOOKING_DETAILS VARCHAR2(4000)
TablecontainingJSONdocuments
JSONDataGuide Tableenhancedwithvirtualcolumns
SQL> desc MOVIE_TICKETSNAME TYPE--------------------- -----------BOOKING_ID RAW(16)BOOKING_TIME TIMESTAMP(6) BOOKING_DETAILS VARCHAR2(4000)BOOKING_DETAILS$Movie VARCHAR2(16)BOOKING_DETAILS$Theater VARCHAR2(16)BOOKING_DETAILS$Adults NUMBERBOOKING_DETAILS$Time VARCHAR2(32){
"Theater":"AMC 15","Movie":"Jurrasic World 3D","Time“:2015-11-26T18:45:00","Tickets":{
"Adults":2}
}
DBMS_JSON.AddVC( ‘MOVIE_TICKETS’,‘BOOKING_DETAILS’);
Public
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONSearchIndex:AuniversalindexforJSONcontent
• Supports searching on JSON using key, path and value• Supports range searches on numeric values• Supports full text searches:
– Full boolean search capabilities (and, or, and not)– Phrase search, proximity search and "within field" searches.– Inexact queries: fuzzy match, soundex and name search.– Automatic linguistic stemming for 32 languages– A full, integrated ISO thesaurus framework
Public 111
CREATE SEARCH INDEX JSON_SEARCH_INDEXON J_PURCHASEORDER (PO_DOCUMENT) FOR JSON;
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
QueryOptimizationsforJSONExadata SmartScans• Exadata SmartScansexecuteportionsofSQLqueriesonExadata storagecells
• JSONqueryoperations ‘pusheddown’ toExadatastoragecells• Massively parallelprocessing ofJSONdocuments
In-MemoryColumnarStore• Virtualcolumns, included thosegeneratedusing JSONDataGuide loadedintoIn-MemoryVirtualColumns
• JSONdocuments loadedusingahighlyoptimized In-Memorybinaryformat
• QueryoperationsonJSONcontentautomaticallydirectedtoIn-Memory
Public 112
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
NativeJSONGeneration
• JSONgenerationfunctionsavailable:– JSON_OBJECT/JSON_OBJECTAGG– JSON_ARRAY/JSON_ARRAYAGG
Public 113
SQL> SELECT JSON_OBJECT('Id' is EMPLOYEE_ID, 'FirstName' is FIRST_NAME,2 'LastName' is LAST_NAME) JSON3 FROM HR.EMPLOYEES4 WHERE EMPLOYEE_ID = 100;
JSON------------------------------------------------------------------------------{ "Id" : 100 , "FirstName" : "Steven" , "LastName" : "King" }
SQL>
Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|
JSONEnhancements
• GeneratelargeJSONdocumentsfromrelationaldata– JSONgenerationextendedtosupportsLOB’s
• NewSODA(SimpleOracleDocumentAccess)drivers– OCIandPL/SQLnowadded,inadditionaltoJSONandREST– Simple,non-relational(‘nosql-like’)APIforaccessingJSONdata
• NewTREAT(<expression>ASJSON)operator– DynamicallydeclareoperandstobehandledasJSONdata,enablingmoreseamlessJSONoptimizations
• ExtendedkeylengthforJSONsearchindexes– Raisethekeylengthfrom64bytesto255bytes;enablesfastersearchqueriesforJSONobjectscontaininglongkeynames.
114
SimplerdevelopmentofJSON-centricapplicationsusingOracleDatabase
OracleConfidential– Internal
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
Multitenant
115Public
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
OracleDataandUserDataBefore12.1:Oracleanduserdataintermingleovertime
• NewdatabasecontainsOraclemeta-dataonly
• Populatedatabasewithuserdata– Oracleandcustomermeta-dataintermingled
– Portabilitychallenge!
• Multitenantfix:Horizontally-partitioneddatadictionary– OnlyOracle-suppliedmeta-dataremainsinroot
RootPDB
Meta-Data UserData
OBJ$ TAB$ SOURCE$
…
OBJ$
…
TAB$ SOURCE$ DEPTEMP
Public 116
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
ApplicationContainers
Public 117
thebrooklyn beanV2
ProgramsreplicatedacrossPDBs
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
• ApplicationContainercomprises– ApplicationRoot(Master)– ApplicationPDBs(foreachTenant)– ApplicationSeed(forprovisioning)
• PDBsshareapplicationobjects– Code,metadataanddata
• Furthersimplifiesmanagement– Applyupdatestoapplicationcontainer– SynctenantPDBsfromcentralmaster
• Suitableforallapplications– SaaS,franchise,divisional,etc.
Public 118
ApplicationContainersRootcontainerforyourapplications
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
ApplicationContainers
Public 119
Share&propagateacrossmultiplePDBs
AccountType
• Credit• Debit• Check• Savings
BankAccount
Person
BankCard
PDB$SEED APPROOT PDB1 PDB2 PDB3
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
WhatisanApplicationContainer?
• AnApplicationcontainerisacollectionofPDBsconsistingofApplicationRootandallApplicationPDBsassociatedwithit
Public 120
CDB$ROOT
App Root AppPDB 1 AppPDB 2 PDB1
CDB$ROOT
APP Root PDB1
AppPDB 1 AppPDB 2
PhysicalRepresentationLogicalRepresentation
Copyright©2014Oracleand/oritsaffiliates.Allrightsreserved.|
ApplicationContainers
• ApplicationRootPDBfordefiningapplicationmaster–MetadataandcommondatasharedacrosstenantPDBs
• Installonecopyofyourapplication• InstantprovisioningofanApplicationPDB/Tenant(withaseedPDB)• ContainerDataviewsforreportingacrossPDBs(CONTAINERSclausebased)• Supportsin-placesimplepatching
• SupportsUnplug/PlugupgradeacrossApplicationRoot
Public 121
ThefutureofDatabaseApplicationDevelopment
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Sharding
122Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
OracleDatabaseSharding
123
OracleDatabaseforweb-scaleapplications
Onegiantdatabasepartitionedintomanysmalldatabases(shards)
CustomersAmericas
Customers
Customers Europe
CustomersAsia
• RACandDataGuardmeetneedsofover99%ofapplicationswhilepreservingapplicationtransparency
• SomeGlobal-ScaleOLTPapplicationsprefertoshardmassivedatabasesintoafarmofsmallerdatabases
– Avoidscalabilityoravailabilityedgecasesofasinglelargedatabase
– Willing tocustomizedatamodelandapplicationstoenabletransactionstobeautomaticallyroutedtotherightshard
• NativeSQLforsharding tablesacrossupto1000Shards- RoutingofSQLbasedonshardkey,andcrossshardqueries
- Onlineadditionandreorganizationofshards- Linearscalabilityofdata,workload,userswithisolation
Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ApplicationSuitabilityforShardingOLTPApplicationswiththeFollowingCharacteristics
• Applicationsformassivescale– E.g.e-commerce,mobile,socialetc.
• Applicationsmustbeshard-aware
• Primaryusagepattern– Single-shardoperationsbasedonshardkey,e.g.customer_id,account_idetc.
124Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 125
OracleSharding AutomatedDistributionEnhancedSQLsyntaxforSharding…
CREATE SHARDED TABLE Customers( CustId VARCHAR2(60) NOT NULL, FirstName VARCHAR2(60), LastName VARCHAR2(60),…
PRIMARY KEY(CustId),)PARTITION BY CONSISTENT HASH (CustId)…
• SQLsyntaxforcreatingsharded tables• NotproprietaryAPIsaswithNoSQL
• Creation of ashardedtable automaticallypartitionsdataacrossshards
• Transparentresharding asdatagrows• Choice ofsharding methods:
• Systemmanaged- consistenthash• User defined- range,list• Composite- range-hash,list-hash
• Commonreferencedata(e.g.PriceList)isautomaticallyduplicatedonallshards
• Supportsshardplacementinspecificgeographiestosatisfygovernmentdataprivacy
…
…
Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|126
ShardedSchema
Customers Orders LineItems
Products
Sharded
Duplicated
Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ShardedTableFamily– EnhancedSQLDDLSyntax
CREATE LOOKUP TABLE Products( SKU NUMBER(4) PRIMARY KEY, Product VARCHAR2(20), Price NUMBER(6,2)) )TABLESPACE dupl ;
CREATE SHARDED TABLE Customers( CustNo NUMBER NOT NULL,
Name VARCHAR2(50), ….Class VARCHAR2(3), CONSTRAINT RootPK PRIMARY
KEY(CustNo))PARTITION BY CONSISTENT HASH (CustNo) PARTITIONS AUTO TABLESPACE SET ts1 ;
CREATE SHARDED TABLE Orders ( OrderNo NUMBER(5),
CustNo NUMBER(3),OrderDate DATE ,…CONSTRAINT CustFK FOREIGN KEY
(CustNo)REFERENCES Customers(CustNo)
)PARTITION BY REFERENCE (CustFK) ;
127Public
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
CoordinatorDB
App Tier
RoutingTier
128
RoutingSupportonClientforHighestSpeed
ApplicationServer
ShardDirectors
• Clientspassshardingkey(e.g.CustomerID)toConnectionpool,connectionisroutedtotherightshard
• Fast:cachingkeyrangesonclientensuresthatmostaccessesgodirectlytotheshard
• Scalable:easilyscaleswithmoreclientsandshards
• SupportsUCP,OCI,ODP.NET,andJDBC
Shardingkey
…
…
Public
DataTier
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
DataTier
129
• IfclientdoesnotpassshardkeytoConnectionpool,theconnectionismadetothe coordinatordatabase
• CoordinatorparsesSQLandwillproxy/routerequesttooneormoreshards
• Supportsshardpruningandscatter-gather
• Fordeveloperconvenienceandnotforhighperformance
• SupportsmanybutnotallQueries
• NoUpdatesupport
CoordinatorDB
App Tier
RoutingTier
ApplicationServer
ShardDirectors
…
…
Public
Non-ShardKeyAccess&Cross-ShardQueries
Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.|
EZConnect Improvements• SimplificationofEasyConnectsyntax
• EasyConnectadaptorwillnowacceptalistofnamevaluepairs– Forexample:SDU,RETRY_COUNT,CONNECT_TIMEOUT,etc.)
• Willnowenablemultiplehosts/portsintheconnectstring– Typicallyusedinload-balancingclientconnections.
OracleConfidential–Internal
130
$> sqlplus soe/soe@(DESCRIPTION= (ADDRESS_LIST=(LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver2)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver3)(PORT=1522))) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.|
EZConnect Improvements• SimplificationofEasyConnectsyntax
• EasyConnectadaptorwillnowacceptalistofnamevaluepairs– Forexample:SDU,RETRY_COUNT,CONNECT_TIMEOUT,etc.)
• Willnowenablemultiplehosts/portsintheconnectstring– Typicallyusedinload-balancingclientconnections.
OracleConfidential–Internal
131
$> sqlplus soe/soe@(DESCRIPTION= (ADDRESS_LIST=(LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver2)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver3)(PORT=1522))) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
$> sqlplus soe/soe@//salesserver1,salesserver2,salesserver3:1522/sales.us.example.com
Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.|
EZConnect Improvements• SimplificationofEasyConnectsyntax
• EasyConnectadaptorwillnowacceptalistofnamevaluepairs– Forexample:SDU,RETRY_COUNT,CONNECT_TIMEOUT,etc.)
• Willnowenablemultiplehosts/portsintheconnectstring– Typicallyusedinload-balancingclientconnections.
OracleConfidential–Internal
132
$> sqlplus soe/soe@(DESCRIPTION= (ADDRESS_LIST=(LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver2)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver3)(PORT=1522))) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
$> sqlplus soe/soe@//salesserver1,salesserver2,salesserver3:1522/sales.us.example.com$> sqlplus soe/soe@(DESCRIPTION=(retry_count=3) (connect_timeout=60)(transport_connect_timeout=30) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.|
EZConnect Improvements• SimplificationofEasyConnectsyntax
• EasyConnectadaptorwillnowacceptalistofnamevaluepairs– Forexample:SDU,RETRY_COUNT,CONNECT_TIMEOUT,etc.)
• Willnowenablemultiplehosts/portsintheconnectstring– Typicallyusedinload-balancingclientconnections.
OracleConfidential–Internal
133
$> sqlplus soe/soe@(DESCRIPTION= (ADDRESS_LIST=(LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver2)(PORT=1522)) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver3)(PORT=1522))) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
$> sqlplus soe/soe@//salesserver1,salesserver2,salesserver3:1522/sales.us.example.com$> sqlplus soe/soe@(DESCRIPTION=(retry_count=3) (connect_timeout=60)(transport_connect_timeout=30) (ADDRESS=(PROTOCOL=tcp)(HOST=salesserver1)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))
$> sqlplus soe/soe@//salesserver1:1521/sales.us.example.com?connect_timeout=60& transport_connect_timeout=30&retry_count=3
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
OverviewandHistory
Vision
DataManagementStrategy
OracleandModernDevelopment
OpenSourceinitiatives
Developercentricfunctionalities
Q&A
1
2
3
4
5
134
6
7
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 135
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 136