SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
1 | © 2014 Oracle Corporation –
Proprietary and Confidential
Application Development with Oracle NoSQL Database 3.0
Anuj Sahni, Principal Product Manager
2 | © 2014 Oracle Corporation –
Proprietary and Confidential
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.
3 | © 2014 Oracle Corporation –
Proprietary and Confidential
Agenda
• Introduce Table based data modeling feature
 Discuss its benefits
 How to use it (DDL & DML)
• How to approach data modeling (in real world situations)
 Email Client App as driver
 Schema design & deployment
 Queries into Data access methods
• Architecture
• Demo
4 | © 2014 Oracle Corporation –
Proprietary and Confidential
What is Being Proposed?
• Table Based Model
– On top of key/value model
– Allow choice of modeling constructs
– Introduces strongly typed fields
– APIs for table access
– Administrative CLI for table creation
• Secondary Indices
– Indexes rely on table model
– Allows composite index keys
– APIs for value and range access by secondary key
5 | © 2014 Oracle Corporation –
Proprietary and Confidential
Why Table Model ?
• Simplify application data modeling
– Tables and well-defined data types are familiar concepts
– Allows thinking in data types vs raw byte values
– Transparently handles key structure and serialization
– Easily maps to/from JSON
– Data types and some structure are required for secondary indices
6 | © 2014 Oracle Corporation –
Proprietary and Confidential
Developing Applications
• Major-Minor ( hash – local )
• Keep small ( memory ), align with queries
Data Modeling
userid
addresssubscriptions
email idphone #expiration date
Major key:
Minor key:
Value:
Strings
Byte Array 
Value Options: Binary JSON RDF Triples Tables/Rows
picture
.jpg
8 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 1 – Key/Value Paradigm
Simple Data Model
Key Space : /user/userId
Value : {
“name" : “User",
"namespace" : "com.company. avro",
"type" : "record",
"fields": [
{"name": “userId", "type": “Integer", "default": 0},
{"name": “firstName", "type": “String", "default": ""},
{"name": “lastName", "type": “String", "default": ""}
]
}
9 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 1 – Table Paradigm
userId firstName lastName
Simple Data Model
Table Name : User
Major Key
Denotes Shard
Primary Key “Value”
10 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 1 – Simple Data Model
DDL
kv-> table create -name User -desc "A sample user table"
User-> add-field -type Integer -name userId
User-> add-field -type String -name firstame
User-> add-field -type String -name lastName
User-> primary-key -name userId
User-> exit
Table User built.
kv-> plan add-table -name User –wait
kv-> plan add-index -name UserSecondary -table User -field firstName –field lastName
Create Table with id,
firstName, lastName
columns.
Add index on
firstName, lastName
columns.
11 | © 2014 Oracle Corporation –
Proprietary and Confidential
How to Describe It ?
DDL
kv-> show tables -name User
{ "type" : "table",
“name" : "User", "id" : "r",
"description" : “A sample user table”,
"shardKey" : [ "userId" ],
"primaryKey" : [ "userId" ],
"fields" : [
{ "name" : “userId", "type" : "Integer" },
{ "name" : "firstName", "type" : "String" },
{ "name" : "lastName", "type" : "String" }
] }
12 | © 2014 Oracle Corporation –
Proprietary and Confidential
How to View Data?
• kvshell-> get table -name User
{ "userId" : “101“, "firstName" : “Adam“, "lastName" : “Smith”}
{ "userId" : “102“, "firstName" : “Zill“, "lastName" : “Matson”}
{ "userId" : “103“, "firstName" : “Nitin“, "lastName" : “Kapoor”}
3 rows returned.
• kvshell-> get table -name User -field userId -value 101
{ "userId" : “101“, "firstName" : “Adam“, "lastName" : “Smith”}
1 row returned
Data Shell
13 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 1 - How does DML looks like?
Search secondary index where firstName = “Jane”
Table userTable = store.getTableAPI().getTable("User", null);
Index index = userTable.getIndex("UserSecondary");
IndexKey indexKey = index.createIndexKey().put("firstName", "Jane");
Iterator<Row> results = apiImpl.tableIterator(indexKey);
while (results.hasNext()) {
Row row = results.next();
/* Convert the row to a JSON object */
String jsonString = row.toJsonString();
/* Convert the JSON object back to a row */
Row myRow = userTable.createRowFromJSON(jsonString);
}
1. Create instance of table object we wish to read from
2. Create instance of index object that we will search
3. Set search key
4. Call iterator to scan index
5. Convert results to JSON object, take JSON object and convert back to Row
14 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 2 – Major/Minor KV Paradigm
User mailbox data
Key Space : /user/id/-/folder/inbox/arrival date
/user/id/-/folder/deleted/arrival date
Value : {
“name" : "Email",
"namespace" : "com.companyX.email.avro",
"type" : "record",
"fields": [
{"name": "from", "type": "string", "default": ""},
{"name": "to", "type": "string", "default": ""},
{"name": "sender", "type": "string", "default": ""},
{"name": "cc", "type": "string", "default": ""},
{"name": "subject", "type": "string", "default": ""},
{“name”: “msgBody”, “type”: “string”, “default”: “”} ] }
15 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 2 – Modeled as Nested Tables
User mailbox data
UserID Folder
Name
Arrival
Date
From To Sender CC Subject Msg
Body
Parent Table Name: User
Major Key
Inherited from parent table
Primary Key “Value”
UserID Primary Key
Major Key
Child Table Name: Folder
16 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 2 - Nested Table (DDL)
Create Table with id, firstName, lastName
kv-> table create –name User.Folder -desc “Mail folders"
folder-> add-field –type String –name folderName
folder-> add-field –type Date –name arrivalDate
folder-> add-field -type String -name from
folder-> add-field -type String -name to
folder-> add-field -type String -name sender
folder-> add-field -type String -name cc
folder-> add-field -type String -name subject
folder-> add-field –type String –name msgBody
folder-> primary-key –name folderName –name arrivalDate
folders-> exit
Table User.folder built.
plan add-index -name userFolderMessage -table User.folder -field userId
-field folderName
17 | © 2014 Oracle Corporation –
Proprietary and Confidential
Example 2 - Nested Table (DML)
Search secondary index where folder name = INBOX for userId=21
TableAPI ampImpl = store.getTableAPI();
Table userTable = apiImpl.getTable("User.Folder“);
Index index = userTable.getIndex(“userFolderMessage ");
IndexKey indexKey = index.createIndexKey();
indexKey.put(“userId", “21");
indexKey.put(“folderName", “inbox");
Iterator<Row> results = apiImpl.tableIterator(indexKey, null, null);
while (results.hasNext()) {
Row row = results.next();
/* Convert the row to a JSON object if desired */
String jsonString = row.toJsonString();
}
1. Get a handle to the child table, through its parent table
2. Create instance of index object and set fields we want to search on
3. Set search key, restrict on “inbox” folder
4. Call iterator to scan index
5. Convert results to JSON object, take JSON object and convert back to Row
18 | © 2014 Oracle Corporation –
Proprietary and Confidential
How to Approach Data Modeling
• Process is not much different from RDBMS
– Business requirements
– Entities & Relationships
– Query access patterns (CRUD, range, ACID)
Email Sample App.
Sender Email Recipients
SENT INBOX
send receive
19 | © 2014 Oracle Corporation –
Proprietary and Confidential
Email Example – RDBMS Schema
ER Diagram
20 | © 2014 Oracle Corporation –
Proprietary and Confidential
Email Example – NoSQL Schema
21 | © 2014 Oracle Corporation –
Proprietary and Confidential
Architecture
Scalable, Available
NoSQLDBDriver
Application
Shard 2
Shard N
Shard 1
NoSQLDBDriver
Application
LoadBalancer
App. Tier Storage TierEmail Client
22 | © 2014 Oracle Corporation –
Proprietary and Confidential
Data Access Layer
• UserDAO
 User Creation - addUser(userTO)
 User Login - getUser(email, password)
• FolderDAO
 Add default folders - addDefaultFolder(userId)
• MessageDAO
 Add email message – addMessage(messageTO)
• UserFolderMessageDAO
 Add messages to designated folders – addMessage(userId, folderId, messageId)
Email Client
23 | © 2014 Oracle Corporation –
Proprietary and Confidential
Join NoSQL Database Community
Twitter
https://twitter.com/#!/OracleNoSQL
LinkedIn
http://www.linkedin.com/groups?gid=4147754
Oracle’s NoSQL DB blog
https://blogs.oracle.com/nosql
Oracle Technology Network
http://bit.ly/1f0d8wU
Developer Webcast Series
http://bit.ly/1doV2jl
Oracle.com/BigData
24 | © 2014 Oracle Corporation –
Proprietary and Confidential

Contenu connexe

Tendances

Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...Tammy Bednar
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsMaria Colgan
 
Database@Home : The Future is Data Driven
Database@Home : The Future is Data DrivenDatabase@Home : The Future is Data Driven
Database@Home : The Future is Data DrivenTammy Bednar
 
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the MapTammy Bednar
 
Biwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labBiwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labCharlie Berger
 
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021Sandesh Rao
 
Database@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use themDatabase@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use themTammy Bednar
 
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...Charlie Berger
 
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)avanttic Consultoría Tecnológica
 
DBCS Office Hours - Modernization through Migration
DBCS Office Hours - Modernization through MigrationDBCS Office Hours - Modernization through Migration
DBCS Office Hours - Modernization through MigrationTammy Bednar
 
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Charlie Berger
 
Oracle Advanced Analytics
Oracle Advanced AnalyticsOracle Advanced Analytics
Oracle Advanced Analyticsaghosh_us
 
APEX – jak vytvořit jednoduše aplikaci
APEX – jak vytvořit jednoduše aplikaciAPEX – jak vytvořit jednoduše aplikaci
APEX – jak vytvořit jednoduše aplikaciMarketingArrowECS_CZ
 
Introduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database ProfessionalsIntroduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database ProfessionalsAlex Gorbachev
 
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...DataWorks Summit
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Alex Gorbachev
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerJeff Smith
 
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...Tammy Bednar
 
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQL
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQLEin Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQL
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQLEDB
 

Tendances (20)

Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
 
Database@Home : The Future is Data Driven
Database@Home : The Future is Data DrivenDatabase@Home : The Future is Data Driven
Database@Home : The Future is Data Driven
 
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map
#dbhouseparty - Spatial Technologies - @Home and Everywhere Else on the Map
 
Biwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labBiwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on lab
 
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021
AutoML - Heralding a New Era of Machine Learning - CASOUG Oct 2021
 
Database@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use themDatabase@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use them
 
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...
Oracle Database House Party_Oracle Machine Learning to Pick a Good Inexpensiv...
 
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)
Meetup Oracle Database MAD_BCN: 1.2 Oracle Database 18c (autonomous database)
 
DBCS Office Hours - Modernization through Migration
DBCS Office Hours - Modernization through MigrationDBCS Office Hours - Modernization through Migration
DBCS Office Hours - Modernization through Migration
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
 
Oracle Advanced Analytics
Oracle Advanced AnalyticsOracle Advanced Analytics
Oracle Advanced Analytics
 
APEX – jak vytvořit jednoduše aplikaci
APEX – jak vytvořit jednoduše aplikaciAPEX – jak vytvořit jednoduše aplikaci
APEX – jak vytvořit jednoduše aplikaci
 
Introduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database ProfessionalsIntroduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database Professionals
 
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...
Database@Home : Data Driven Apps - Data-driven Microservices Architecture wit...
 
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQL
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQLEin Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQL
Ein Expertenleitfaden für die Migration von Legacy-Datenbanken zu PostgreSQL
 

Similaire à Application development with Oracle NoSQL Database 3.0

Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revisedMongoDB
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessMongoDB
 
Do More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseDo More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseEDB
 
Semi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented DatabasesSemi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented DatabasesDaniel Coupal
 
NoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresNoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresEDB
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
Apache doris (incubating) introduction
Apache doris (incubating) introductionApache doris (incubating) introduction
Apache doris (incubating) introductionleanderlee2
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Manage online profiles with oracle no sql database tht10972 - v1.1
Manage online profiles with oracle no sql database   tht10972 - v1.1Manage online profiles with oracle no sql database   tht10972 - v1.1
Manage online profiles with oracle no sql database tht10972 - v1.1Robert Greene
 
Building Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesBuilding Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesMapR Technologies
 
Getting Started with NoSQL
Getting Started with NoSQLGetting Started with NoSQL
Getting Started with NoSQLAaron Benton
 
Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Maxime Beugnet
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data TypeMarko Rodriguez
 
The NoSQL Way in Postgres
The NoSQL Way in PostgresThe NoSQL Way in Postgres
The NoSQL Way in PostgresEDB
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
 
New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)Markus Eisele
 
