Johny Bravo
asked on
Help with database
Hello Experts,
I am designing a database. Need your view on tables.
1. SuperAdmin
SuperAdminId
Pwd
2.Admin
AdminId
Pwd
Now I need to create a table "Events"
3.Events
EventId
EventName
Description
FromDate
ToDate
CreatedOn
CreatedBy
I am having confusion for "CreatedBy" in "Events".
Event can be created by Admin or SuperAdmin.
Then if I put their id in "createdby", thenlater how can I know which id refers to which table.
Your help is really appreciated. Thanks
I am designing a database. Need your view on tables.
1. SuperAdmin
SuperAdminId
Pwd
2.Admin
AdminId
Pwd
Now I need to create a table "Events"
3.Events
EventId
EventName
Description
FromDate
ToDate
CreatedOn
CreatedBy
I am having confusion for "CreatedBy" in "Events".
Event can be created by Admin or SuperAdmin.
Then if I put their id in "createdby", thenlater how can I know which id refers to which table.
Your help is really appreciated. Thanks
In most databases I've seen it is not necessary to have a separate table for 'Admin' and 'SuperAdmin' for a column whose sole purpose is auditing, i.e. tracking who did what. Normally I just seen the network ID (jhorn, sjobs, sclaus, ebunny, etc.) in the 'Created By' column.
Also, an argument can be made that Admin and SuperAdmin should really be one table, with a column (bit, maybe char(1)) that designates their role (Admin, SuperAdmin, Tourist, Data Entry, Reports Only, Don't Trust Me, etc.)
Hope this helps.
Jim
Also, an argument can be made that Admin and SuperAdmin should really be one table, with a column (bit, maybe char(1)) that designates their role (Admin, SuperAdmin, Tourist, Data Entry, Reports Only, Don't Trust Me, etc.)
Hope this helps.
Jim
ASKER
Thank you Experts for your comments.
Current scenario is that, SuperAdmin creates Admin users for particular "Society"
Table :
1.Society
SocietyId
Name
Address
2.SocietyMembers
SMID
Name
Pwd
IsAdmin
Then how will the table be formed?
Current scenario is that, SuperAdmin creates Admin users for particular "Society"
Table :
1.Society
SocietyId
Name
Address
2.SocietyMembers
SMID
Name
Pwd
IsAdmin
Then how will the table be formed?
>Current scenario is that, SuperAdmin creates Admin users for particular "Society"
For starters, I don't see an CreatedBy column in the Society table, to identify who created it.
Also, it's better to spell out all requirements in the original question, instead of giving additional requirements with follow-on comments, so if you could frame up all of your needs and spell them out in one comment, we'd appreciate it.
For starters, I don't see an CreatedBy column in the Society table, to identify who created it.
Also, it's better to spell out all requirements in the original question, instead of giving additional requirements with follow-on comments, so if you could frame up all of your needs and spell them out in one comment, we'd appreciate it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Jim Horn,
I will keep in mind this point onward.
I will keep in mind this point onward.
ASKER
Thank you both experts who have shared their views on this issue.
AdminID
AdminName
AdminPassword
AdminRole (Regular or Super)