SlideShare a Scribd company logo
NoSQL & SQL
Blending the best of both worlds
Andrew Morgan (@andrewmorgan)
www.clusterdb.com
15th June 2013
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release2
Safe Harbour Statement
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.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release3
 Massive scalability
 No application-level sharding
 Performance
 High Availability/Fault Tolerance
 Ease of use
 Simple operations/administration
 Simple APIs
 Quickly evolve application & schema
What NoSQL must deliver
Scalability
Performance
HA
Ease of use
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release4
 No best single solution
fits all
 Mix and match
Still a role for the RDBMS?
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
RDBMS
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Scalability
Performance
HA
Ease of use
SQL/Joins
ACID Transactions
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release5
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
Scalability
Performance
HA
Ease of use
SQL/Joins a
ACID Transactions a
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release6
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
Management
Scalability a
Performance
HA
Ease of use
SQL/Joins a
ACID Transactions a
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release7
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Data Layer
Application Layer
Management
Management
Clients
Scalability a
Performance
HA a
Ease of use
SQL/Joins a
ACID Transactions a
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release8
1.2 Billion UPDATEs per Minute
• 30 x Intel E5-2600 Intel
Servers
• NoSQL C++ API,
flexaSynch benchmark
• ACID Transactions, with
Synchronous
Replication 0
5
10
15
20
25
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
MillionsofUPDATEsperSecond
MySQL Cluster Data Nodes
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release9
Scalability a
Performance a
HA a
Ease of use
SQL/Joins a
ACID Transactions a
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release10
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release11
MySQL Cluster 7.3 DMR: Auto-Installer
 Fast configuration
 Auto-discovery
 Workload optimized
 Repeatable best
practices
 For MySQL Cluster
7.2 + 7.3
Specify
Workload
Auto-
Discover
Define
TopologyDeploy
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release12
Scalability a
Performance a
HA a
Ease of use a
SQL/Joins a
ACID Transactions a
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release13
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release14
NoSQL Access to MySQL Cluster data
ClusterJ
MySQL
JDBC
Apps
JPA
JNI
Python Ruby
ClusterJPA
Apps Apps Apps Apps Apps
Node.js
JS
Apps
mod-ndb
Apache
Apps
ndb-eng
Memcached
Apps Apps
NDB API (C++)
MySQL Cluster Data Nodes
Apps
PHP PERL
Apps
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release15
MySQL Cluster 7.3 EA: Node.js NoSQL API
 Native JavaScript access to MySQL Cluster
– End-to-End JavaScript: browser to the app &
DB
– Storing and retrieving JavaScript objects
directly in MySQL Cluster
– Eliminate SQL transformation
 Implemented as a module for node.js
– Integrates Cluster API library within the web app
 Couple high performance, distributed apps,
with high performance distributed database
 Optionally routes through MySQL Server
