SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
“A NoSQL Database for the Internet age”

                     www.OrienTechnologies.com


                                      Author of OrientDB and Roma
Luca Garulli
 Luca Garulli                         Framework Open Source projects,
CTO@AssetData.it
 CTO@AssetData.it                     CTO at Asset Data company,
http://zion-city.blogspot.com
 http://zion-city.blogspot.com        Technical Manager at Romulus
http://twitter.com/lgarulli
 http://twitter.com/lgarulli          consortium
NoSQL movement
“In recent years, a number of new systems, sometimes called
“NoSQL” systems, have been introduced to provide indexed data
storage that is much higher performance than existing relational
database products like MySQL, Oracle, DB2, and SQL Server.
These data storage systems have a number of features in common:

● A simple call level interface or protocol (in contrast to a SQL
binding)
● Ability to horizontally scale throughput over many servers,

● Efficient use of distributed indexes and RAM for data storage, and

● The ability to dynamically define new attributes or data schema“



                    from “High Performance Scalable Data Stores” by Rick Cattell
                For more information visit: http://www.orientechnologies.com
Products
 There are two main products released with commercial friendly
                Open Source Apache 2 license


  Deeply scalable Document based DBMS that uses the               The Key/Value Server based on the
 features of the Graph Databases to handle links. It's the        Document Database technology and
   basic engine of all the Orient products. It can work in         accessible as embedded repository
     schema-less mode, schema-full or a mix of both.               via Java APIs or via HTTP using a
                                                                  RESTful API. Orient K/V uses a new
Supports advanced features, such as indexing, fluent and           algorithm called RB+Tree, derived
  SQL-like queries. It handles natively JSON and XML             from the Red-Black Tree and from the
 documents. Developers can use Java native and HTTP                              B+Tree.
                      RESTful APIs
                                                                  Orient Key/Value server can run in
 Graphs of hundreads of linked objects can be retrieved all         high availability mode using a
in memory in less than 1ms without executing costly JOINs        cluster of multiple nodes partitioned.
            such as the Relational DBMSs do.
                       For more information visit: http://www.orientechnologies.com
Database structure
Cluster concept
             Class “Profile“ has
            records distributed on
              multiple clusters.         Class “Profile“
                                          Class “Profile“
                                                                           Cluster “FamousProfile“
                                                                            Cluster “FamousProfile“
 All the other                                                                  Type = physical
                                                                                 Type = physical
profiles will be
stored into the
                                                                           Jay Miner Bill Gates
“OtherProfile“
cluster of type
   “logical“                                The “FamousProfile“ cluster
                                        contains all the profile of the most
                                         famous people and it's supposed
                                        to being accessed frequently. This            Cluster “Twit“
Cluster “OtherProfile“                     is the reason why we selected                Cluster “Twit“
 Cluster “OtherProfile“                                                               Type = physical
    Type = logical                                “physical“ as type.                  Type = physical
      Type = logical




                       For more information visit: http://www.orientechnologies.com
APIs
 OrientDB is written 100% in Java® and can run on any
platform that supports the Java® Technology version 5 or
                          more.

  OrientDB supports native Java client API to work with
  embedded or remote databases using the fast binary
                       protocol

OrientDB Server comes with a HTTP RESTful interface to
 being used from any language, even from the Internet
       Browser. Uses JSON to represents records
             For more information visit: http://www.orientechnologies.com
Java example with records
// OPEN THE DATABASE
ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/demo").open("admin", "admin");

// CREATE A NEW DOCUMENT AND FILL IT
ODocument doc = new ODocument(db, "Person");
                                                                                                  This is a
doc.field( "name", "Luke" );                                                                    relationship
doc.field( "surname", "Skywalker" );                                                            Many-to-One
doc.field( "city", new ODocument("City" ).field("name","Rome").field("country", "Italy") );

// SAVE THE DOCUMENT
doc.save();

// QUERY THE DOCUMENT                                                                         Query using the
List<ODocument> result = database.query(                                                      SQL syntax with
  new OSQLSynchQuery("select * from person where city.name = 'Rome'")).execute();              extensions to
                                                                                               traverse links
