November 4, 2010 at 12:29 am
Dear Friends,
we have a table called salary formula's which is storing a formula like 's128+s134' .
where s denotes the Salary component and 128 and 134 refers to salary and Dearness Allowance.If we are calculating from this Formula, if salary is 5000 and DA is 2000 then Salary is 7000.I found in a site that
storing computable columns is not a wise method in DB Design.For the above case it is very difficult to find the calculation,since there are so many salary formulas are changing.Any way to find solutions for this Problem or change the DB design.If yes please specify the best way of DB design.
Regards
Varun R
November 4, 2010 at 3:03 am
varunfilim (11/4/2010)
128 and 134 refers to salary and Dearness Allowance.If we are calculating from this Formula, if salary is 5000 and DA is 2000 then Salary is 7000
What you are trying to say i cant get you is 128 and 134 is the formula or 128 is a salary and 134 is DA for one employee you are saying as salary formula as your table name thats why i have confusion over here
Yes you are correct storing computable columns is not a wise method in DB Design
One thing are the salary formula changing or DA formula is changing ?
It will be in you colum as S500+S200 no need to have as S700
Thanks
Parthi
Thanks
Parthi
November 4, 2010 at 5:20 am
Dear parthi,
Sorry for my mistake. 128 and 134 are the ID's of Salary and DA.Can u specify how to design a table for storing Formula? or How we will manage this situation.
November 4, 2010 at 5:36 am
It may help if you describe what functions you need in the "formula".
If it is simply additive elements (ie a salary plus an "allowance" ) which is what it would seem from your example than I would have multiple rows each referring to the appropriate cost element.
I am not sure what you mean by the numbers being an "ID Of Salary" so posting the entire DDL for all tables woul dalso be useful.
Now if your "formula" needs to do more than add multiple elements it could get harder..
Mike John
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply