Your data model may be over-simplified. Employees can come and go. You probably want overall information about the employee, but you might also want a history table. After all, employees change departments, history, and so on. Retirement is not the only issue.
As for retirement itself, I see nothing wrong with including a retirement date in one of the entities. And if it is NULL
, then there is no known retirement. You might want to put a default date far in the future rather than NULL
.
The following two methods are both reasonable ways of defining retired/active customers:
(case when retirement_date < current_date then 'RETIRED' else 'ACTIVE' end)
(case when retirement_date > current_date then 'ACTIVE' else 'RETIRED' end)
However, the first doesn't work when retirement_date
is NULL
for active customers. For this reason, it might be better to put in a date far, far in the future for active employees. In that case, both formulations works, and you don't have to worry (as much) about application logic.