Api's and ember js
Api's and ember jsApi's and ember js
Api's and ember jsEdwin Cruz
 
MongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN StackMongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN StackMongoDB
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 

Similaire à Application development with Oracle NoSQL Database 3.0 (20)

Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
Do More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the EnterpriseDo More with Postgres- NoSQL Applications for the Enterprise
Do More with Postgres- NoSQL Applications for the Enterprise
 
Semi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented DatabasesSemi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented Databases
 
NoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresNoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured Postgres
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
Apache doris (incubating) introduction
Apache doris (incubating) introductionApache doris (incubating) introduction
Apache doris (incubating) introduction
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Manage online profiles with oracle no sql database tht10972 - v1.1
Manage online profiles with oracle no sql database   tht10972 - v1.1Manage online profiles with oracle no sql database   tht10972 - v1.1
Manage online profiles with oracle no sql database tht10972 - v1.1
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
 
Building Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesBuilding Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query Engines
 
Getting Started with NoSQL
Getting Started with NoSQLGetting Started with NoSQL
Getting Started with NoSQL
 
Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...Simplifying & accelerating application development with MongoDB's intelligent...
Simplifying & accelerating application development with MongoDB's intelligent...
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Type
 
The NoSQL Way in Postgres
The NoSQL Way in PostgresThe NoSQL Way in Postgres
The NoSQL Way in Postgres
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
 
