Click here to Skip to main content
15,038,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i have to design database structure for roles according to users

please guide me how to design means what attributes to put in

thanks in advance
Posted
Comments
Sudhakar Shinde 12-Jun-13 2:21am
   
Your question is not clear. Please use Improve question link and explain in detail.

Hi,

In a simple way you can do like below.
Create the Role Master Table like below.

Role Master Table
Code
Description
1
Manager
2
Clerk
3
Director


with code as primary key.

Then create the User table like below.

User Table
ID
Name
Role
1
Name1
1
2
Name2
2
3
Name3
3


with Role column referencing the Code column in Role Master Table. and you can insert the data as the sample show in the example. this is a simplest way.

hope it helps.
   

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