Mysql 5是否具有用于管理分层数据的过程? [英] Does Mysql 5 have procedures for managing hierarchical data?

查看:64
本文介绍了Mysql 5是否具有用于管理分层数据的过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用嵌套集模型将分层数据保存到数据库表,我对MySQL是否具有对添加/删除节点的内置支持还是我必须从头开始编写存储过程感兴趣. 谢谢.

I use nested set model for saving hierarchical data into database table and I'm interested in if MySQL has built-in support for adding/deleting nodes or I have to write stored procedures from scratch. Thanks.

推荐答案

据我所知,MySQL没有内置函数可以执行此操作.您可能必须实施自己的解决方案.

To my knowledge MySQL does not have an inbuilt function to do this. You may have to implement your own solution.

我已经用存储过程实现了嵌套集,并且效果很好.我相信嵌套间隔可解决与插入或删除节点所需的大量更新有关的问题-但这也有其自身的问题.

I have implemented nested sets with stored procedures and it worked well. I believe there has been further work on the Nested Set principle with Nested intervals to address the issues regarding the high number of updates required on the insertion or deletion of a node - but this too has its own set of problems.

这篇关于Mysql 5是否具有用于管理分层数据的过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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