SlideShare a Scribd company logo
1 of 42
Download to read offline
Let's talk about NoSQL Standard
Otávio Santana
@otaviojava
otaviojava@java.net
otaviojava@apache.org
NoSQL
● Database
● Doesn't use relationship
● BASE
● Five types
Key Value
● AmazonDynamo
● AmazonS3
● Redis
● Scalaris
● Voldemort
● Couchbase
valuekey
valuekey
valuekey
Document
● AmazonSimpleDb
● ApacheCouchdb
● MongoDb
● Riak
● Couchbase
Column
● Hbase
● Cassandra
● Scylla
● Clouddata
● SimpleDb
● DynamoDB
Row-key Columns...
Apollo
Aphrodi
te
Ares
Sun
Duty
{Love, happy}
Duty
War
Duty
Sword
weapon
Color
Krato
s
Dead Gods
13
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Krat
os
was dead was dead
Is brother
killed killed
Multi-model
● OrientDB
● Couchbase
● Elasticsearch
● Cassandra
The Problem
The Problem
The Current solution
● Spring Data
● Hibernate OGM
● TopLink
The Perfect Solution
● Abstraction API
● Communication API
● No lock-in
● Split problems
Apache Diana was Born (incubator)
● API Communication layer
● Apache Project
● Document, key-value, Column, Graph
● Universal Adapter
● Standard
What Diana is not
● A new API to replace JPA
● A new API to abstraction layer
● Just one API communication to solve all kind of NoSQL
database
● Be responsible to do integrations with other technologies such
as CDI, EJB, Bean Validation, Spring, etc.
Diana Project
● Commons API
● Document API
● Graph API
● Key-value API
● Column API
● Four TCKs
Diana Project
Why Diana?
● Goddess of the hunt, nature
and moon
● Fought in Troy
● brave warrior and hunter
Road Map
● Draft and code Proposal
● Community Feedback
● Involve NoSQL Vendors
● Involve Solution Vendors
● Apache Project
● Development
● JSR
Nomenclature
● Configuration
● Factory
● Manager
● Entity
● Value
Value
Value value = Value.of("123");
Integer integerValue = value.get(Integer.class);
List<Integer> list = value.getList(Integer.class);
Set<Integer> set = value.getSet(Integer.class);
Stream<Integer> stream = value.getStream(Integer.class);
String cast = value.cast();//unsafe
Custom Value
public class MoneyWriter implements
WriterField<Money, String> {
@Override
public boolean isCompatible(Class clazz) {
return false;
}
@Override
public String write(Money object) {
return object.toString();
}
}
public class MoneyReader implements
ReaderField {
@Override
public boolean isCompatible(Class clazz) {
return Money.class.equals(clazz);
}
@Override
public <T> T read(Class<T> clazz, Object
value) {
return (T) Money.parse(value.toString());
}
}
Entities
Money money = new Money();
Value value = Value.of(money);
DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection");
entity.add(Document.of("name", "Daniel Soro"));
entity.add(Document.of("age", 26));
entity.add(Document.of("salary", money));
String name = entity.getName();
List<Document> documents = entity.getDocuments();
Optional<Document> age = entity.find("age");
Entities
Money money = new Money();
Value value = Value.of(money);
DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection");
entity.add(Document.of("name", "Daniel Soro"));
entity.add(Document.of("age", 26));
entity.add(Document.of("salary", money));
entity.add(Document.of("subdocument", Document.of("sub", Arrays.asList(1, 2, 3))));
String name = entity.getName();
List<Document> documents = entity.getDocuments();
Optional<Document> age = entity.find("age");
Entities
Money money = new Money();
Value value = Value.of(money);
ColumnFamilyEntity entity = ColumnFamilyEntity.of("family");
Column id = Column.of("id", 10L);
entity.add(id);
entity.add(Column.of("version", 0.001));
entity.add(Column.of("name", "Diana"));
entity.add(Column.of("options", Arrays.asList(1, 2, 3)));
entity.add(Column.of("pay", value));
String name = entity.getName();
List<Column> columns = entity.getColumns();
Optional<Column> notFound = entity.find("notFound");
Entities
Value value = Value.of(new Money());
KeyValue<String> keyValue = KeyValue.of("key", value);
String key = keyValue.getKey();
Value value1 = keyValue.getValue();
Entities
Value value = Value.of(new Money());
KeyValue<String> keyValue = KeyValue.of("key", value);
String key = keyValue.getKey();
Value value1 = keyValue.getValue();
Manager
DocumentCollectionEntity entitySaved = collectionManager.save(entity);
collectionManager.save(entity, TTL.ofHours(2));
collectionManager.saveAsync(entity);
collectionManager.saveAsync(entity, TTL.ofDays(3));
collectionManager.saveAsync(entity, System.out::print);
DocumentQuery query = DocumentQuery.of("collection");
Optional<Document> id = entitySaved.find("_id");
query.addCondition(DocumentCondition.eq(id.get()));
List<DocumentCollectionEntity> documentsFound = collectionManager.find(query);
DocumentCollectionEntity document = collectionManager.findOne(query);
collectionManager.delete(query);
collectionManager.deleteAsync(query);
collectionManager.deleteAsync(query, System.out::print);
Manager
columnEntityManager.save(entity);
columnEntityManager.saveAsync(entity);
columnEntityManager.saveAsync(entity, TTL.ofDays(3));
columnEntityManager.saveAsync(entity, System.out::print);
ColumnQuery query = ColumnQuery.of("family");
query.addCondition(ColumnCondition.eq(id));
List<ColumnFamilyEntity> entities = columnEntityManager.find(query);
ColumnFamilyEntity family = columnEntityManager.findOne(query);
columnEntityManager.delete(query);
columnEntityManager.deleteAsync(query);
columnEntityManager.deleteAsync(query, System.out::print);
Manager
KeyValue<String> keyValue = KeyValue.of("myKey", Value.of("value"));
bucket.put("key", "value");
bucket.put(keyValue);
bucket.put(keyValue, TTL.ofMicros(12));
Optional<Value> value = bucket.get("key");
Factory
BucketManager bucket = managerFactory.getBucketManager("bucket");
List<String> list = managerFactory.getList("bucketList", String.class);
Set<String> set = managerFactory.getSet("bucketSet", String.class);
Map<String, Integer> map = managerFactory.getMap("bucketList", String.class,
Integer.class);
Queue<String> queue = managerFactory.getQueue("queueList", String.class);
Factory
ColumnFamilyManager columnEntityManager =
columnManagerFactory.getColumnEntityManager("space");
DocumentCollectionManager collection =
documentManagerFactory.getDocumentEntityManager("collection");
Configuration
ColumnConfiguration columnConfiguration = new ColumnDriver();
DocumentConfiguration documentConfiguration = new DocumentDriver();
KeyValueConfiguration keyValueConfiguration = new KeyValueDriver();
ColumnFamilyManagerFactory columnFactory = columnConfiguration.getManagerFactory();
DocumentCollectionManagerFactory documentFactory =
documentConfiguration.getManagerFactory();
BucketManagerFactory keyFactory = keyValueConfiguration.getManagerFactory();
Native Query
columnEntityManager.nativeQueryAsync(query, System.out::println);
List<ColumnFamilyEntity> entities = columnEntityManager.nativeQuery(query);
PreparedStatement preparedStatement = columnEntityManager.nativeQueryPrepare(query);
preparedStatement.bind(1,2,3);
preparedStatement.executeQuery();
preparedStatement.executeQueryAsync(System.out::println);
Native Query
collectionManager.nativeQueryAsync(query, System.out::println);
List<DocumentCollectionEntity> entities = collectionManager.nativeQuery(query);
PreparedStatement preparedStatement = collectionManager.nativeQueryPrepare(query);
preparedStatement.bind(1,2,3);
preparedStatement.executeQuery();
preparedStatement.executeQueryAsync(System.out::println);
Diana Query Language
Select
select * from bucket;
select key1, key2 from bucket;
Insert
INSERT INTO bucket VALUES (key, value);
INSERT INTO bucket VALUES (key, value) ttl 20 (seconds, minutes, hours, days);
Delete
DELETE FROM bucket WHERE id =value;
Diana Query Language
Insert
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) (value1,value2,value3,...);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
Diana Query Language
Select
select * from collection;
select field, field2 from collection;
select field, field2 from collection where id = 2;
select field, field2 from collection where id >= 2 or field >3;
Delete
DELETE FROM collection WHERE id =value;
DELETE field, field2 FROM collection WHERE id =value;
Diana Query Language
Insert
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) (value1,value2,value3,...);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
Diana Query Language
Select
select * from family;
select field, field2 from family;
select field, field2 from family where id = 2;
select field, field2 from family where id >= 2 and index >3;
Delete
DELETE FROM family WHERE id =value;
DELETE field, field2 FROM family WHERE id =value;
Site
https://jnosql.github.io/diana-site/
Code
https://github.com/JNOSQL
Apache Proposal
https://wiki.apache.org/incubator/DianaProposal
Thank you
Otávio Santana
@otaviojava
otaviojava@java.net
otaviojava@apache.org

