Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ahmedsa1985
Starting Member
2 Posts |
Posted - 2015-02-11 : 13:03:08
|
Hi guys I have problem i need to make erd relation entitybetween employee and allowance Employee table NameaddressBasic SalaryBonusAllowance tableHouse rentFood AllowanceMoving AllowanceBasic Salary is monthly and fixedBonus is monthly and fixed food allowance is monthly and fixed for married employeeHouse rent is monthly and fixed for some employee and some employee take house rent two time in year every 6 monthevery employee married take 3 months salary from basic salary in yearsuppose i m married and i take basic salary 5000i will take rent 5000 x 3=15000/12=1250 monthly some employee take rent every half year meaning every 6 monthmeaning 15000/2=7500My question according to my case aboveWhich is best put allowance in table allowance or put allowance(food,housing,moving)in employee table and what relation between two tables ahmed salah |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-02-11 : 15:33:57
|
I'd add a key (maybe an identity value) to the allowance table and a FK from the employee table to the Allowance table. |
|
|
ahmedsa1985
Starting Member
2 Posts |
Posted - 2015-02-12 : 00:11:32
|
Thank you for replyyou see that the best thing make two tables relation not add allowance in employee tableahmed salah |
|
|
|
|
|