围绕图数据库的炒作......为什么?
有一些围绕图数据库的炒作。 我想知道为什么。
在当今的网络环境中,人们可能会遇到哪些可以使用图数据库解决的问题? 图形数据库是否适合经典应用程序,即可以用作关系数据库的直接替代品吗? 所以实际上这是两个问题合二为一。
There is some hype around graph databases. I'm wondering why.
What are the possible problems that one can be confronted with in today's web environment that can be solved using graph databases? And are graph databases suitable for classical applications, i.e. can one be used as a drop-in replacement for a Relational Database? So in fact it's two questions in one.
Related: Has anyone used Graph-based Databases (http://neo4j.org/)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
许多图表的关系表示对于您可能想要执行的所有操作来说并不是特别有效。
例如,如果想要从给定节点开始获得边满足给定谓词的所有节点的连接集,则 SQL 中没有自然的方式来表达这一点。 您可能会使用谓词对边进行查询,然后必须在本地排除断开连接的边,或者在迭代查询中遵循一组到下一组的链接与数据库服务器进行非常详细的对话。
图表并不是关系数据库的一般替代品。 RDB 主要处理集合(表),而图形主要由于互连的“形状”而有趣。 使用关系数据库,您可以跟踪集合之间预定深度(固定数量的连接)的链接,结果逐步过滤和分组,而图形通常导航到任意和递归定义的深度(即不是预定数量的“连接”) 。 你可以滥用其中一个来匹配另一个的特征,但它们会有不同的优势。
Many relational representations of graphs aren't particularly efficient for all operations you might want to perform.
For example, if one wants the connected set of all nodes where edges satisfy a given predicate, starting from a given node, there's no natural way in SQL to express that. Likely you'll either do a query for edges with the predicate, and then have to exclude disconnected edges locally, or have a very verbose conversation with the database server following one set of links to the next in iterated queries.
Graphs aren't a general replacement for relational databases. RDBs deal primarily in sets (tables), while graphs are primarily interesting because of the "shape" of interconnections. With relational DBs you follow links of a predetermined depth (a fixed number of joins) between sets, with results progressively filtered and grouped, while graphs are usually navigated to arbitrary and recursively-defined depth (i.e. not a predetermined number of "joins"). You can abuse either to match the characteristics of the other, but they'll have different strengths.
在我看来,社交网站可能会受益于图数据库,因为图是存储用户之间连接的自然方式。
In my opinion, social networking sites may benefit from graph databases because graph is a natural way of storing connections between users.