OrientDB


Установка

Качаем с http://orientdb.com архив и распаковываем. Есть следующие варианты работы с базой данных:

# ./server.sh

# http://localhost:2480/database/GratefulDeadConcerts
# http://192.168.1.2:2480/database/GratefulDeadConcerts

curl -D - -b cookie.txt -u root:passwd   http://192.168.1.2:2480/connect/GratefulDeadConcerts
curl -D - -b cookie.txt -u root:passwd   http://192.168.1.2:2480/distributed/database/GratefulDeadConcerts
curl -D - -b cookie.txt -u root:passwd   http://192.168.1.2:2480/class/GratefulDeadConcerts/OFunction
curl  -u root:passwd   http://192.168.1.2:2480/class/GratefulDeadConcerts/OFunction

curl  -u root:passwd   http://192.168.1.2:2480/class/GratefulDeadConcerts/OFunction | python -m json.tool
sudo apt-get install jq
curl  -u root:passwd   http://192.168.1.2:2480/class/GratefulDeadConcerts/OFunction | jq

Using curl

Rest API

Create a new database (name pdm):

# Syntax: http://<server>:[<port>]/database/<database>/<type>

curl -X POST --user root:123456 "http://192.168.1.16:2480/database/pdm/plocal/graph"
curl -X POST  -H "Content-type: application/json" http://admin:admin@localhost:2480/document/mytest -d '{"name": "fname1", "@class": "FooType", "embinfo": {"someint": 42, "name": "ename1", "@class": "EmbType1", "@type": "d"}}'

Create a new class where the schema of the vertexes or edges is known.

# Syntax: http://<server>:[<port>]/class/<database>/<class-name>

curl -X POST --user root:123456 "http://192.168.1.16:2480/class/pdm/container"

Create one or more properties into a given class

# Syntax: http://<server>:[<port>]/property/<database>/<class-name>/<property-name>/[<property-type>]

curl -X POST --user root:123456 "http://192.168.1.16:2480/property/pdm/container/name"

Дополнительные источники