4. ArangoDBとは
●
ArangoDB is a scalable open-source multi-model database
natively supporting graph, document and search. All supported
data models & access patterns can be combined in queries
allowing for maximal flexibility. ArangoDB runs on prem, in the
cloud – anywhere.
– Source: https://www.arangodb.com/
11. ArangoDBにおけるデータ操作紹介の前に
●
ArangoDBでは基本AQLを利用してデータ操作します
●
AQLとは
– The ArangoDB Query Language (AQL) can be used to retrieve and
modify data that are stored in ArangoDB.
– ざっくりいうとMySQLでのSQLという感じ(ArangoDBでのAQL)
●
この名前のせいで過去においてはGoogle先生に聞くと、もしか
してSQLってなってSQLの結果が出てくる…いまはAcceptance
Quality Limitが出てくる…aql arangodbと検索しましょう
17. CRUD操作(read) 集計
// testコレクションのデータをすべて回す
FOR t IN test
FILTER
// 50未満のデータを対象にする
t.id < 50
// 集計(FLOOR(t.id / 10)の結果が同じものでグループ化&結果はfに代入、sにグ
ループ化されたデータの合計を代入、gに対象となったデータを入れる
COLLECT f = FLOOR(t.id / 10) AGGREGATE s = SUM(t.value) INTO g
// データを返す
RETURN {
f: f,
sum: s,
g: g
}
18. 詳しくなるために
●
公式WebPage
– ArangoDB, the multi-model database for graph and beyond
●
GitHub
– arangodb/arangodb: ArangoDB is a native multi-model database wi
🥑
th flexible data models for documents, graphs, and key-values. Build
high performance applications using a convenient SQL-like query lan
guage or JavaScript extensions.
●
Document
– ArangoDB v3.8.1 Documentation