New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)
 
Api's and ember js
Api's and ember jsApi's and ember js
Api's and ember js
 
MongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN StackMongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN Stack
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 

Dernier

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Application development with Oracle NoSQL Database 3.0

  • 1. 1 | © 2014 Oracle Corporation – Proprietary and Confidential Application Development with Oracle NoSQL Database 3.0 Anuj Sahni, Principal Product Manager
  • 2. 2 | © 2014 Oracle Corporation – Proprietary and Confidential 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.
  • 3. 3 | © 2014 Oracle Corporation – Proprietary and Confidential Agenda • Introduce Table based data modeling feature  Discuss its benefits  How to use it (DDL & DML) • How to approach data modeling (in real world situations)  Email Client App as driver  Schema design & deployment  Queries into Data access methods • Architecture • Demo
  • 4. 4 | © 2014 Oracle Corporation – Proprietary and Confidential What is Being Proposed? • Table Based Model – On top of key/value model – Allow choice of modeling constructs – Introduces strongly typed fields – APIs for table access – Administrative CLI for table creation • Secondary Indices – Indexes rely on table model – Allows composite index keys – APIs for value and range access by secondary key
  • 5. 5 | © 2014 Oracle Corporation – Proprietary and Confidential Why Table Model ? • Simplify application data modeling – Tables and well-defined data types are familiar concepts – Allows thinking in data types vs raw byte values – Transparently handles key structure and serialization – Easily maps to/from JSON – Data types and some structure are required for secondary indices
  • 6. 6 | © 2014 Oracle Corporation – Proprietary and Confidential Developing Applications • Major-Minor ( hash – local ) • Keep small ( memory ), align with queries Data Modeling userid addresssubscriptions email idphone #expiration date Major key: Minor key: Value: Strings Byte Array  Value Options: Binary JSON RDF Triples Tables/Rows picture .jpg
  • 7. 8 | © 2014 Oracle Corporation – Proprietary and Confidential Example 1 – Key/Value Paradigm Simple Data Model Key Space : /user/userId Value : { “name" : “User", "namespace" : "com.company. avro", "type" : "record", "fields": [ {"name": “userId", "type": “Integer", "default": 0}, {"name": “firstName", "type": “String", "default": ""}, {"name": “lastName", "type": “String", "default": ""} ] }
  • 8. 9 | © 2014 Oracle Corporation – Proprietary and Confidential Example 1 – Table Paradigm userId firstName lastName Simple Data Model Table Name : User Major Key Denotes Shard Primary Key “Value”
  • 9. 10 | © 2014 Oracle Corporation – Proprietary and Confidential Example 1 – Simple Data Model DDL kv-> table create -name User -desc "A sample user table" User-> add-field -type Integer -name userId User-> add-field -type String -name firstame User-> add-field -type String -name lastName User-> primary-key -name userId User-> exit Table User built. kv-> plan add-table -name User –wait kv-> plan add-index -name UserSecondary -table User -field firstName –field lastName Create Table with id, firstName, lastName columns. Add index on firstName, lastName columns.
  • 10. 11 | © 2014 Oracle Corporation – Proprietary and Confidential How to Describe It ? DDL kv-> show tables -name User { "type" : "table", “name" : "User", "id" : "r", "description" : “A sample user table”, "shardKey" : [ "userId" ], "primaryKey" : [ "userId" ], "fields" : [ { "name" : “userId", "type" : "Integer" }, { "name" : "firstName", "type" : "String" }, { "name" : "lastName", "type" : "String" } ] }
  • 11. 12 | © 2014 Oracle Corporation – Proprietary and Confidential How to View Data? • kvshell-> get table -name User { "userId" : “101“, "firstName" : “Adam“, "lastName" : “Smith”} { "userId" : “102“, "firstName" : “Zill“, "lastName" : “Matson”} { "userId" : “103“, "firstName" : “Nitin“, "lastName" : “Kapoor”} 3 rows returned. • kvshell-> get table -name User -field userId -value 101 { "userId" : “101“, "firstName" : “Adam“, "lastName" : “Smith”} 1 row returned Data Shell
  • 12. 13 | © 2014 Oracle Corporation – Proprietary and Confidential Example 1 - How does DML looks like? Search secondary index where firstName = “Jane” Table userTable = store.getTableAPI().getTable("User", null); Index index = userTable.getIndex("UserSecondary"); IndexKey indexKey = index.createIndexKey().put("firstName", "Jane"); Iterator<Row> results = apiImpl.tableIterator(indexKey); while (results.hasNext()) { Row row = results.next(); /* Convert the row to a JSON object */ String jsonString = row.toJsonString(); /* Convert the JSON object back to a row */ Row myRow = userTable.createRowFromJSON(jsonString); } 1. Create instance of table object we wish to read from 2. Create instance of index object that we will search 3. Set search key 4. Call iterator to scan index 5. Convert results to JSON object, take JSON object and convert back to Row
  • 13. 14 | © 2014 Oracle Corporation – Proprietary and Confidential Example 2 – Major/Minor KV Paradigm User mailbox data Key Space : /user/id/-/folder/inbox/arrival date /user/id/-/folder/deleted/arrival date Value : { “name" : "Email", "namespace" : "com.companyX.email.avro", "type" : "record", "fields": [ {"name": "from", "type": "string", "default": ""}, {"name": "to", "type": "string", "default": ""}, {"name": "sender", "type": "string", "default": ""}, {"name": "cc", "type": "string", "default": ""}, {"name": "subject", "type": "string", "default": ""}, {“name”: “msgBody”, “type”: “string”, “default”: “”} ] }
  • 14. 15 | © 2014 Oracle Corporation – Proprietary and Confidential Example 2 – Modeled as Nested Tables User mailbox data UserID Folder Name Arrival Date From To Sender CC Subject Msg Body Parent Table Name: User Major Key Inherited from parent table Primary Key “Value” UserID Primary Key Major Key Child Table Name: Folder
  • 15. 16 | © 2014 Oracle Corporation – Proprietary and Confidential Example 2 - Nested Table (DDL) Create Table with id, firstName, lastName kv-> table create –name User.Folder -desc “Mail folders" folder-> add-field –type String –name folderName folder-> add-field –type Date –name arrivalDate folder-> add-field -type String -name from folder-> add-field -type String -name to folder-> add-field -type String -name sender folder-> add-field -type String -name cc folder-> add-field -type String -name subject folder-> add-field –type String –name msgBody folder-> primary-key –name folderName –name arrivalDate folders-> exit Table User.folder built. plan add-index -name userFolderMessage -table User.folder -field userId -field folderName
  • 16. 17 | © 2014 Oracle Corporation – Proprietary and Confidential Example 2 - Nested Table (DML) Search secondary index where folder name = INBOX for userId=21 TableAPI ampImpl = store.getTableAPI(); Table userTable = apiImpl.getTable("User.Folder“); Index index = userTable.getIndex(“userFolderMessage "); IndexKey indexKey = index.createIndexKey(); indexKey.put(“userId", “21"); indexKey.put(“folderName", “inbox"); Iterator<Row> results = apiImpl.tableIterator(indexKey, null, null); while (results.hasNext()) { Row row = results.next(); /* Convert the row to a JSON object if desired */ String jsonString = row.toJsonString(); } 1. Get a handle to the child table, through its parent table 2. Create instance of index object and set fields we want to search on 3. Set search key, restrict on “inbox” folder 4. Call iterator to scan index 5. Convert results to JSON object, take JSON object and convert back to Row
  • 17. 18 | © 2014 Oracle Corporation – Proprietary and Confidential How to Approach Data Modeling • Process is not much different from RDBMS – Business requirements – Entities & Relationships – Query access patterns (CRUD, range, ACID) Email Sample App. Sender Email Recipients SENT INBOX send receive
  • 18. 19 | © 2014 Oracle Corporation – Proprietary and Confidential Email Example – RDBMS Schema ER Diagram
  • 19. 20 | © 2014 Oracle Corporation – Proprietary and Confidential Email Example – NoSQL Schema
  • 20. 21 | © 2014 Oracle Corporation – Proprietary and Confidential Architecture Scalable, Available NoSQLDBDriver Application Shard 2 Shard N Shard 1 NoSQLDBDriver Application LoadBalancer App. Tier Storage TierEmail Client
  • 21. 22 | © 2014 Oracle Corporation – Proprietary and Confidential Data Access Layer • UserDAO  User Creation - addUser(userTO)  User Login - getUser(email, password) • FolderDAO  Add default folders - addDefaultFolder(userId) • MessageDAO  Add email message – addMessage(messageTO) • UserFolderMessageDAO  Add messages to designated folders – addMessage(userId, folderId, messageId) Email Client
  • 22. 23 | © 2014 Oracle Corporation – Proprietary and Confidential Join NoSQL Database Community Twitter https://twitter.com/#!/OracleNoSQL LinkedIn http://www.linkedin.com/groups?gid=4147754 Oracle’s NoSQL DB blog https://blogs.oracle.com/nosql Oracle Technology Network http://bit.ly/1f0d8wU Developer Webcast Series http://bit.ly/1doV2jl Oracle.com/BigData
  • 23. 24 | © 2014 Oracle Corporation – Proprietary and Confidential