开发者

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

开发者 https://www.devze.com 2023-02-19 17:46 出处:网络
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 co

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. 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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消