Home  >  Article  >  Backend Development  >  一个crm系统数据设计有关问题

一个crm系统数据设计有关问题

WBOY
WBOYOriginal
2016-06-13 12:37:06981browse

一个crm系统数据设计问题
如题,有个员工表,里面有员工ID,名字,电话,地址,部门等等信息。如果部门不是总部,则需继续向上汇报。

现在需要设计一下数据库:
1.选择一个员工,写出该员工的汇报链。
2.如果一个部门经理,列出该部门下所有的员工。


我想到的思路使用递归解决,但是考虑到量大的话,可能效率不行。

请问有什么好的优化方法。如果用递归,请给出一些例子,如何做。谢谢

crm 数据库 优化
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn