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 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么