arango db for rubyists in 10mins

Post on 09-Jan-2017

68 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

for rubyists in 10mins

What is Arango db?

Multi model database NoSql Database

Features● Flexible data model for documents ● Key value storage ● Admin interface● Spesified query language ● Http interface● Foxx application

Structure of document{

“_id”: “users/1235432‘,

“_key”: “1235432”,

“_rev”: “32442525”

“firstName”: “Test”,

“lastName”: “User”,

“roles”: [“admin”, ‘moderator“]

}

Collections db._create(‘users’)

db.users.ensureIndex( /* */ )

db.users.document(“users/123256”)

db._document(“users/2213445”)

db._drop(‘users’)

Indexesdb.users.ensureIndex({type: “hash”, fields: [“first”]})

db.users.ensureIndex({type: “skiplist”, fields: [“first”, “last”], unique: true})

db.books.ensureIndex({type: “hash”, fields: [“content”], minLength: 3})

AQL FOR u IN users

FILTER u.firstName = “Test”

RETURN {

“firstName”: u.firstName

}

AQL supports

● Varibles ● Filters ● Joins ● Transactions

Also ● Graphs● Transactions

For rubyists

● gem install ashikawa-core (https://github.com/triAGENS/ashikawa-core)● Foxx framework application

Any questions?

top related