什么是模型,LFT和rght在ACOS表使用的字段? [英] What are the model, lft, and rght fields used in the acos table?

查看:135
本文介绍了什么是模型,LFT和rght在ACOS表使用的字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是一个ACOS表CakePHP的用途/模型的含义,LFT和rght领域?
同样,什么是惯例/ LFT中的含义和rght领域在阿罗斯表?

What are the cakePHP usages/meanings of the model, lft, and rght fields in a acos table? Similarly, what are the usages/meanings of the lft and rght fields in a aros table?

推荐答案

他们由修改$所需p $ p-为了树遍历数据建模技术通常用于模拟分层数据。它们允许在一个分支选择的所有节点的快速单一查询方式。这意味着你不必使用递归和多个查询。即。

They are required by the Modified Pre-order Tree Traversal data modelling technique commonly used for modelling hierarchical data. They allow quick single query ways of selecting all nodes in a branch. This means you don't have to use recursion and multiple queries. I.e.

SELECT * FROM棵树,留下> 4,右< 8

SELECT * FROM tree WHERE left > 4 AND right < 8

在哪里4和8可能是一个父节点,要提取他们的孩子和孙子的左边和右边的值。

Where 4 and 8 might be the left and right values of a parent node, whose children and grand children you want to extract.

这篇关于什么是模型,LFT和rght在ACOS表使用的字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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