简体   繁体   English

是否有任何在sql server 2008中的hierarchyid中存储社交网络图的示例

[英]Is there any examples of storing social network graph in hierarchyid in sql server 2008

I have been investigating an approach towards to store our social graph data which obviously is going to be huge when time evolves. 我一直在调查存储我们的社交图数据的方法,这显然会随着时间的推移而变大。 The graph is a bidirectional graph, meaning, two nodes are always connected to each other. 该图是双向图,意味着两个节点始终相互连接。 I was wondering if I can use SQL SERVER 2008 HierarchyId to store the relationship between two nodes. 我想知道我是否可以使用SQL SERVER 2008 HierarchyId来存储两个节点之间的关系。 The challenges are to find out shortest path between two nodes or finding out all nodes that does not blocked given node etc., 挑战是找出两个节点之间的最短路径或找出没有阻塞给定节点等的所有节点,

I know, using a graph database (I have investigated all non-windows graph databases, it is really tough to push them at this point) would be a way to go but just want to stick to SQL Server as more layers would involve more maintainability which is not possible right now. 我知道,使用图形数据库(我已经调查了所有非Windows图形数据库,在这一点上推动它们真的很难)将是一种方法,但只是想坚持SQL Server,因为更多的层将涉及更多的可维护性这是不可能的。

Thanks in advance. 提前致谢。

Because a graph can be stored as an array of points you want to look into a spatial index it should also satisfied the bidirectional node. 因为图形可以存储为您想要查看空间索引的点数组,所以它也应该满足双向节点。 A spatial-index or a space-filling-curve reduce a 2-Dimensional problem to a 1-Dimensional problem. 空间索引或空间填充曲线将二维问题简化为一维问题。 That makes it simplier. 这使它更简单。 You want to search for Nick's blog about spatial index quadtree hilbert-curve. 你想搜索Nick关于空间索引quadtree hilbert-curve的博客。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM