用于存储AVL树的数据库? [英] Database to store AVL Trees ?

查看:176
本文介绍了用于存储AVL树的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,



对于我的应用程序,我需要为每个查询均衡的标签制作AVL树。存储这种形式的数据的数据库是多么好。 XML需要花费太多时间来存储和解析?



这是一个基于.NET的项目,任何帮助都将受到赞赏。

Greetings ,

For my application I need to make AVL trees for tags that would be balanced with every query. What would be a good a database to store this form of data. XML is taking way too much time to store and parse?

It is a .NET based project and any help would be appreciated.

推荐答案

请参阅我对该问题的评论。在最简单的情况下,如果您有一些具有相同类型的节点的图形(不仅是树),它可以由单个表(节点表)表示。每个记录应该有一个或多个属性用于指示 relation 与通过其主键指向它的其他节点。 (对于AVL,此类属性可能。)此类关系表示图



请参阅:

http ://en.wikipedia.org/wiki/Relational_model [ ^ ],

http://en.wikipedia.org/wiki/AVL_tree [ ^ ],

http://en.wikipedia.org/wiki/Graph [ ^ ]。



-SA
Please see my comment to the question. In simplest case, if you have some graph (not only a tree) with the nodes of the same type, it can be represented by a single table, a table of nodes. Each record should have one or more attribute used to indicate relation with other node pointing to it by its primary key. (For AVL, such attributes could be left and right.) Such relations represent graph edges.

Please see:
http://en.wikipedia.org/wiki/Relational_model[^],
http://en.wikipedia.org/wiki/AVL_tree[^],
http://en.wikipedia.org/wiki/Graph[^].

—SA


我认为这将是一个很好的阅读如何在SQL Server中存储AVL树。



SQL中的二叉树 - 简单对话 [ ^ ]
I think this would be a good read on how to store AVL trees in SQL Server.

Binary Trees in SQL - Simple Talk[^]


这篇关于用于存储AVL树的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