Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
My Database


Groups:
GroupId,Name


Modules:
ModuleId,Name

ModulePermissions:
ModulePermissionId,ModuleId,PermissionValue,PermissionKey

Approach 1:
GroupModule:
GroupModuleId,GroupId,ModuleId,Permissions(varchar)


Approach 2:
GroupModule:
GroupModuleId,GroupId,ModulePermissionId,isAllowed

Actually i am going to develop a user authentication system for a cms.I am developing an interface where the rights of modules are issued against every Group.
Now i want to know the best practices for the database design for this scenario, since this module would be used for authentication throughout the application , so the application is greatly dependent on these tables.

Let me know if you need more explanation
Posted
Updated 2-Aug-15 8:28am
v5
Comments
PIEBALDconsult 1-Aug-15 15:38pm    
What's a "cms"?
Shouldn't there be a user table of some sort?
Member 9129971 1-Aug-15 16:39pm    
CMS,Content Management System.This is same like wordpress ,joomla and other cms althought would not have so many functions like these Cms. And there is a User table also ,which has a relationship with Group , these tables are the most important tables they would be use on every request to the server.Specially the GroupModule table is the mostly used table.
Sinisa Hajnal 4-Aug-15 4:48am    
Generic advice: optimize your queries, set indexes on join fields, join by integers or other simple types (not varchars), avoid using functions in join conditions or where clause (even TRIM)...other then that, why not create ASP.NET project with membership and copy their design?

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