Graph Databases—Chapter 5 Graph Databases 阅读笔记
来源:互联网 发布:linux 打印机 编辑:程序博客网 时间:2024/06/05 09:34
转载请注明:http://blog.csdn.net/ict2014/article/details/17530215
本章内容概括:
首先讲述Graph Database的含义,论述了两个图模型的优缺点。其次,讲解了Neo4j的框架结构,接下来详细讲解了各个模块的设计。讲解的顺序是自下而上,从结点的设计、关系的设计到缓存结构,进而到上层接口。最后讲解了处理图数据库的框架结构Pregel。
---------------------------------------------------------------------------------------------------------------------------------------------------------
下面将对本章重点知识进行总结:
1、A graph database is a storage engine which supports a graph data model backed by native graph persistence, with access and query methods for the graph primitives to make querying the stored data pleasant and performant.
图数据库的具体定义的说明。 是一个存储引擎,支持图数据模型,并且能够提供访问、查询等方法。
2、Hypergraphs are a generalized graph model where a relationship (called a hyper-edge) can connect any number of nodes.
一种图模型结构,超图。一种关系可以连接很多结点。具体的可参照如下图1所示:
图1:超图的示例示意图
3、However triple stores are not graph databases, though they ostensibly deal in data which — once processed — tends to be logically linked.
triple store是一种图模型,是一种三元关系组。一般是主体-谓元-客体。看似像一种图关系在里面,其实并不是图数据库。
4、Neo4j的框架结构图
图2:Neo4j的框架结构图
===============我们将从下到上进行讲解这个架构===========================
5、结点的数据结构
the node store is a fixed-size record store where each record is 9 bytes in length. Fixed record sizes enable fast
lookups for nodes within the store file. Inside a node record, the first byte is the in-use flag which tells the database whether the record is currently used or can be reclaimed to store new records (with Neo4j’s .id files being used to keep track of unused records). The next four bytes are the of the first relationship connected to the node. The last four nodes bytes are the id of the first property for the node.
结点数据结构,是固定长度的,总共9个字节。固定字长可以支持快速查询。第一个字段是“in Use”,代表数据库目前是否正在使用这个结点或者可以重新存储新纪录。接下来4个字节存储的是一个关系(关系是一个双向链表,因此存储第一个即可),后面4个字节存储的是这个结点的第一个性质的id。
6、关系的数据结构
关系是固定的33个字节存储,1-5是第一个节点,5-9是第二个结点,9-13是关系的类型。后面是双向链表的存储。
7、结点和关系的具体存储的图:
8、In Neo4j there is a two-tiered caching architecture which provides this functionality.The lowest tier in the Neo4j cache stack is the filesystem cache. If the filesystem cache reflects the write characteristics of typical usage, then the high level or object cache is all about optimizing for arbitrary read patterns.
在Neo4j中包含两层的缓存架构。最底层缓存是文件系统缓存,主要是操作系统很紧密,上面一层缓存是对象缓存,用于优化任意的读。
9、object cache的架构图
10、Neo4j提供的API结构图:
============================================================================
11、Non-Functional Characteristics
(一)Transactions
(二)Recoverability
(三)Availability
(四)Scale
12、Pregel的高层架构图:
首先将图进行分割成子图,然后每一个worker对子图进行操作。
- Graph Databases—Chapter 5 Graph Databases 阅读笔记
- Graph Databases—Chapter 2 The NOSQL Phenomenon阅读笔记
- Graph Databases—Chapter1 Introduction阅读笔记
- Graph Databases—Chapter 4 Working with Graph Data阅读笔记
- Graph Databases—Chapter 3 Graphs and Connected Data阅读笔记
- FG-Index: Towards Verification-Free Query Processing on Graph Databases
- Databases
- A Simple Review Of 《Query Languages for Graph Databases》(I)
- A Simple Review Of 《Query Languages for Graph Databases》(II)
- A Simple Review Of 《Query Languages for Graph Databases》(III)
- iGraph的配置,An In-depth Comparison of Subgraph Isomorphism Algorithms in Graph Databases
- Chapter 1 Databases and Database Users
- CC Chapter 4 Tree and Graph --Graph
- Beginning ASP.NET 2.0 and Databases学习笔记(5)
- graph
- Graph
- Graph
- graph
- 职场新人要先学会沟通
- mysql基本操作
- cocos2dx,ndk编译protobuf
- 关于JAVA多线程并发synchronized的测试与合理使用
- jQuery中setTimeout的几种使用方法
- Graph Databases—Chapter 5 Graph Databases 阅读笔记
- jquery 判断滚动条到达了底部,怎么判断滚动条是否又到达的顶
- JavaScript的中写了方法,没有调用之前,即使里面有错,在浏览器上也不会报错。
- date命令相关的时间标准
- 第五届蓝桥杯—— 基础练习:闰年判断
- jquery插件为什么要这么写(function($){})(jQuery)
- Effective C++(6) 如何拒绝编译器的自动生成函数
- 从Delphi开始学Cocos2dx-3.0[10]:持续动作之旋转持续动作
- cocos2dx box2d例子