Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Techies,

I need to design the table for the below concept using SQL Server.Let me know if any finds the logic.

There are 4 types of roles in the Project.

Ex 1.Trainee

2.Trainer

3.Subject Matter Expert

4. Supervisor.

The Registration for the below role is categorised into 2.

1.Trainee

2.Rest Of the Roles

An Employee may be of any roles mentioned.

If an Employee X is of role Trainer he will register through trainee registration page.

Once he need to act as a Trainee he will register as a Trainee.

i need to segregate registration based on roles.

How to design a table for this?

Functionality is different based on roles.

How to handle the above situation?

I need to save registration values based on roles.
Posted

1 solution

Easy: just set up two tables:
EmpRoles:
ID              Int, Identity
Description     NVARCHAR(30)

Employees:
ID              Up to you: Int, Identity; or Guid is good.
Role            Int, foreign key to ID in EmpRoles table
...             Rest of information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900