Elitachi
11-26-2005, 07:43 AM
Hi Guys
My first post, so here goes.
I am designing a cms, but before I do that I,m concentrating on the ums - user management, now, I have designed what I think to be a good table structure but I thought I would post here for everyone to look at, and hopefully give advice.
Here it is
http://www.syl.eclipse.co.uk/images/database.jpg
Now, what do you think?
I,ll explain it a little, firstly there is the module table, this will list every unique aspect of the site, i.e contact, news, tutorials etc etc.
Then a permissions table, i.e view, edit, delete etc, I thought this would be good, otherwise I would have to create a sub module table, and create a sub module for each permission, now seeing as most modules will be using the same basic set of permissions, its easier this way.
Does the module_has_permissions table look ok to everyone? you,ll notice there is a PK called module-has_permission_id and two FK's which have also been incorporated into a unique index. Is this the correct to achieve what I want, which is this...
Modules can have any number of permissions, but a group can only be given a permission if it already exists.
If anyone can offer advice, alternate way of doing the same or thinks what I have is good, then please fell to comment.
Thanks
Elitachi
My first post, so here goes.
I am designing a cms, but before I do that I,m concentrating on the ums - user management, now, I have designed what I think to be a good table structure but I thought I would post here for everyone to look at, and hopefully give advice.
Here it is
http://www.syl.eclipse.co.uk/images/database.jpg
Now, what do you think?
I,ll explain it a little, firstly there is the module table, this will list every unique aspect of the site, i.e contact, news, tutorials etc etc.
Then a permissions table, i.e view, edit, delete etc, I thought this would be good, otherwise I would have to create a sub module table, and create a sub module for each permission, now seeing as most modules will be using the same basic set of permissions, its easier this way.
Does the module_has_permissions table look ok to everyone? you,ll notice there is a PK called module-has_permission_id and two FK's which have also been incorporated into a unique index. Is this the correct to achieve what I want, which is this...
Modules can have any number of permissions, but a group can only be given a permission if it already exists.
If anyone can offer advice, alternate way of doing the same or thinks what I have is good, then please fell to comment.
Thanks
Elitachi