dongwuying0221 2013-03-19 10:01 采纳率: 0%
浏览 96

员工职位数据库的MySQL数据库结构

Basically, am working with a Human Resource Management application.

Positions (like trainer, deputy manager, manager, etc) are filled up based on their service.

There is a list of all employees, the one with highest service on any given date occupies the top-most position.

The number of key positions are fixed. Based on the employee's position in the list, his probable position will be displayed.

The positions are like:

  • (Position - Number of Posts)
  • Director - 1
  • Manager - 3
  • Dy. Manager - 5
  • Trainer - 10

Now, in the list of employees populated based on their experience, the first in the list will be the Director, next three will be Managers, following 5 employees will be Dy. Managers and next ten would be Trainers.

I want to design a database table for storing the positions and associated numbers. There may be possibility that new positions will be added and also, the number of positions may change with time. Example, if the number of Director posts are increased to two from one, it should be edited. As soon as the number of Director posts are edited, the first two employees in the list will be designated as probable Directors. The same logic holds good to all the other positions too.

Am not sure what should be the database structure for such a table. After done, I should be able to query the table using php for probable position of any given employee based on his rank in the employees list.

Example, if an employee is in rank 5, I should be able to query the table and get the probable position. In this case, rank 5 will be Dy. Manager.

Hope I have made my requirement clear. Please help me in designing a database table for this purpose.

Thank you!

  • 写回答

2条回答 默认 最新

  • dongmen1925 2013-03-19 10:26
    关注
    Employees
    =========
    name | Boss
    rank | 1
    doj  | 2010-01-01
    

    "Select name from Employees order by rank, doj"

    doj = date of joining

    Is that what you mean?

    rank could join to another table, where you store the readable rank title in order to generate title, name, etc

    评论

报告相同问题?

悬赏问题

  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥50 汇编语言除法溢出问题
  • ¥65 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波