// PRINT THE RESULT SET
for( ODocument d : result ){                                                                   without costly
  System.out.println("Person: " + d.field( "name" ) + d.field( "surname" ));                       JOINs
}

db.close();

                             For more information visit: http://www.orientechnologies.com
Object Database interface
Even if OrientDB is not an ODBMS (but is a Document DBMS), it
 offers the ODatabaseObject interface to works with POJOs in
  transparent way removing the Impedence Mismatch problem

Fields not present in the real Java class will be not mapped but
                 saved with the original record

       Queries convert automatically records to POJOs

   References between POJO can be stored as links (aka
    relationships) or by including the referenced object as
                          embedded.
              For more information visit: http://www.orientechnologies.com
Java example with POJOs
// OPEN THE DATABASE
ODatabaseObjectTx db = new ODatabaseObjectTx("remote:localhost/demo").open("admin", "admin");

// CREATE A NEW OBJECT AND FILL IT
Person person = new Person();                                  Automatic
person.setName( "Luke" );                                     binding from
person.setSurname( "Skywalker" );
person.setCity( new City( "Rome", "Italy") );                POJO to record

// SAVE THE OBJECT
db.save( person );                                                         Query returns directly List
                                                                           of POJO. Queries use the
// QUERY THE OBJECT                                                        cache before to load the
List<Person> result = database.query(                                      records from the storage
  new OSQLSynchQuery("select from person where city.name = 'Rome'"));

// PRINT THE RESULT SET
for( Person p : result ){
  System.out.println("Person: " + p.getName() + “ “ + p.getSurname() );                The POJOs
}                                                                                     are usable as
                                                                                         usually
db.close();

                            For more information visit: http://www.orientechnologies.com
HTTP RESTful API
       select from Profile where project = 'Amiga'


   HTTP RESTful protocol
         (JSON)                                                  OrientDB
                                                                 OrientDB
{ result :
  { _rec: 3:4,
                                                                  Server
                                                                  Server
     _ver: 2,
     name: “Jay”,
     surname: “Miner”
  },                                                                 Fast
  { _rec: 4:343,
     _ver: 0,                                                   binary protocol
     name: “Tim”,
     surname: “King”
  }
}
                                                                  Java
                                                                   Java
                                                               application
                                                                application
        For more information visit: http://www.orientechnologies.com
Security
   Encrypted
 password using                                                         “Reader“ Role
SHA-256 algorithm                                                       Mode = Deny all but

                                                                        Rules:
2 modes: “allow                                                         database = Read
all but” and “deny                                                      database.cluster.* = Read
                                                                        database.cluster.metadata = None
      all but”                                                          database.class.* = Read

Each user has one
  or more roles
                                                                        “Publisher“ Role
Default roles are:
reader, writer and                                                      Mode = Deny all but
     admin                  “Admin“ Role                                Rules:
                                                                        Database.Cluster.cars = All
                            Mode = Allow all but

                     For more information visit: http://www.orientechnologies.com
OrientDB Studio




For more information visit: http://www.orientechnologies.com
Orient Key/Value – Partitions in the Ring

                                                                                   Backup=1 in
                                                                                configuration means
                                                                              that each node backup
                        Keys range: S .. Z                                    data synchronously on
                                                                                   the next one.


                                                      Back
                                Node #1                    up                 Keys range: 0 .. F
 Each node is owner
