English 中文(简体)
图表
原标题:Organizational chart represented in a table

我有一份准入申请,我有一份雇员表。 雇员是本组织若干不同层次的一部分。 org化有1个全球机制,5个部门负责人,每个部门负责人是几个主管,由这些主管担任。

根据雇员的地位,他们只能查阅其下属人员的记录。

我想以某种级别制度来代表本组织。 我认为,问题在于,在同一个级别上有许多ppl(例如主管),但他们不能查阅另一个部门的主管记录。 我如何处理这个问题?

最佳回答

在数据库中保存这种等级数据的一种共同办法,只使用一个表格,其中的领域有:

  1. userId (primary key)
  2. userName
  3. supervisorId (self-referential "foreign key", refers to another userId in this same table)
  4. positionCode (could be simple like 1=lakey, 2=supervisor; or a foreign key pointing to another table of positions and such)
  5. ...whatever else you need to store for each employee...

然后,您的问询用了KQ号,表示许可。 如果告诉雇员,允许X级主管(例如,其用户为3人)见面,请询问所有雇员,监督Id=3。

如果你想要高档的船能够看看一看他们背后的人,那么最容易的是进行休养式搜查。 I.e. query for all those that reports to this Great bos, and for each of them query who reports to them, all the path.

这是否有意义? 您请该数据库通过所有用户进行分类,因为计算机在这类情况下是好的。

比如,如果你希望某些人获得不同的许可,我就这样说了立场。


或许我要让其他一些人试图更好地解释。

问题回答

暂无回答




相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

access query to filter and combine count

i have two access tables tableA num count 1 7 2 8 3 9 4 9 5 13 6 6 tableB num count 0 1 1 14 2 12 3 5 4 5 5 11 6 5 how can i create an access query that ...

How to show File Picker dialog in Access 2007?

I want to show a dialog where the user can pick a file, click OK, and then the path to the file will be saved in the database. I have just one problem, I can t figure out how tho show the dialog ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

Returning row number on MS Access

I have 4 tables, from which i select data with help of joins in select query...I want a serial no.(row number) per record as they are fetched. first fetched record should be 1, next 2 and so on... In ...

热门标签