开发者

Employee Clocking in & Out System database

开发者 https://www.devze.com 2022-12-25 03:42 出处:网络
What would be the best database design for employee clocking and out? Right now I have two tables. Employee Base Table: Employee Id, relevant information like name and address, clocked in column

What would be the best database design for employee clocking and out? Right now I have two tables.

Employee Base Table: Employee Id, relevant information like name and address, clocked in column

Employee Clocked in Table: Employee id, clock in开发者_StackOverflow社区 date, Clock in Time, Clocked Out Time.

Is this a good way to track clocked in and clocked out? I appreciate any help


1) I assume "clocked in column" in employee table is for dynamically tracking whether an employee is clocked in? If so, I'd recommend a separate "clocked in" table instead - you would usually prefer employee table to be stabler.

2) Your schema does not specify if EID and date are unique in second table. Doing so would prevent people from clocking out mid-day, so take that under consideration when building indexes


You may need a Work Schedule table to figure out if people are not clocking in when they should. For example:

Work Schedule Table

  • Schedule ID
  • Employee ID
  • Date
  • Shift Start Time
  • Shift End Time
0

精彩评论

暂无评论...
验证码 换一张
取 消