Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would think that your data model will depend upon what information you need to report on. For example, I would be inclined to have the standard <code>EMPLOYEE</code> and <code>DEPARTMENT</code> tables (like the Oracle default <code>SCOTT</code> schema).</p> <p>I would also have a status column where you could denote an employee is a current employee or a prospective employee thereby allowing you to report on current hires and forecast hires. You could add functional constraints/business rules around what columns are required depending upon the status of the employee etc. so current employees would have full names, DOB etc whereas prospective employees might not.</p> <p>I would also then create an audit table to track the changes the <code>EMPLOYEE</code> record undergoes. This would allow you to retrospectively find their department changes and when the record employee changed from a prospective to current employee etc. as awell as any changes to other data within the <code>EMPLOYEE</code> record.<br /> It would also have the advantage of keeping all your data in one location. You could also consider partitioning the <code>EMPLOYEE</code> table using the status column if needed.</p> <p>This would give you the benefit of only ever issuing a single ID to each employee throughout their process through the various stages of employment in your application.</p> <p>Another benefit of the status column is that you could then introduce any other stages an employee could go through as needed in the future.</p> <p><strong>EDIT:</strong></p> <p>This would also ensure that if you needed to add columns in the future as you mentioned, you only have to support one table structure.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload