このブログを検索

NOTE Orientdb

Connecting to Server Instances

Before you can connect to a fresh server instance and fully control it, you need to know the root password for the database. The root password is located in the configuration file at config/orientdb-server-config.xml. You can find it by searching for the <users> element. If you want to change it, edit the configuration file and restart the server.

http://orientdb.com/docs/last/Tutorial-Run-the-console.html

Model

The table below illustrates the comparison between the relational model, the document model, and the OrientDB document model:
Relational ModelDocument ModelOrientDB Document Model
Table Collection Class or Cluster
Table Partition none Using by Cluster can implements
Row Document Document
Column Key/value pair Document field
Relationship not available Link

http://orientdb.com/docs/last/Tutorial-Document-and-graph-model.html

Referenced Relationships

OrientDB expresses relationships of these kinds using a collection of links LINKLIST, LINKSET, LINKMAP.
But With the Graph API, Edges connect only two vertices. This means that 1:n relationships are not allowed. To specify a 1:n relationship with graphs, create multiple edges.


I tried Join at http://orientdb.com/docs/last/SQL.html  

Create
https://gist.github.com/hl1vxg/165d5cb085794bb25e72d96e8a3f4863

> select * from employee where city.country.name='UK'
+----+-----+--------+-----+-----+
|#   |@RID |@CLASS  |city |name |
+----+-----+--------+-----+-----+
|0   |#87:0|Employee|#90:0|Danby|
+----+-----+--------+-----+-----+

> select name, city.country.name as country from employee where city.name='Rome'

+----+----+-------+
|#   |name|country|
+----+----+-------+
|0   |Paul|Italy  |
+----+----+-------+

0 件のコメント:

コメントを投稿