Slide 1

Slide 1 text

OrientDB The fastest NoSQL document graph dbms

Slide 2

Slide 2 text

Spiel •Best of NoSQL •Best of RDBMS •New ideas & concepts Luca Garulli

Slide 3

Slide 3 text

Features •HTTP / Binary •REST •JSON

Slide 4

Slide 4 text

Features • Schema-less • Schema-full • constraints / validations / inheritance • Hybrid

Slide 5

Slide 5 text

Features • ACID Transactions • Complex Types • Arrays / Hashes / Embedded Documents • Direct Links

Slide 6

Slide 6 text

Features •SQL in NoSQL • WTH? • SELECT * FROM employee WHERE name LIKE '%Jay%' AND status = 0

Slide 7

Slide 7 text

JSON Documents { '@rid' = '26:10', '@class' = 'Developer', 'name' : 'Luca', 'surname' : 'Garulli', 'company' : '19:76' }

Slide 8

Slide 8 text

Fetch Plan Invoice 3:100 | | customer +---------> Customer |! 5:233 | city! country +---------> City ---------> Country |! 11:2! 12:3 | orders +--------->* [OrderItem OrderItem OrderItem] [ 8:12! 8:19! 8:23 ]

Slide 9

Slide 9 text

Java ODocument doc = new ODocument( db, "Person" ); doc.field( "name", "Luke" ); doc.field( "surname", "Skywalker" ); doc.field( "city", new ODocument ("City" ).fields("name","Rome") ); doc.save();

Slide 10

Slide 10 text

orientdb-jruby person_class = DB.create_class :person, :name => :string doc = OrientDB::Document.new DB, "Person" doc[:name] = "Luke" doc[:surname] = "Skywalker" doc[:city] = OrientDB::Document.new DB, "City", :name => "Rome" doc.save

Slide 11

Slide 11 text

orientdb-jruby List result = db.query( new OSQLSynchQuery ( "select * from person where city.name = 'Rome'" ) ); for( ODocument d : result ) { System.out.println( "Person: " + d.field( "name" ) + d.field( "surname" ) ); } results = DB.first 'SELECT * FROM where WHERE city = "Rome"' results.each do |doc| puts "Person: " + person.name + doc.surname end

Slide 12

Slide 12 text

Queries • select from Account where address.city.country.name = 'Italy' • select from Account where addresses contains (city.country.name = 'Italy') • select from Profile where any() like '%Jay%' • select from Tree where children contains ( married = true ) • select from User where roles containsKey 'shutdown' • select from Vehicle where @class = 'Car' • select from Friend where @version > 100

Slide 13

Slide 13 text

Console ORIENT database v.0.9.23 www.orientechnologies.com Type 'help' to display all the commands supported. > connect remote:localhost/demo admin admin Connecting to database [remote:localhost/demo] with user 'admin'...OK > select from profile where nick.startsWith('L') ---+--------+--------------------+--------------------+--------------------+ # | REC ID | NICK! | SEX! | AGE | ---+--------+--------------------+--------------------+--------------------+ 0 | 10:0 | Lvca | male | 34 1 | 10:3 | Leo | male | 22 2 | 10:7 | Luisa | female | 27 3 item(s) found. Query executed in 0.013 sec(s). > close Disconnecting from the database [demo]...OK > quit

Slide 14

Slide 14 text

Web Admin

Slide 15

Slide 15 text

WINNING, DUH!

Slide 16

Slide 16 text

Links • OrientDB • orientechnologies.com • JRuby Client • github.com/aemadrid/orientdb-jruby