Question: A developer want to construct a SQL database for handling user permission in a company site. At the beginning, he created a default table that
A developer want to construct a SQL database for handling user permission in a company site. At the beginning, he created a default table that has the following columns:
ID (Guid): Primary key of the permission.
Authority (int): A enumeration that signify different authority level
Section (string): String that is used to categorized the company site's section (User Page, Company Page, etc.)
CanCreate/CanRead/CanUpdate/CanDelete (bit): The boolean signify the CRUD permission
He set up values for 4 different authority levels. The table data looks as followed:
Does the current table normalized? If not, suggest a method to normalize the table further.
1 1 2 1 WN 3 1 1 2 45 67 Authorityld 7 2 8 9 10 11 3 N N 4 15 16 WN 2 3 3 12 3 ww 13 4 14 4 4 4 CanCreate Section USRMNG ADSMNG ENQMNG 1 CPYMNG 1 USRMNG 0 ADSMNG 1 ENQMNG 1 CPYMNG 0 USRMNG 1 ADSMNG 1 ENQMNG 1 CPYMNG 1 USRMNG 0 ADSMNG 0 ENQMNG 0 CPYMNG 0 1 1 CanRead CanUpdate 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 000 CanDelete 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
