Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to design a data model that deals with the current employees and forecasted employees?
    text
    copied!<p>We are creating an application to manage the employees. The employees can be curent employees or the employees which are going to join in future (forecast).</p> <p>Apart from managing employees we also have to manage the forecast on monthly basis. </p> <p>Assuming today is April, </p> <p>Currrent employee strength is 100 as Of 26th April. </p> <p>Today, I predict 10 people will join in August. 20 Will join in November. </p> <p>When I say I predict I actually go and add 10 and 20 employees in system. I may or may not have full information. I may not even have names as They are not hired yet. But I just predict that there will be 10 hires in August and 20 in November as on April. </p> <p>Assuming there are no more leavers or joiners in between. My employee strength by end of August will be 110 and by end of November will be 130. </p> <p>So, 110 in August and 130 in November is my prediction in the month of april. </p> <p>Now, In May I come to know that in august instead of 10 only 5 are joining and in november instead of 20 , 25 will be joining plus we will be firing 10 existing employees in december.</p> <p>So my employees count as predicted in may will be 105 in August, 130 in november and 120 in december.</p> <p>So, I need to keep the employee data monthwise i.e. what was my prediction in april for the every single future month i.e. from may to december. </p> <p>again, what was my prediction in may for august to december. </p> <p>and so on. </p> <p>I also need to keep in mind that the data of the existing employees may keep on chnaging every single minute. </p> <p>Their title may change, address may change, department etc. </p> <p>So if employee A is in department D1 in April and D2 after April. </p> <p>When I pull out a report for April it should show me as D1 and when I pull out a report for June , it should show me his department as D2. </p> <p>Please help. </p> <hr> <p>There is some additional background in <a href="https://stackoverflow.com/q/10331265/146325">this previous question</a>.</p> <p>EDIT : </p> <p>Please see the following image. </p> <p>I would want to know the count of the employees as predicted in march (For Month = March) in each sub sequent months i.e. in for month = march , count in march = 400, count in April = 405. </p> <p>The numbers in the bracket shows the new employees who will be joining in that month e.g. (+10) &amp; (-5) shows employees leaving in that month. So If in march total employees are 400 and 10 are joining and 5 are leaving in April then total count will be 405 in April. </p> <p><img src="https://i.stack.imgur.com/28pQr.gif" alt="enter image description here"></p>
 

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