您的位置:首页 > 编程语言 > ASP

ASP.net MVC、Extjs多级目录(理论上可以无限级、非递归)treepanel显示和数据库(多级目录)存储结构的设计(上篇)

2010-09-19 22:28 836 查看

[b]1、数据库(多级目录)存储结构的设计[/b]

1.1、表设计







1.2、数据显示及相关信息:

升序:

select C.tre_parent,B.tre_name as tre_parentname,C.tre_children as tre_children,A.tre_name as tre_childrenname,C.tre_children as children
from treetable A,treetable B,treestruct C
where A.tre_id=C.tre_children and B.tre_id=C.tre_parent
orderby C.tre_parent asc



降序:

select C.tre_parent,B.tre_name as tre_parentname,C.tre_children as tre_children,A.tre_name as tre_childrenname,C.tre_children as children
from treetable A,treetable B,treestruct C
where A.tre_id=C.tre_children and B.tre_id=C.tre_parent
orderby C.tre_parent desc



[b]2、多级目录思想的大概模型[/b]



[b]3、显示运行效果[/b]







[b]4、性能上分析[/b]





[b]5、总结[/b]

个人觉得这个treepanel的优点:灵活运用它的数据库设计。

当然,可能这样子的多级目录在很多项目开发上并不一定用得上。不过可以参考一下的,毕竟思想上的交流是互动的。数据库的表设计使这 多级目录上的增删除改有很大意义和灵活性。

6、以下是相关配置和使用的环境

win7系统

vs2008 sp1

SQL2005

.NET FrameWork3.5

extjs3.2版本

[b]7、下载相关[/b]

因为源代码没有加入Extjs所以这部分添加麻烦读者自己到它们的官方网站下载了。

Extjs官方下载包:http://www.sencha.com/products/js/

源代码下载包:http://files.cnblogs.com/yongfeng/TreePanel_First.rar
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: