Having the users and lost passwords in the same table implies a 1-1 (or 1-0/1) relationship; 1 user has 1 lost password (or none, if the column is nullable).
If that's the cardinality of the relationship, having them on the same table is correct. The school of thought that refuses nulls (which depending on the day, I adhere to), says that if the relationship is 1-0/1, you should:
users
usersID primary key
lostPasswords
usersID primary key references users(users_id)
-- lost password columns here, non-nullable
The relationships look fine, however, I would suggest you use a diagramming tool which shows which are the columns referenced. Surprisingly, I've only found SchemaSpy doing this: http://schemaspy.sourceforge.net/sample/diagrams/summary/relationships.real.compact.png
For the entities and attributes you've described so far and assuming I've understood the domain, I can't see a need for anything more than the tables below. If you there are attributes specific to a Fitter or Admin, add distinct tables for those attributes.
CREATE TABLE UserType
(
UserTypeId INT
, UserType NVARCHAR(50)
, CONSTRAINT PK_UserType PRIMARY KEY (UserTypeId)
)
CREATE TABLE Address
(
AddressId INT
, Line1 NVARCHAR(50)
, Line2 NVARCHAR(50)
, Line3 NVARCHAR(50)
, Line4 NVARCHAR(50)
, Line5 NVARCHAR(50)
, Postcode NVARCHAR(20)
, Country NVARCHAR(50)
, CONSTRAINT PK_Address PRIMARY KEY (AddressId)
)
CREATE TABLE [User]
(
UserId INT
, UserTypeId INT
, UserName NVARCHAR(50)
, Password NVARCHAR(50)
, Title NVARCHAR(50)
, Forename NVARCHAR(50)
, Surname NVARCHAR(50)
, CONSTRAINT PK_User PRIMARY KEY (UserId)
, CONSTRAINT FK_User_UserType FOREIGN KEY (UserTypeId) REFERENCES UserType(UserTypeId)
)
CREATE TABLE Client
(
ClientId INT
, Name NVARCHAR(50)
, AddressId INT
, CONSTRAINT PK_Client PRIMARY KEY (ClientId)
, CONSTRAINT FK_Client_Address FOREIGN KEY (AddressId) REFERENCES Address(AddressId)
)
CREATE TABLE ClientUser
(
ClientId INT
, UserId INT
, CONSTRAINT PK_ClientUser PRIMARY KEY (ClientId, UserId)
, CONSTRAINT FK_ClientUser_Client FOREIGN KEY (ClientId) REFERENCES Client(ClientId)
, CONSTRAINT FK_ClientUser_User FOREIGN KEY (UserId) REFERENCES [User](UserId)
)
Best Answer
In agreement with the comments made by @Laughing Vergil, this is the structure I would use:
You can do a few tests: