Hello,
I was thinking to have a main 'Users' table with a few common data such as ‘StartDate’,
‘KindOfService’, ‘DelegationsServiceIncluded’, and ‘CurrentState’. And all the other User information in separate spread tables linked to main Users table, tables such as ‘UsersCompanyName’, ‘UsersSocialSecurityNum’,
‘UsersActivity’, ‘UsersAddresses’, ‘UsersTelFax’,
‘UsersEmail’, ‘UsersWebAddr’, ‘UsersContactName’,
‘UsersContactSurname’, ‘UsersContactHours’,
‘UsersJobPosition’, and so on.
On the other hand, create a Users Data Access table linked to main Users table through UserNumber field. That table would contain User Name, Password, Current State, and Access Category field (which determine the account access hierarchy: Administrator, Supervisor, or Technical).
User information tables mentioned firstly, will contain a Foreing Key of this table (‘UsersDataAccess’) so that all users accounts have its contact information and the rest of the data of its Company.
But the ‘problem’ will be when an additional user account is added from the same Company, then I will have to ‘refill’ fields of users information tables with possibly the same content of other users accounts of the same Company (like Company Name, Social Security Number, Activity, Address,..). How can I avoid this? Or this repeated information doesn’ t matter..
Note: Not in all cases this ‘problem’ will happen, because a user which is a Company can own other Companies, so, can have other user accounts in our website app with different Company Name, Social Security Number, Activity, Address,.. Regardless of those users belong to the same Company.
Thank you
I was thinking to have a main 'Users' table with a few common data such as ‘StartDate’,
‘KindOfService’, ‘DelegationsServiceIncluded’, and ‘CurrentState’. And all the other User information in separate spread tables linked to main Users table, tables such as ‘UsersCompanyName’, ‘UsersSocialSecurityNum’,
‘UsersActivity’, ‘UsersAddresses’, ‘UsersTelFax’,
‘UsersEmail’, ‘UsersWebAddr’, ‘UsersContactName’,
‘UsersContactSurname’, ‘UsersContactHours’,
‘UsersJobPosition’, and so on.
On the other hand, create a Users Data Access table linked to main Users table through UserNumber field. That table would contain User Name, Password, Current State, and Access Category field (which determine the account access hierarchy: Administrator, Supervisor, or Technical).
User information tables mentioned firstly, will contain a Foreing Key of this table (‘UsersDataAccess’) so that all users accounts have its contact information and the rest of the data of its Company.
But the ‘problem’ will be when an additional user account is added from the same Company, then I will have to ‘refill’ fields of users information tables with possibly the same content of other users accounts of the same Company (like Company Name, Social Security Number, Activity, Address,..). How can I avoid this? Or this repeated information doesn’ t matter..
Note: Not in all cases this ‘problem’ will happen, because a user which is a Company can own other Companies, so, can have other user accounts in our website app with different Company Name, Social Security Number, Activity, Address,.. Regardless of those users belong to the same Company.
Thank you