Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群25
Java1234官方群25:838462530
     

GIT视频教程(结合github,码云)免费领取

BAT一线大厂笔试面试打包下载

领取国内优秀就业,加薪,跳槽项目课程源码-vue2+jwt+springboot+mybaits前后端分离通讯录系统课程

SpringBoot打造企业级进销存

Java1234 VIP课程

领取微信扫码登录Java实现视频教程

Java1234至尊VIP(特价活动)

ArangoDB-GraphCourse_Beginners PDF 下载


分享到:
时间:2020-06-18 16:55来源:http://www.java1234.com 作者:小锋  侵权举报
ArangoDB-GraphCourse_Beginners PDF 下载
失效链接处理
ArangoDB-GraphCourse_Beginners PDF 下载


本站整理下载:
 
相关截图:
 
主要内容:

Graph Basics
What is a graph? There are multiple definitions and types. A brief overview: 
In discrete mathematics, a graph is defined as set of vertices and edges. 
In computing it is considered an abstract data type which is really good to 
represent connections or relations – unlike the tabular data structures of 
relational database systems, which are ironically very limited in expressing 
relations. 
A good metaphor for graphs is to think of nodes as circles and edges as 
lines or arcs. The terms node and vertex are used interchangeably here. 
Usually vertices are connected by edges, making up a graph. Vertices don't 
have to be connected, but they may also be connected with more than 
one other vertex via multiple edges. You may also find vertices connected 
to themselves.
7
Vertex 
Edge
Graph Basics
Important types of graphs: 
‣ Undirected – edges connect pairs of nodes without 
having a notion of direction 
‣ Directed – edges have a direction associated with them 
(the lines/arcs have arrow heads in depictions) 
‣ DAG – Directed Acyclic Graph: edges have a direction and 
their are no loops. In the most simple case, this means 
that if you have vertices A and B and an edge from A to 
B, then there must not be another edge from B to A.
One example for a DAG is a tree topology.
8
Graph Basics
In ArangoDB, each edge has a single direction, it can't point 
both ways at once. This model is also known as oriented graph. 
Moreover, edges are always directed, but you can ignore the 
direction (follow in ANY direction) when you walk through the 
graph, or follow edges in reverse direction (INBOUND) instead 
of going in the direction they actually point to (OUTBOUND). 
Walking through a graph is called traversal. 
ArangoDB allows you to store all kinds of graphs in different 
shapes and sizes, with and without cycles. You can save one 
or more edges between two vertices or even the same vertex. 
Also note that edges are full-fledged JSON documents, 
which means you can store as much information on the edges 
as you want!
9
OUTBOUND INBOUND
ANY
Graph Basics
A few examples what can be answered by graph queries with the example dataset in mind: 
‣ Give me all flights departing from JFK (airport in New York)
‣ Give me all flights landing in LAX (airport in Los Angeles) on January 5th 
‣ Which airports can I reach with up to one stopover?
(From one or multiple starting airports) 
‣ Shortest Path: 
‣ What is the minimum amount of stopovers to fly from BIS
(Bismarck Municipal Airport in North Dakota) to LAX and where is the stopover?
‣ Pattern Matching: 
‣ Departing from BIS, which flight to JFK with one stopover
(at least 20 minutes time for the transit) is the quickest and via which airport?
10

 

------分隔线----------------------------
锋哥公众号


锋哥微信号


关注公众号
回复 666
获取 java
从菜鸡到大神
全套视频教程