基本上如下,但其实还有很多细节需要去讨论,不是一篇贴子中能讨论完的了。假设一个员工只属于一个楼层的一个工段。
表:楼层信息表 building(floorID, floorName,...)
工段信息表 line ( lineNo,lineDescriptoin,Supervisor,...)
组织构架表 org (SupID,LineLeaderID)
员工信息表 employee(empID,empName,EmpExt(分机号),LineNo(工段),FloorID,LineLeaderID,....)日历表 calendar (sdate,type) 日期,类型(周休,国假,)
出勤记录 attendrec (empID,sdate,chkIn,chkOut,shiftType,....)
表:楼层信息表 building(floorID, floorName,...)
工段信息表 line ( lineNo,lineDescriptoin,Supervisor,...)
组织构架表 org (SupID,LineLeaderID)
员工信息表 employee(empID,empName,EmpExt(分机号),LineNo(工段),FloorID,LineLeaderID,....)日历表 calendar (sdate,type) 日期,类型(周休,国假,)
出勤记录 attendrec (empID,sdate,chkIn,chkOut,shiftType,....)
建表的时候 有必要将索引设计好 比如楼上的 完全有必要将 员工的ID作为索引放在其它几个表中 .
楼层信息表 building(floorID, empID, floorName,...)
工段信息表 line ( lineNo, empID, lineDescriptoin,Supervisor,...)
组织构架表 org ( SupID, empID, LineLeaderID )
员工信息表 employee(empID,empName,EmpExt(分机号),LineNo(工段),FloorID,LineLeaderID,....)日历表 calendar (sdate,type) 日期,类型(周休,国假,)
出勤记录 attendrec (empID,sdate,chkIn,chkOut,shiftType,....) 。。表还是要根据你要实现的功能来建 . .