V8 JavaScript Engine
MySQL Cluster Node.js Module
MySQL Cluster Data Nodes
Clients
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release16
MySQL Cluster 7.3: JavaScript Connector for node
Modular connector with
various back-end
adapters:
• ndb: low-level native
access to MySQL Cluster
• mysql: access to any
MySQL server (translates
operations to SQL
statements)
var nosql = require('mysql-js');
var annotations = new
nosql.TableMapping('towns').applyTo
Class(Town);
var dbProperties =
nosql.ConnectionProperties('ndb');
nosql.openSession(dbProperties,
Town, annotations, onSession);
Tutorial https://blogs.oracle.com/MySQL/entry/mysql_cluster_tutorial_nosql_api
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release17
var onSession = function(err, session) {
if (err) {console.log(err);
process.exit(0);} else {
var data = new Town('Maidenhead',
'Berkshire');
session.persist(data, onInsert, data,
session);
}
};
MySQL Cluster NoSQL API for Node.js
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release18
var onInsert = function(err, object, session) {
if (err) {console.log(err);} else {
console.log('Inserted: ' +
JSON.stringify(object));
session.find(Town, 'Maidenhead',
onFind);
}
};
MySQL Cluster NoSQL API for Node.js
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release19
var onFind = function(err, result) {
if (err) {console.log(err);} else {
console.log('Found: ' +
JSON.stringify(result));
}
process.exit(0);
};
MySQL Cluster NoSQL API for Node.js
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release20
MySQL Cluster NoSQL API for Node.js & FKs
 FKs enforced on all APIs:
{ message: 'Error',
sqlstate: '23000',
ndb_error: null,
cause:
{ message: 'Foreign key constraint violated: No parent row found
[255]',
sqlstate: '23000',
ndb_error:
{ message: 'Foreign key constraint violated: No parent row found',
code: 255,
classification: 'ConstraintViolation',
handler_error_code: 151,
status: 'PermanentError' },
cause: null } }
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release21
Cluster & Memcached – Schema-Free
<town:maidenhead,SL6>
key value
<town:maidenhead,SL6>
key value
Key Value
town:maidenhead SL6
generic table
Application view
SQL view
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release22
Cluster & Memcached – Configured Schema
<town:maidenhead,SL6>
prefix key value
<town:maidenhead,SL6>
key value
Prefix Table Key-col Val-col policy
town: map.zip town code cluster
Config tables
town ... code ...
maidenhead ... SL6 ...
map.zip
Application view
SQL view

More Related Content

PDF
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
PDF
MySQL Tech Tour 2015 - Alt Intro
PDF
MySQL Intro JSON NoSQL
PDF
MySQL Manchester TT - 5.7 Whats new
PPT
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
PDF
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
PDF
MySQL 5.7: What's New, Nov. 2015
PDF
MySQL Manchester TT - Replication Features
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL Tech Tour 2015 - Alt Intro
MySQL Intro JSON NoSQL
MySQL Manchester TT - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL 5.7: What's New, Nov. 2015
MySQL Manchester TT - Replication Features

What's hot (20)

PDF
NoSQL and MySQL: News about JSON
PDF
MySQL Manchester TT - MySQL Enterprise Edition
PDF
MySQL Document Store - A Document Store with all the benefts of a Transactona...
PDF
MySQL Document Store
ODP
MySQL HA Alternatives 2010
PDF
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
PDF
Successful MySQL Scalability
PPTX
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
PDF
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
PDF
MySQL 5.7 como Document Store
PDF
MySQL Security
PPT
MySQL Enterprise Edition
PDF
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
PDF
Oracle Enterprise Manager for MySQL
PPTX
High Availability Using MySQL Group Replication
PPTX
Mysql ecosystem in 2019
PDF
MySQL 8: Ready for Prime Time
PDF
MySQL Technology Overview
PDF
MySQL Group Replication - HandsOn Tutorial
PDF
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
NoSQL and MySQL: News about JSON
MySQL Manchester TT - MySQL Enterprise Edition
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store
MySQL HA Alternatives 2010
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
Successful MySQL Scalability
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 5.7 como Document Store
MySQL Security
MySQL Enterprise Edition
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Oracle Enterprise Manager for MySQL
High Availability Using MySQL Group Replication
Mysql ecosystem in 2019
MySQL 8: Ready for Prime Time
MySQL Technology Overview
MySQL Group Replication - HandsOn Tutorial
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
Ad

Similar to NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013 (20)

