Add allowance to employee table is wrong or true according to my case

Posted by Ahmedsa under Sql Server on 2/12/2015 | Points: 10 | Views : 409 | Status : [Member] | Replies : 1
Hi guys I have problem i need to make erd relation entity between employee and allowance Employee table Name address Basic Salary Bonus

Allowance table House rent Food Allowance Moving Allowance

Basic Salary is monthly and fixed Bonus is monthly and fixed food allowance is monthly and fixed for married employee House rent is monthly and fixed for some employee and some employee take house rent two time in year every 6 month every employee married take 3 months salary from basic salary in year suppose i m married and i take basic salary 5000 i will take rent 5000 x 3=15000/12=1250 monthly some employee take rent every half year meaning every 6 month meaning 15000/2=7500

My question according to my case above Which is best put allowance in table allowance or put allowance(food,housing,moving) in employee table and what relation between two tables


Posted by: Jitendrasoft09 on: 2/13/2015 [Member] [MVP] Starter | Points: 25


Here is the relation between tables Employees and EmployeesAllowance where any employees are married or not married will be available in Employees table which relates to the EmployeesAllowance table.

You can put allowance in EmployeeAllowance table and establish the relation with EmpID Primary key.

Employees Table- EmpID, EmpName, EmpBasicSal, IsMarried,
EmployeesAllowance Table- EmpId, FoodAllowance, FixedBonus, HouseRent

Further calculation you can do with c# code level as per your convenience.

Jitendra Kumar
If my post helps you, plz mark as an answer.

Ahmedsa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response