Skip to Content
图数据库,第2版
book

图数据库,第2版

by Ian Robinson, Jim Webber, Emil Eifrem
May 2025
Beginner to intermediate
238 pages
3h 8m
Chinese
O'Reilly Media, Inc.
Content preview from 图数据库,第2版

第 1 章 导言 导言

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

尽管本书大部分内容都在讨论图数据模型,但它并不是一本关于图理论的书。1我们不需要太多的理论就能利用图数据库:只要我们了解什么是图,我们就几乎可以做到了。有鉴于此,让我们来重温一下有关图的一般知识。

什么是图表?

从形式上看,图形只是顶点和边的集合 ,或者用不那么吓人的语言来说,就是一组节点和连接节点的关系。图将实体表示为节点,将这些实体与世界的关联方式表示为关系。这种通用的、富有表现力的结构使我们能够为各种场景建模,从太空火箭的建造到道路系统,从食品的供应链或来源到人口的医疗历史,等等。

例如,Twitter 的数据很容易用图表来表示。在图 1-1中,我们看到了一个由 Twitter 用户组成的小型网络。每个节点都标有User ,表示其在网络中的角色。这些节点通过关系连接起来,有助于进一步建立语义上下文:即比利关注哈里,哈里反过来也关注比利。露丝和哈里也同样相互关注,但遗憾的是,虽然露丝关注了比利,但比利还没有(尚未)回应。

grdb 0101
图 1-1. 小型社交图谱

当然,Twitter 的真实图表要比图 1-1 中的例子大几亿倍,但其工作原理完全相同。在图 1-2中,我们将图扩展到包括露丝发布的信息。

grdb 0102
图 1-2. 发布信息

图 1-2虽然简单,但显示了图模型的表达能力。很容易看出,露丝发布了一串信息。按照标有CURRENT 的关系可以找到她最近的信息。PREVIOUS 关系创建了露丝的时间线。

图形空间的高级视图

近年来,用于管理、处理和分析图形的众多项目和产品如雨后春笋般涌现。由于技术数量庞大,即使是我们这些活跃在这一领域的人也很难跟踪这些工具以及它们之间的差异。本节将提供一个高层次的框架,帮助您了解新出现的图形领域。

从 10,000 英尺的高空俯瞰,我们可以将图形空间分为两部分:

主要用于事务性在线图形持久性的技术,通常可从应用程序直接实时访问
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能驱动的商业智能

人工智能驱动的商业智能

Tobias Zwingmann
Neo4j:权威指南

Neo4j:权威指南

Luanne Misquitta, Christophe Willemsen
游戏化头脑风暴

游戏化头脑风暴

Dave Gray, Sunni Brown, James Macanufo

Publisher Resources

ISBN: 9798341658516