如何在sql server中处理以下概念? [英] How to Handle the below concept in sql server?

查看:67
本文介绍了如何在sql server中处理以下概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Techies,



我需要使用SQL Server为下面的概念设计表。让我知道是否找到了逻辑。



项目中有4种角色。



Ex 1.Trainee



2.培训师



3.Subject Matter Expert



4.主管。



以下角色的注册分为2.



1.Trainee



2.Rest of the Roles



员工可能有任何角色。



如果员工X担任角色培训师,他将通过实习生注册页面注册。



一旦他需要担任实习生他将注册为实习生。



i需要根据角色分离注册。



如何设计一张桌子?



功能因角色而异。



如何处理上述情况?



我需要根据角色保存注册值。

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.

推荐答案

简单:只需设置两个表:

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.


这篇关于如何在sql server中处理以下概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