摘要
阐述了树形结构的数据在数据库中的两种存储方式单编号和双编号法,以及树形数据的排序算法。最后以微软数据库SQL Server为操作平台,利用T-SQL语言编写程序代码,详细讲解了利用递归法来实现双编号树形数据的深度排序算法;同时采用样例数据进行测试,得到了令人满意的结果。
Two methods of saving the tree-like data - single identity number and double one are introduced, and so the sorting algorithm. Taking SQL Server as the platform, the depth-sorting algorithm for the double identity number tree-like data, realized by recursion, is explained in detail. The algorithm is compiled in T-SQL language. We test the algorithm with an example, the result is satisfied.
出处
《长春工业大学学报》
CAS
2006年第4期311-314,共4页
Journal of Changchun University of Technology
基金
公安部基金资助项目(2005yycxwjxy145)
关键词
树形数据
数据库
T—SQL递归
双编号
深度排序
Tree-like data
database
T-SQL
recursion
double identity number
depth sorting.