Redian新闻
>
Need help designing a table.
avatar
Need help designing a table.# Database - 数据库
b*e
1
Need help designing a table.
I need to design an employee-department history tracking table
1. Keep track of when an employee got hired
2. Keep track of when an employee switched departments
within the compnay
3. keep track of when an employee got terminated.
My initial design of the table schema is like this:
tblEmployeeDeptHistory
(
EmployeeId int,
DeptId int,
DateStart DateTime,
DateEnd DateTime
)
Assuming the employeeId is a foreign key of another 'employee'
table, and DeptId is
avatar
aw
2
问题在于如果一个EMPLOYEE被HIRE,FIRE,再HIRE后,他的EMPLOYEEID应该是新的了吧。
如果是这样,HIREDATE,TDATE存在EMPLOYEE TABLE里就完了。内部TRANSFER是另一码事


【在 b*e 的大作中提到】
: Need help designing a table.
: I need to design an employee-department history tracking table
: 1. Keep track of when an employee got hired
: 2. Keep track of when an employee switched departments
: within the compnay
: 3. keep track of when an employee got terminated.
: My initial design of the table schema is like this:
: tblEmployeeDeptHistory
: (
: EmployeeId int,

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。