Submit Search
Upload
NESTED-SETS 数据结构与算法
•
Download as ODP, PDF
•
5 likes
•
766 views
Wei Li
Follow
Report
Share
Report
Share
1 of 18
Download now
Recommended
O2
O2
Rajesh Yaramadi
9 a05407 formal_languages_automata_theor_yfr_2029
9 a05407 formal_languages_automata_theor_yfr_2029
Rajesh Yaramadi
Nour Eldeen Al-Hammoury - CV
Nour Eldeen Al-Hammoury - CV
Nour AL-Hammoury
Compute1 dfa
Compute1 dfa
Rajesh Yaramadi
Co [uandi star.org]
Co [uandi star.org]
Rajesh Yaramadi
Manufacturer of Mebendazole
Manufacturer of Mebendazole
kamallepharmaco
Nodejs
Nodejs
Mahmoud Atef Abdelsamie
07 a0123 sustainable development briefing note
07 a0123 sustainable development briefing note
Rajesh Yaramadi
Recommended
O2
O2
Rajesh Yaramadi
9 a05407 formal_languages_automata_theor_yfr_2029
9 a05407 formal_languages_automata_theor_yfr_2029
Rajesh Yaramadi
Nour Eldeen Al-Hammoury - CV
Nour Eldeen Al-Hammoury - CV
Nour AL-Hammoury
Compute1 dfa
Compute1 dfa
Rajesh Yaramadi
Co [uandi star.org]
Co [uandi star.org]
Rajesh Yaramadi
Manufacturer of Mebendazole
Manufacturer of Mebendazole
kamallepharmaco
Nodejs
Nodejs
Mahmoud Atef Abdelsamie
07 a0123 sustainable development briefing note
07 a0123 sustainable development briefing note
Rajesh Yaramadi
Flat [ www.uandi star.org]
Flat [ www.uandi star.org]
Rajesh Yaramadi
Workshop 3 - Bird & Bird
Workshop 3 - Bird & Bird
Civic Agenda
Dbms[uandi star.org]
Dbms[uandi star.org]
Rajesh Yaramadi
Nour Eldeen Al-Hammoury - CV
Nour Eldeen Al-Hammoury - CV
Nour AL-Hammoury
Ruth Shinoda - London Child Poverty Conference
Ruth Shinoda - London Child Poverty Conference
Civic Agenda
Angela Brady - Keynote
Angela Brady - Keynote
Civic Agenda
Production Period
Production Period
danezaantonio
Mathew - Frith- Peabody Well Being
Mathew - Frith- Peabody Well Being
Civic Agenda
Finite automata
Finite automata
Rajesh Yaramadi
Lizzie Clifford -Opening Plenary
Lizzie Clifford -Opening Plenary
Civic Agenda
More Related Content
Viewers also liked
Flat [ www.uandi star.org]
Flat [ www.uandi star.org]
Rajesh Yaramadi
Workshop 3 - Bird & Bird
Workshop 3 - Bird & Bird
Civic Agenda
Dbms[uandi star.org]
Dbms[uandi star.org]
Rajesh Yaramadi
Nour Eldeen Al-Hammoury - CV
Nour Eldeen Al-Hammoury - CV
Nour AL-Hammoury
Ruth Shinoda - London Child Poverty Conference
Ruth Shinoda - London Child Poverty Conference
Civic Agenda
Angela Brady - Keynote
Angela Brady - Keynote
Civic Agenda
Production Period
Production Period
danezaantonio
Mathew - Frith- Peabody Well Being
Mathew - Frith- Peabody Well Being
Civic Agenda
Finite automata
Finite automata
Rajesh Yaramadi
Lizzie Clifford -Opening Plenary
Lizzie Clifford -Opening Plenary
Civic Agenda
Viewers also liked
(10)
Flat [ www.uandi star.org]
Flat [ www.uandi star.org]
Workshop 3 - Bird & Bird
Workshop 3 - Bird & Bird
Dbms[uandi star.org]
Dbms[uandi star.org]
Nour Eldeen Al-Hammoury - CV
Nour Eldeen Al-Hammoury - CV
Ruth Shinoda - London Child Poverty Conference
Ruth Shinoda - London Child Poverty Conference
Angela Brady - Keynote
Angela Brady - Keynote
Production Period
Production Period
Mathew - Frith- Peabody Well Being
Mathew - Frith- Peabody Well Being
Finite automata
Finite automata
Lizzie Clifford -Opening Plenary
Lizzie Clifford -Opening Plenary
NESTED-SETS 数据结构与算法
1.
在SQL数据库中高效组织层次数据 NESTED-SETS数据结构与算法 李维
< [email_address] >
2.
一个层次数据的例子
3.
改成容器形式
4.
给每个节点加上两个数字
5.
这就是Nested-Sets!
6.
7.
8.
这种方法被称作改进的先序遍历算法
9.
10.
11.
查询子树深度
12.
检索节点下的第一级子节点
13.
....
14.
15.
删除节点
16.
再看一遍图
17.
18.
第一步:找出插入位置的前一个节点的 Left 与
Right 值,如果是空表,则都为0。
19.
第二步:更新插入位置以后所有节点的Left为Left+n,Right为Right+n
20.
第三步:实际插入数据,被插入节点的Left为前一节点的Right+1。
21.
插入节点的MySQL例子
22.
23.
宽度:节点 Right -
Left
24.
删除节点的MySQL例子
25.
26.
27.
产品分类
28.
物料表
29.
....
30.
31.
“Google is your
best friend.”
32.
有任何问题?
33.
感谢!
Download now