More Related Content

What's hot

2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDBantoinegirbal
 
Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Andrii Lashchenko
 
Solr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanSolr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanGregg Donovan
 
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationValidating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationDave Stokes
 
UKOUG Tech14 - Getting Started With JSON in the Database
UKOUG Tech14 - Getting Started With JSON in the DatabaseUKOUG Tech14 - Getting Started With JSON in the Database
UKOUG Tech14 - Getting Started With JSON in the DatabaseMarco Gralike
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)MongoDB
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring DataOliver Gierke
 
Hibernate Tutorial for beginners
Hibernate Tutorial for beginnersHibernate Tutorial for beginners
Hibernate Tutorial for beginnersrajkamal560066
 
09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WP09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WPNguyen Tuan
 
Webinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBWebinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBMongoDB
 
appengine java night #1
appengine java night #1appengine java night #1
appengine java night #1Shinichi Ogawa
 
ORMLite Android
ORMLite AndroidORMLite Android
ORMLite Android哲偉 楊
 
Webinar: Index Tuning and Evaluation
Webinar: Index Tuning and EvaluationWebinar: Index Tuning and Evaluation
Webinar: Index Tuning and EvaluationMongoDB
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETGetting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETTomas Jansson
 
Indexing & Query Optimization
Indexing & Query OptimizationIndexing & Query Optimization
Indexing & Query OptimizationMongoDB
 

What's hot (19)

jQuery
jQueryjQuery
jQuery
 
2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB2011 Mongo FR - Indexing in MongoDB
2011 Mongo FR - Indexing in MongoDB
 
Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.
 
Jquery
JqueryJquery
Jquery
 
Solr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanSolr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg Donovan
 
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationValidating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
 
UKOUG Tech14 - Getting Started With JSON in the Database
UKOUG Tech14 - Getting Started With JSON in the DatabaseUKOUG Tech14 - Getting Started With JSON in the Database
UKOUG Tech14 - Getting Started With JSON in the Database
 
J query
J queryJ query
J query
 
J query1
J query1J query1
J query1
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring Data
 
Hibernate Tutorial for beginners
Hibernate Tutorial for beginnersHibernate Tutorial for beginners
Hibernate Tutorial for beginners
 
09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WP09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WP
 
Webinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBWebinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDB
 
appengine java night #1
appengine java night #1appengine java night #1
appengine java night #1
 
ORMLite Android
ORMLite AndroidORMLite Android
ORMLite Android
 
Webinar: Index Tuning and Evaluation
Webinar: Index Tuning and EvaluationWebinar: Index Tuning and Evaluation
Webinar: Index Tuning and Evaluation
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETGetting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
 
Indexing & Query Optimization
Indexing & Query OptimizationIndexing & Query Optimization
Indexing & Query Optimization
 

Similar to Let's talk about NoSQL Standard

Palestra Java + NoSQL = Iniciativa JNoSQL no TDC Florianópolis
Palestra Java + NoSQL = Iniciativa JNoSQL  no TDC FlorianópolisPalestra Java + NoSQL = Iniciativa JNoSQL  no TDC Florianópolis
Palestra Java + NoSQL = Iniciativa JNoSQL no TDC FlorianópolisMarcelo Souza Vieira
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...tdc-globalcode
 
JakartaData-JCon.pptx
JakartaData-JCon.pptxJakartaData-JCon.pptx
JakartaData-JCon.pptxEmilyJiang23
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkitwlscaudill
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeJakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeOtávio Santana
 
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta_EE
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Oliver Gierke
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackGaryCoady
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennJavaDayUA
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"LogeekNightUkraine
 
The Ring programming language version 1.8 book - Part 50 of 202
The Ring programming language version 1.8 book - Part 50 of 202The Ring programming language version 1.8 book - Part 50 of 202
The Ring programming language version 1.8 book - Part 50 of 202Mahmoud Samir Fayed
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using RoomNelson Glauber Leal
 
Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Frost
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020Thodoris Bais
 
Implementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBImplementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBOren Eini
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationAlex Hardman
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8XSolve
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 
What do you mean, Backwards Compatibility?
What do you mean, Backwards Compatibility?What do you mean, Backwards Compatibility?
What do you mean, Backwards Compatibility?Trisha Gee
 

Similar to Let's talk about NoSQL Standard (20)

Palestra Java + NoSQL = Iniciativa JNoSQL no TDC Florianópolis
Palestra Java + NoSQL = Iniciativa JNoSQL  no TDC FlorianópolisPalestra Java + NoSQL = Iniciativa JNoSQL  no TDC Florianópolis
Palestra Java + NoSQL = Iniciativa JNoSQL no TDC Florianópolis
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
JakartaData-JCon.pptx
JakartaData-JCon.pptxJakartaData-JCon.pptx
JakartaData-JCon.pptx
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkit
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeJakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
 
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
 
The Ring programming language version 1.8 book - Part 50 of 202
The Ring programming language version 1.8 book - Part 50 of 202The Ring programming language version 1.8 book - Part 50 of 202
The Ring programming language version 1.8 book - Part 50 of 202
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using Room
 
Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020
 
Requery overview
Requery overviewRequery overview
Requery overview
 
Implementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBImplementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDB
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data Visualisation
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
What do you mean, Backwards Compatibility?
What do you mean, Backwards Compatibility?What do you mean, Backwards Compatibility?
What do you mean, Backwards Compatibility?
 

More from Otávio Santana

NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with JavaOtávio Santana
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.Otávio Santana
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Otávio Santana
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaArquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaOtávio Santana
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endBuild, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endOtávio Santana
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudJakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudOtávio Santana
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?Otávio Santana
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Otávio Santana
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Otávio Santana
 
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Otávio Santana
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Otávio Santana
 
The new generation of data persistence with graph
The new generation of data persistence with graphThe new generation of data persistence with graph
The new generation of data persistence with graphOtávio Santana
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Otávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaOtávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoOtávio Santana
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open sourceOtávio Santana
 
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEBuilding a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEOtávio Santana
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Otávio Santana
 
Disasters of the century NoSQL
Disasters of the century NoSQLDisasters of the century NoSQL
Disasters of the century NoSQLOtávio Santana
 

More from Otávio Santana (20)

NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with Java
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaArquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endBuild, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudJakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
 
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
 
The new generation of data persistence with graph
The new generation of data persistence with graphThe new generation of data persistence with graph
The new generation of data persistence with graph
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
 
Polyglot persistence
Polyglot persistencePolyglot persistence
Polyglot persistence
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open source
 
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEBuilding a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!
 
Disasters of the century NoSQL
Disasters of the century NoSQLDisasters of the century NoSQL
Disasters of the century NoSQL
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Let's talk about NoSQL Standard

  • 1. Let's talk about NoSQL Standard Otávio Santana @otaviojava otaviojava@java.net otaviojava@apache.org
  • 2. NoSQL ● Database ● Doesn't use relationship ● BASE ● Five types
  • 3. Key Value ● AmazonDynamo ● AmazonS3 ● Redis ● Scalaris ● Voldemort ● Couchbase valuekey valuekey valuekey
  • 4. Document ● AmazonSimpleDb ● ApacheCouchdb ● MongoDb ● Riak ● Couchbase
  • 5. Column ● Hbase ● Cassandra ● Scylla ● Clouddata ● SimpleDb ● DynamoDB Row-key Columns... Apollo Aphrodi te Ares Sun Duty {Love, happy} Duty War Duty Sword weapon Color Krato s Dead Gods 13
  • 6. Graph ● Neo4j ● InfoGrid ● Sones ● HyperGraphDB Apollo Ares Krat os was dead was dead Is brother killed killed
  • 7. Multi-model ● OrientDB ● Couchbase ● Elasticsearch ● Cassandra
  • 10. The Current solution ● Spring Data ● Hibernate OGM ● TopLink
  • 11. The Perfect Solution ● Abstraction API ● Communication API ● No lock-in ● Split problems
  • 12. Apache Diana was Born (incubator) ● API Communication layer ● Apache Project ● Document, key-value, Column, Graph ● Universal Adapter ● Standard
  • 13. What Diana is not ● A new API to replace JPA ● A new API to abstraction layer ● Just one API communication to solve all kind of NoSQL database ● Be responsible to do integrations with other technologies such as CDI, EJB, Bean Validation, Spring, etc.
  • 14. Diana Project ● Commons API ● Document API ● Graph API ● Key-value API ● Column API ● Four TCKs
  • 16. Why Diana? ● Goddess of the hunt, nature and moon ● Fought in Troy ● brave warrior and hunter
  • 17. Road Map ● Draft and code Proposal ● Community Feedback ● Involve NoSQL Vendors ● Involve Solution Vendors ● Apache Project ● Development ● JSR
  • 18. Nomenclature ● Configuration ● Factory ● Manager ● Entity ● Value
  • 19. Value Value value = Value.of("123"); Integer integerValue = value.get(Integer.class); List<Integer> list = value.getList(Integer.class); Set<Integer> set = value.getSet(Integer.class); Stream<Integer> stream = value.getStream(Integer.class); String cast = value.cast();//unsafe
  • 20. Custom Value public class MoneyWriter implements WriterField<Money, String> { @Override public boolean isCompatible(Class clazz) { return false; } @Override public String write(Money object) { return object.toString(); } } public class MoneyReader implements ReaderField { @Override public boolean isCompatible(Class clazz) { return Money.class.equals(clazz); } @Override public <T> T read(Class<T> clazz, Object value) { return (T) Money.parse(value.toString()); } }
  • 21. Entities Money money = new Money(); Value value = Value.of(money); DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection"); entity.add(Document.of("name", "Daniel Soro")); entity.add(Document.of("age", 26)); entity.add(Document.of("salary", money)); String name = entity.getName(); List<Document> documents = entity.getDocuments(); Optional<Document> age = entity.find("age");
  • 22. Entities Money money = new Money(); Value value = Value.of(money); DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection"); entity.add(Document.of("name", "Daniel Soro")); entity.add(Document.of("age", 26)); entity.add(Document.of("salary", money)); entity.add(Document.of("subdocument", Document.of("sub", Arrays.asList(1, 2, 3)))); String name = entity.getName(); List<Document> documents = entity.getDocuments(); Optional<Document> age = entity.find("age");
  • 23. Entities Money money = new Money(); Value value = Value.of(money); ColumnFamilyEntity entity = ColumnFamilyEntity.of("family"); Column id = Column.of("id", 10L); entity.add(id); entity.add(Column.of("version", 0.001)); entity.add(Column.of("name", "Diana")); entity.add(Column.of("options", Arrays.asList(1, 2, 3))); entity.add(Column.of("pay", value)); String name = entity.getName(); List<Column> columns = entity.getColumns(); Optional<Column> notFound = entity.find("notFound");
  • 24. Entities Value value = Value.of(new Money()); KeyValue<String> keyValue = KeyValue.of("key", value); String key = keyValue.getKey(); Value value1 = keyValue.getValue();
  • 25. Entities Value value = Value.of(new Money()); KeyValue<String> keyValue = KeyValue.of("key", value); String key = keyValue.getKey(); Value value1 = keyValue.getValue();
  • 26. Manager DocumentCollectionEntity entitySaved = collectionManager.save(entity); collectionManager.save(entity, TTL.ofHours(2)); collectionManager.saveAsync(entity); collectionManager.saveAsync(entity, TTL.ofDays(3)); collectionManager.saveAsync(entity, System.out::print); DocumentQuery query = DocumentQuery.of("collection"); Optional<Document> id = entitySaved.find("_id"); query.addCondition(DocumentCondition.eq(id.get())); List<DocumentCollectionEntity> documentsFound = collectionManager.find(query); DocumentCollectionEntity document = collectionManager.findOne(query); collectionManager.delete(query); collectionManager.deleteAsync(query); collectionManager.deleteAsync(query, System.out::print);
  • 27. Manager columnEntityManager.save(entity); columnEntityManager.saveAsync(entity); columnEntityManager.saveAsync(entity, TTL.ofDays(3)); columnEntityManager.saveAsync(entity, System.out::print); ColumnQuery query = ColumnQuery.of("family"); query.addCondition(ColumnCondition.eq(id)); List<ColumnFamilyEntity> entities = columnEntityManager.find(query); ColumnFamilyEntity family = columnEntityManager.findOne(query); columnEntityManager.delete(query); columnEntityManager.deleteAsync(query); columnEntityManager.deleteAsync(query, System.out::print);
  • 28. Manager KeyValue<String> keyValue = KeyValue.of("myKey", Value.of("value")); bucket.put("key", "value"); bucket.put(keyValue); bucket.put(keyValue, TTL.ofMicros(12)); Optional<Value> value = bucket.get("key");
  • 29. Factory BucketManager bucket = managerFactory.getBucketManager("bucket"); List<String> list = managerFactory.getList("bucketList", String.class); Set<String> set = managerFactory.getSet("bucketSet", String.class); Map<String, Integer> map = managerFactory.getMap("bucketList", String.class, Integer.class); Queue<String> queue = managerFactory.getQueue("queueList", String.class);
  • 31. Configuration ColumnConfiguration columnConfiguration = new ColumnDriver(); DocumentConfiguration documentConfiguration = new DocumentDriver(); KeyValueConfiguration keyValueConfiguration = new KeyValueDriver(); ColumnFamilyManagerFactory columnFactory = columnConfiguration.getManagerFactory(); DocumentCollectionManagerFactory documentFactory = documentConfiguration.getManagerFactory(); BucketManagerFactory keyFactory = keyValueConfiguration.getManagerFactory();
  • 32. Native Query columnEntityManager.nativeQueryAsync(query, System.out::println); List<ColumnFamilyEntity> entities = columnEntityManager.nativeQuery(query); PreparedStatement preparedStatement = columnEntityManager.nativeQueryPrepare(query); preparedStatement.bind(1,2,3); preparedStatement.executeQuery(); preparedStatement.executeQueryAsync(System.out::println);
  • 33. Native Query collectionManager.nativeQueryAsync(query, System.out::println); List<DocumentCollectionEntity> entities = collectionManager.nativeQuery(query); PreparedStatement preparedStatement = collectionManager.nativeQueryPrepare(query); preparedStatement.bind(1,2,3); preparedStatement.executeQuery(); preparedStatement.executeQueryAsync(System.out::println);
  • 34. Diana Query Language Select select * from bucket; select key1, key2 from bucket; Insert INSERT INTO bucket VALUES (key, value); INSERT INTO bucket VALUES (key, value) ttl 20 (seconds, minutes, hours, days); Delete DELETE FROM bucket WHERE id =value;
  • 35. Diana Query Language Insert INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) (value1,value2,value3,...); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
  • 36. Diana Query Language Select select * from collection; select field, field2 from collection; select field, field2 from collection where id = 2; select field, field2 from collection where id >= 2 or field >3; Delete DELETE FROM collection WHERE id =value; DELETE field, field2 FROM collection WHERE id =value;
  • 37. Diana Query Language Insert INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) (value1,value2,value3,...); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
  • 38. Diana Query Language Select select * from family; select field, field2 from family; select field, field2 from family where id = 2; select field, field2 from family where id >= 2 and index >3; Delete DELETE FROM family WHERE id =value; DELETE field, field2 FROM family WHERE id =value;