of part of keys (Node


                                                 up
                                               ck
#1 the range S-Z) and
                                                              Ba


                                             Ba
                                                                 ck
  is responsable to                                       p         u
                                                                        Node #2
 synchronize them to
       the disk
                                                                                    The last node in
                                                                                  the Ring is the last
                                               Node #3                                one started
                                                         Keys range: G .. R



                   For more information visit: http://www.orientechnologies.com
Orient Key/Value – Update an entry

                                                                           The client (application or
                                                                           web-browser) connects to
          upd                                                               the owner node of the
             a   te b     Keys range: S .. Z                                   entry to update
                     and
                         :Co
                             ld p
                                 lay
                                                         Back
                                      Node #1                 up                     Keys range: 0 .. F
                          to   disk
                      e
                  sav



                                                     p
                                                   ku
                                                                 Ba



                                                  c
                                                Ba
                                                                    ck
                                                             p         u
                                                                              Node #2


  Node #1 is the owner of the
  updated entry: propagates
changes to the local disk and to                  Node #3
 backup node synchronously                                  Keys range: G .. R



                    For more information visit: http://www.orientechnologies.com
Orient Key/Value – Fail Over Management

                                                                               The Backup of Node #1
                                                                                 is the Node #2. The
                                                                                Node #2 becames the
                    Keys range: S .. Z                                          owner and assures to
                                                                                write all the entries to
                                                                                        the Disk

                                                  Back
                            Node #1                    up                 Keys range: S .. F


                                             up
                                           ck
                                                          Ba

                                         Ba
                                                             ck
                                                                              save to d
                                                                                       isk
                                                      p         u
Other Nodes envolved                                                Node #2
  change the backup
policies themselves. In
  this case Node #3
 backups on Node #2
     and viceversa                         Node #3
                                                     Keys range: G .. R


                    For more information visit: http://www.orientechnologies.com

Más contenido relacionado

La actualidad más candente

Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
chriskite
 
Hadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox GatewayHadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox Gateway
DataWorks Summit
 

La actualidad más candente (20)

Introduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processingIntroduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processing
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture Forum
 
Spark Autotuning Talk - Strata New York
Spark Autotuning Talk - Strata New YorkSpark Autotuning Talk - Strata New York
Spark Autotuning Talk - Strata New York
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
 
Distributed Locking in Kubernetes
Distributed Locking in KubernetesDistributed Locking in Kubernetes
Distributed Locking in Kubernetes
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Redis trouble shooting
Redis trouble shootingRedis trouble shooting
Redis trouble shooting
 
Apache Arrow Flight Overview
Apache Arrow Flight OverviewApache Arrow Flight Overview
Apache Arrow Flight Overview
 
DNS Security Presentation ISSA
DNS Security Presentation ISSADNS Security Presentation ISSA
DNS Security Presentation ISSA
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
Graph databases
Graph databasesGraph databases
Graph databases
 
Hadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox GatewayHadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox Gateway
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented Databases
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
 
MongoDB
MongoDBMongoDB
MongoDB
 
ServerlessConf 2018 Keynote - Debunking Serverless Myths
ServerlessConf 2018 Keynote - Debunking Serverless MythsServerlessConf 2018 Keynote - Debunking Serverless Myths
ServerlessConf 2018 Keynote - Debunking Serverless Myths
 
Morel, a Functional Query Language
Morel, a Functional Query LanguageMorel, a Functional Query Language
Morel, a Functional Query Language
 

Destacado

Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDB
Luca Garulli
 
OrientDB the graph database
OrientDB the graph databaseOrientDB the graph database
OrientDB the graph database
artem_orobets
 
Austin Data Geeks - Why relationships are cool but join sucks
Austin Data Geeks - Why relationships are cool but join sucksAustin Data Geeks - Why relationships are cool but join sucks
Austin Data Geeks - Why relationships are cool but join sucks
Orient Technologies
 

Destacado (20)

OrientDB for real & Web App development
OrientDB for real & Web App developmentOrientDB for real & Web App development
OrientDB for real & Web App development
 
OrientDB vs Neo4j - Comparison of query/speed/functionality
OrientDB vs Neo4j - Comparison of query/speed/functionalityOrientDB vs Neo4j - Comparison of query/speed/functionality
OrientDB vs Neo4j - Comparison of query/speed/functionality
 
OrientDB vs Neo4j - and an introduction to NoSQL databases
OrientDB vs Neo4j - and an introduction to NoSQL databasesOrientDB vs Neo4j - and an introduction to NoSQL databases
OrientDB vs Neo4j - and an introduction to NoSQL databases
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL
OrientDB - the 2nd generation  of  (Multi-Model) NoSQLOrientDB - the 2nd generation  of  (Multi-Model) NoSQL
OrientDB - the 2nd generation of (Multi-Model) NoSQL
 
Presentation of OrientDB v2.2 - Webinar
Presentation of OrientDB v2.2 - WebinarPresentation of OrientDB v2.2 - Webinar
Presentation of OrientDB v2.2 - Webinar
 
Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDB
 
OrientDB distributed architecture 1.1
OrientDB distributed architecture 1.1OrientDB distributed architecture 1.1
OrientDB distributed architecture 1.1
 
Why relationships are cool but "join" sucks
Why relationships are cool but "join" sucksWhy relationships are cool but "join" sucks
Why relationships are cool but "join" sucks
 
OrientDB the graph database
OrientDB the graph databaseOrientDB the graph database
OrientDB the graph database
 
OrientDB document or graph? Select the right model (old presentation)
OrientDB document or graph? Select the right model (old presentation)OrientDB document or graph? Select the right model (old presentation)
OrientDB document or graph? Select the right model (old presentation)
 
Graph Databases & OrientDB
Graph Databases & OrientDBGraph Databases & OrientDB
Graph Databases & OrientDB
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL - J On The Beach 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL  - J On The Beach 2016OrientDB - the 2nd generation of (Multi-Model) NoSQL  - J On The Beach 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - J On The Beach 2016
 
Austin Data Geeks - Why relationships are cool but join sucks
Austin Data Geeks - Why relationships are cool but join sucksAustin Data Geeks - Why relationships are cool but join sucks
Austin Data Geeks - Why relationships are cool but join sucks
 
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 OrientDB & Hazelcast: In-Memory Distributed Graph Database OrientDB & Hazelcast: In-Memory Distributed Graph Database
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 
Geospatial Graphs made easy with OrientDB - Codemotion Spain
Geospatial Graphs made easy with OrientDB - Codemotion SpainGeospatial Graphs made easy with OrientDB - Codemotion Spain
Geospatial Graphs made easy with OrientDB - Codemotion Spain
 
Orient power point
Orient power pointOrient power point
Orient power point
 
Optimizing Cypher Queries in Neo4j
Optimizing Cypher Queries in Neo4jOptimizing Cypher Queries in Neo4j
Optimizing Cypher Queries in Neo4j
 
An overview of InfiniteGraph, the distributed graph database
An overview of InfiniteGraph, the distributed graph databaseAn overview of InfiniteGraph, the distributed graph database
An overview of InfiniteGraph, the distributed graph database
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
 
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
OrientDB, the fastest document-based graph database @ Confoo 2014 in Montreal...
 

Similar a OrientDB introduction - NoSQL

Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
Sergio Bossa
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
BigBlueHat
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Marco Gralike
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
Shreedhar Ganapathy
 

Similar a OrientDB introduction - NoSQL (20)

Guillotina
GuillotinaGuillotina
Guillotina
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data SourcesVirtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
 
Guillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource APIGuillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource API
 
Realm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to RealmRealm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to Realm
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
The Glory of Rest
The Glory of RestThe Glory of Rest
The Glory of Rest
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
 
Play framework
Play frameworkPlay framework
Play framework
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
 
Import web resources using R Studio
Import web resources using R StudioImport web resources using R Studio
Import web resources using R Studio
 

Más de Luca Garulli

Why relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in RomeWhy relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in Rome
Luca Garulli
 
Switching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.itSwitching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.it
Luca Garulli
 
Internet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScriptInternet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScript
Luca Garulli
 

Más de Luca Garulli (16)

Scale Out Your Graph Across Servers and Clouds with OrientDB
Scale Out Your Graph Across Servers and Clouds  with OrientDBScale Out Your Graph Across Servers and Clouds  with OrientDB
Scale Out Your Graph Across Servers and Clouds with OrientDB
 
Polyglot Persistence vs Multi-Model Databases
Polyglot Persistence vs Multi-Model DatabasesPolyglot Persistence vs Multi-Model Databases
Polyglot Persistence vs Multi-Model Databases
 
How Graph Databases started the Multi Model revolution
How Graph Databases started the Multi Model revolutionHow Graph Databases started the Multi Model revolution
How Graph Databases started the Multi Model revolution
 
OrientDB and Hazelcast
OrientDB and HazelcastOrientDB and Hazelcast
OrientDB and Hazelcast
 
Why relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in RomeWhy relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in Rome
 
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
 
Switching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.itSwitching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.it
 
Switching from Relational to the Graph model v1.3
Switching from Relational to the Graph model v1.3Switching from Relational to the Graph model v1.3
Switching from Relational to the Graph model v1.3
 
Switching from relational to the graph model
Switching from relational to the graph modelSwitching from relational to the graph model
Switching from relational to the graph model
 
Internet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScriptInternet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScript
 
Switching from the Relational to the Graph model
Switching from the Relational to the Graph modelSwitching from the Relational to the Graph model
Switching from the Relational to the Graph model
 
No sql matters_2012_keynote
No sql matters_2012_keynoteNo sql matters_2012_keynote
No sql matters_2012_keynote
 
OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1
 
Roma introduction and concepts
Roma introduction and conceptsRoma introduction and concepts
Roma introduction and concepts
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial Basics
 
Roma Meta Framework Concepts @JavaDay Rome 2007
Roma Meta Framework Concepts @JavaDay Rome 2007Roma Meta Framework Concepts @JavaDay Rome 2007
Roma Meta Framework Concepts @JavaDay Rome 2007
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

OrientDB introduction - NoSQL

  • 1. “A NoSQL Database for the Internet age” www.OrienTechnologies.com Author of OrientDB and Roma Luca Garulli Luca Garulli Framework Open Source projects, CTO@AssetData.it CTO@AssetData.it CTO at Asset Data company, http://zion-city.blogspot.com http://zion-city.blogspot.com Technical Manager at Romulus http://twitter.com/lgarulli http://twitter.com/lgarulli consortium
  • 2. NoSQL movement “In recent years, a number of new systems, sometimes called “NoSQL” systems, have been introduced to provide indexed data storage that is much higher performance than existing relational database products like MySQL, Oracle, DB2, and SQL Server. These data storage systems have a number of features in common: ● A simple call level interface or protocol (in contrast to a SQL binding) ● Ability to horizontally scale throughput over many servers, ● Efficient use of distributed indexes and RAM for data storage, and ● The ability to dynamically define new attributes or data schema“ from “High Performance Scalable Data Stores” by Rick Cattell For more information visit: http://www.orientechnologies.com
  • 3. Products There are two main products released with commercial friendly Open Source Apache 2 license Deeply scalable Document based DBMS that uses the The Key/Value Server based on the features of the Graph Databases to handle links. It's the Document Database technology and basic engine of all the Orient products. It can work in accessible as embedded repository schema-less mode, schema-full or a mix of both. via Java APIs or via HTTP using a RESTful API. Orient K/V uses a new Supports advanced features, such as indexing, fluent and algorithm called RB+Tree, derived SQL-like queries. It handles natively JSON and XML from the Red-Black Tree and from the documents. Developers can use Java native and HTTP B+Tree. RESTful APIs Orient Key/Value server can run in Graphs of hundreads of linked objects can be retrieved all high availability mode using a in memory in less than 1ms without executing costly JOINs cluster of multiple nodes partitioned. such as the Relational DBMSs do. For more information visit: http://www.orientechnologies.com
  • 5. Cluster concept Class “Profile“ has records distributed on multiple clusters. Class “Profile“ Class “Profile“ Cluster “FamousProfile“ Cluster “FamousProfile“ All the other Type = physical Type = physical profiles will be stored into the Jay Miner Bill Gates “OtherProfile“ cluster of type “logical“ The “FamousProfile“ cluster contains all the profile of the most famous people and it's supposed to being accessed frequently. This Cluster “Twit“ Cluster “OtherProfile“ is the reason why we selected Cluster “Twit“ Cluster “OtherProfile“ Type = physical Type = logical “physical“ as type. Type = physical Type = logical For more information visit: http://www.orientechnologies.com
  • 6. APIs OrientDB is written 100% in Java® and can run on any platform that supports the Java® Technology version 5 or more. OrientDB supports native Java client API to work with embedded or remote databases using the fast binary protocol OrientDB Server comes with a HTTP RESTful interface to being used from any language, even from the Internet Browser. Uses JSON to represents records For more information visit: http://www.orientechnologies.com
  • 7. Java example with records // OPEN THE DATABASE ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/demo").open("admin", "admin"); // CREATE A NEW DOCUMENT AND FILL IT ODocument doc = new ODocument(db, "Person"); This is a doc.field( "name", "Luke" ); relationship doc.field( "surname", "Skywalker" ); Many-to-One doc.field( "city", new ODocument("City" ).field("name","Rome").field("country", "Italy") ); // SAVE THE DOCUMENT doc.save(); // QUERY THE DOCUMENT Query using the List<ODocument> result = database.query( SQL syntax with new OSQLSynchQuery("select * from person where city.name = 'Rome'")).execute(); extensions to traverse links // PRINT THE RESULT SET for( ODocument d : result ){ without costly System.out.println("Person: " + d.field( "name" ) + d.field( "surname" )); JOINs } db.close(); For more information visit: http://www.orientechnologies.com
  • 8. Object Database interface Even if OrientDB is not an ODBMS (but is a Document DBMS), it offers the ODatabaseObject interface to works with POJOs in transparent way removing the Impedence Mismatch problem Fields not present in the real Java class will be not mapped but saved with the original record Queries convert automatically records to POJOs References between POJO can be stored as links (aka relationships) or by including the referenced object as embedded. For more information visit: http://www.orientechnologies.com
  • 9. Java example with POJOs // OPEN THE DATABASE ODatabaseObjectTx db = new ODatabaseObjectTx("remote:localhost/demo").open("admin", "admin"); // CREATE A NEW OBJECT AND FILL IT Person person = new Person(); Automatic person.setName( "Luke" ); binding from person.setSurname( "Skywalker" ); person.setCity( new City( "Rome", "Italy") ); POJO to record // SAVE THE OBJECT db.save( person ); Query returns directly List of POJO. Queries use the // QUERY THE OBJECT cache before to load the List<Person> result = database.query( records from the storage new OSQLSynchQuery("select from person where city.name = 'Rome'")); // PRINT THE RESULT SET for( Person p : result ){ System.out.println("Person: " + p.getName() + “ “ + p.getSurname() ); The POJOs } are usable as usually db.close(); For more information visit: http://www.orientechnologies.com
  • 10. HTTP RESTful API select from Profile where project = 'Amiga' HTTP RESTful protocol (JSON) OrientDB OrientDB { result : { _rec: 3:4, Server Server _ver: 2, name: “Jay”, surname: “Miner” }, Fast { _rec: 4:343, _ver: 0, binary protocol name: “Tim”, surname: “King” } } Java Java application application For more information visit: http://www.orientechnologies.com
  • 11. Security Encrypted password using “Reader“ Role SHA-256 algorithm Mode = Deny all but Rules: 2 modes: “allow database = Read all but” and “deny database.cluster.* = Read database.cluster.metadata = None all but” database.class.* = Read Each user has one or more roles “Publisher“ Role Default roles are: reader, writer and Mode = Deny all but admin “Admin“ Role Rules: Database.Cluster.cars = All Mode = Allow all but For more information visit: http://www.orientechnologies.com
  • 12. OrientDB Studio For more information visit: http://www.orientechnologies.com
  • 13. Orient Key/Value – Partitions in the Ring Backup=1 in configuration means that each node backup Keys range: S .. Z data synchronously on the next one. Back Node #1 up Keys range: 0 .. F Each node is owner of part of keys (Node up ck #1 the range S-Z) and Ba Ba ck is responsable to p u Node #2 synchronize them to the disk The last node in the Ring is the last Node #3 one started Keys range: G .. R For more information visit: http://www.orientechnologies.com
  • 14. Orient Key/Value – Update an entry The client (application or web-browser) connects to upd the owner node of the a te b Keys range: S .. Z entry to update and :Co ld p lay Back Node #1 up Keys range: 0 .. F to disk e sav p ku Ba c Ba ck p u Node #2 Node #1 is the owner of the updated entry: propagates changes to the local disk and to Node #3 backup node synchronously Keys range: G .. R For more information visit: http://www.orientechnologies.com
  • 15. Orient Key/Value – Fail Over Management The Backup of Node #1 is the Node #2. The Node #2 becames the Keys range: S .. Z owner and assures to write all the entries to the Disk Back Node #1 up Keys range: S .. F up ck Ba Ba ck save to d isk p u Other Nodes envolved Node #2 change the backup policies themselves. In this case Node #3 backups on Node #2 and viceversa Node #3 Keys range: G .. R For more information visit: http://www.orientechnologies.com