求一数据库设计

Mark杨 2010-05-15 11:27:03
考勤系统.

1.上班类型有:
a. 二班 8:00 11:30 14:00 18:00
b. 早班 8:00 16:00
c. 中班 16:00 24:00
d. 晚班 00:00 8:00

2.打卡记录是从打卡机导出来的
登记号(与用户表对应) 时间 checktype(I/O I:上班 O:下班)
1 2010-5-15 7:56:56 I
5 2010-5-15 7:58:55 I
6 2010-5-15 8:02:12 O
22 2010-5-15 8:02:23 O

请问这个考勤系统的数据库要如何设计啊?
不知道 你们理解我的意思没有。。。
...全文
62 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ziyelengzui 2010-05-15
  • 打赏
  • 举报
回复
赞同楼上的说法
Mark杨 2010-05-15
  • 打赏
  • 举报
回复
没有自由上班时间的。。。

就几种类型的上班时间
messi_yang 2010-05-15
  • 打赏
  • 举报
回复
我覺得還是少了點東西吧
如果沒有規定某員工的上班類型的話
不是會出現異常嗎 ?
csw200201 2010-05-15
  • 打赏
  • 举报
回复
Use translate.google.com
Mark杨 2010-05-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 csw200201 的回复:]
You need
(1) Staff table storing staff information
At a minimum, you will need a StaffID (Identity integer field) primary key

(2) ShiftTypes table store shift information. Suggested columns inclu……
[/Quote]

大大 英文好难懂啊
csw200201 2010-05-15
  • 打赏
  • 举报
回复
You need
(1) Staff table storing staff information
At a minimum, you will need a StaffID (Identity integer field) primary key

(2) ShiftTypes table store shift information. Suggested columns include
ShiftTypeID (Identity integer field) primary key, StartTime (datetime type), FinishTime (datetime), Active (bit field) - this field can be used to determine if a shift is still being used. You could have shift that are no longer in use. If a particular shift changes starting and finishing time, you should create a new Shift Type to supersede the original one.

(3) Roster table stores Employee ShiftTypeID, actual start and finish time. You need
RosterID (Identity integer), StaffID (foreign key to Employees table), ShiftTypeID (foreign key to ShiftType table), ActualEntryTime (datetime), ActualFinishTime (datetime).

This is a very rudimentary design but it should do what you want give your current specification.

27,579

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