Chúng tôi có thể thấy rằng EmployeeTypeis lập bản đồ trivially dễ dàng đến điểm mà chúng ta không thực sự có
làm bất cứ điều gì ở tất cả. Giá trị mặc định được áp dụng, và tất cả mọi thứ sẽ chỉ làm việc. Các typefield sẽ được
ánh xạ tới một TYPEcolumn số nguyên, và tất cả nhân viên toàn thời gian sẽ có một thứ tự từ 0 gán cho
họ. Tương tự như các nhân viên khác sẽ có các loại của họ được lưu trữ trong tập đoàn Accor TYPEcolumn dingly.
Nếu một thay đổi kiểu liệt kê, tuy nhiên, sau đó chúng tôi có một vấn đề. Các dữ liệu thứ tồn tại trong
cơ sở dữ liệu sẽ không còn áp dụng đối với các giá trị chính xác. Ví dụ, nếu công ty có lợi cho chính sách
thay đổi và chúng tôi bắt đầu cho lợi ích bổ sung để bán thời gian người lao động đã làm việc hơn 20
giờ mỗi tuần, chúng tôi muốn phân biệt giữa hai loại nhân viên bán thời gian. Bằng
cách thêm một PART_TIME_BENEFITS_EMPLOYEEvalue sau PART_TIME_EMPLOYEE, chúng ta sẽ gây ra một mới
chuyển nhượng tự xảy ra, trong đó giá trị mới của chúng tôi sẽ được giao cho thứ tự của 2 và
CONTRACT_EMPLOYEEwould được 3. Điều này sẽ có tác dụng gây ra tất cả các nhân viên hợp đồng
kỷ lục để trở thành bất ngờ nhân viên bán thời gian với các lợi ích, rõ ràng không phải là kết quả mà chúng tôi đã
hy vọng.
đang được dịch, vui lòng đợi..