PDF
MySQL Cluster as Transactional NoSQL (KVS)
PDF
MySQL Cluster
PDF
NoSQL and MySQL
PDF
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
PPTX
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
PDF
20141011 my sql clusterv01pptx
PDF
FOSDEM 2015 - NoSQL and SQL the best of both worlds
PDF
2_MySQL_Cluster_Introduction.pdf
PDF
MySQL Cluster overview + development slides (2014)
PDF
Exploring mysql cluster 7.4
PDF
MySQL NDB Cluster 8.0
PPTX
What's new in MySQL Cluster 7.4 webinar charts
PDF
No sql from the web’s favourite relational database MySQL
PPT
2010 12 mysql_clusteroverview
PDF
MySQL InnoDB Cluster and NDB Cluster
PPTX
A practical introduction to Oracle NoSQL Database - OOW2014
PDF
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
PDF
Oracle NoSQL Database -- Big Data Bellevue Meetup - 02-18-15
PDF
Ndb cluster 80_requirements
PDF
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster
NoSQL and MySQL
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
20141011 my sql clusterv01pptx
FOSDEM 2015 - NoSQL and SQL the best of both worlds
2_MySQL_Cluster_Introduction.pdf
MySQL Cluster overview + development slides (2014)
Exploring mysql cluster 7.4
MySQL NDB Cluster 8.0
What's new in MySQL Cluster 7.4 webinar charts
No sql from the web’s favourite relational database MySQL
2010 12 mysql_clusteroverview
MySQL InnoDB Cluster and NDB Cluster
A practical introduction to Oracle NoSQL Database - OOW2014
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
Oracle NoSQL Database -- Big Data Bellevue Meetup - 02-18-15
Ndb cluster 80_requirements
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
Ad

More from Andrew Morgan (12)

PPTX
MongoDB 3.4 webinar
PPTX
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
PPTX
Data Streaming with Apache Kafka & MongoDB - EMEA
PPTX
The rise of microservices - containers and orchestration
PPTX
PistonHead's use of MongoDB for Analytics
PPTX
Joins and Other MongoDB 3.2 Aggregation Enhancements
PPTX
Document validation in MongoDB 3.2
PPTX
MySQL High Availability Solutions - Feb 2015 webinar
PDF
MySQL Replication: What’s New in MySQL 5.7 and Beyond
PDF
NoSQL and SQL - blending the best of both worlds
PDF
Mysql cluster introduction
PDF
Developing high-throughput services with no sql ap-is to innodb and mysql clu...
MongoDB 3.4 webinar
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
Data Streaming with Apache Kafka & MongoDB - EMEA
The rise of microservices - containers and orchestration
PistonHead's use of MongoDB for Analytics
Joins and Other MongoDB 3.2 Aggregation Enhancements
Document validation in MongoDB 3.2
MySQL High Availability Solutions - Feb 2015 webinar
MySQL Replication: What’s New in MySQL 5.7 and Beyond
NoSQL and SQL - blending the best of both worlds
Mysql cluster introduction
Developing high-throughput services with no sql ap-is to innodb and mysql clu...

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Modernizing your data center with Dell and AMD
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
NewMind AI Monthly Chronicles - July 2025
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Modernizing your data center with Dell and AMD

NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013

  • 1. NoSQL & SQL Blending the best of both worlds Andrew Morgan (@andrewmorgan) www.clusterdb.com 15th June 2013
  • 2. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release2 Safe Harbour Statement 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. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release3  Massive scalability  No application-level sharding  Performance  High Availability/Fault Tolerance  Ease of use  Simple operations/administration  Simple APIs  Quickly evolve application & schema What NoSQL must deliver Scalability Performance HA Ease of use
  • 4. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release4  No best single solution fits all  Mix and match Still a role for the RDBMS? NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation RDBMS Complex queries with joins ACID transactions Well defined schemas Rich set of tools Scalability Performance HA Ease of use SQL/Joins ACID Transactions
  • 5. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release5 MySQL Cluster Architecture MySQL Cluster Data Nodes Data Layer Clients Application Layer Management Scalability Performance HA Ease of use SQL/Joins a ACID Transactions a
  • 6. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release6 MySQL Cluster Architecture MySQL Cluster Data Nodes Data Layer Clients Application Layer Management Management Scalability a Performance HA Ease of use SQL/Joins a ACID Transactions a
  • 7. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release7 MySQL Cluster Architecture MySQL Cluster Data Nodes Data Layer Application Layer Management Management Clients Scalability a Performance HA a Ease of use SQL/Joins a ACID Transactions a
  • 8. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release8 1.2 Billion UPDATEs per Minute • 30 x Intel E5-2600 Intel Servers • NoSQL C++ API, flexaSynch benchmark • ACID Transactions, with Synchronous Replication 0 5 10 15 20 25 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 MillionsofUPDATEsperSecond MySQL Cluster Data Nodes
  • 9. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release9 Scalability a Performance a HA a Ease of use SQL/Joins a ACID Transactions a
  • 10. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release10
  • 11. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release11 MySQL Cluster 7.3 DMR: Auto-Installer  Fast configuration  Auto-discovery  Workload optimized  Repeatable best practices  For MySQL Cluster 7.2 + 7.3 Specify Workload Auto- Discover Define TopologyDeploy
  • 12. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release12 Scalability a Performance a HA a Ease of use a SQL/Joins a ACID Transactions a
  • 13. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release13
  • 14. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release14 NoSQL Access to MySQL Cluster data ClusterJ MySQL JDBC Apps JPA JNI Python Ruby ClusterJPA Apps Apps Apps Apps Apps Node.js JS Apps mod-ndb Apache Apps ndb-eng Memcached Apps Apps NDB API (C++) MySQL Cluster Data Nodes Apps PHP PERL Apps
  • 15. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release15 MySQL Cluster 7.3 EA: Node.js NoSQL API  Native JavaScript access to MySQL Cluster – End-to-End JavaScript: browser to the app & DB – Storing and retrieving JavaScript objects directly in MySQL Cluster – Eliminate SQL transformation  Implemented as a module for node.js – Integrates Cluster API library within the web app  Couple high performance, distributed apps, with high performance distributed database  Optionally routes through MySQL Server V8 JavaScript Engine MySQL Cluster Node.js Module MySQL Cluster Data Nodes Clients
  • 16. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release16 MySQL Cluster 7.3: JavaScript Connector for node Modular connector with various back-end adapters: • ndb: low-level native access to MySQL Cluster • mysql: access to any MySQL server (translates operations to SQL statements) var nosql = require('mysql-js'); var annotations = new nosql.TableMapping('towns').applyTo Class(Town); var dbProperties = nosql.ConnectionProperties('ndb'); nosql.openSession(dbProperties, Town, annotations, onSession); Tutorial https://blogs.oracle.com/MySQL/entry/mysql_cluster_tutorial_nosql_api
  • 17. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release17 var onSession = function(err, session) { if (err) {console.log(err); process.exit(0);} else { var data = new Town('Maidenhead', 'Berkshire'); session.persist(data, onInsert, data, session); } }; MySQL Cluster NoSQL API for Node.js
  • 18. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release18 var onInsert = function(err, object, session) { if (err) {console.log(err);} else { console.log('Inserted: ' + JSON.stringify(object)); session.find(Town, 'Maidenhead', onFind); } }; MySQL Cluster NoSQL API for Node.js
  • 19. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release19 var onFind = function(err, result) { if (err) {console.log(err);} else { console.log('Found: ' + JSON.stringify(result)); } process.exit(0); }; MySQL Cluster NoSQL API for Node.js
  • 20. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release20 MySQL Cluster NoSQL API for Node.js & FKs  FKs enforced on all APIs: { message: 'Error', sqlstate: '23000', ndb_error: null, cause: { message: 'Foreign key constraint violated: No parent row found [255]', sqlstate: '23000', ndb_error: { message: 'Foreign key constraint violated: No parent row found', code: 255, classification: 'ConstraintViolation', handler_error_code: 151, status: 'PermanentError' }, cause: null } }
  • 21. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release21 Cluster & Memcached – Schema-Free <town:maidenhead,SL6> key value <town:maidenhead,SL6> key value Key Value town:maidenhead SL6 generic table Application view SQL view
  • 22. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release22 Cluster & Memcached – Configured Schema <town:maidenhead,SL6> prefix key value <town:maidenhead,SL6> key value Prefix Table Key-col Val-col policy town: map.zip town code cluster Config tables town ... code ... maidenhead ... SL6 ... map.zip Application view SQL view