I was thinking something like this... if you want one user to be able to have differing roles per school (profile) you can move the roleID out of tblUser and into the tblUserSchool M:M:declare @tblUser table (userID int, userName varchar(15), roleID int)insert into @tblUser select 1, 'Nathan', 3 union select 2, 'Adam', 2 union select 3, 'Natalie', 1declare @tblRole table (roleID int, roleName varchar(25), roleDesc varchar(50))insert into @tblRole select 1, 'GuestUser', 'Guest role has read-only access only.' union select 2, 'GeneralUser', 'User role can do some other stuff.' union select 3, 'AdminUser', 'Administrator User can do anything.'declare @tblSchool table (schoolID int, schoolName varchar(100), schoolAddress varchar(100))insert into @tblSchool select 1, 'Mission San Jose', '123 Main Street' union select 2, 'Washington', '321 Main Street'declare @tblUserSchool table (userID int, schoolID int)insert into @tblUserSchool select 1, 1 union select 2, 1 union select 3, 2select u.userID, u.userName, s.schoolName, r.roleNamefrom @tblUser uinner join @tblRole r on u.roleID = r.roleIDinner join @tblUserSchool us on u.userID = us.userIdinner join @tblSchool s on us.schoolID = s.schoolID
Nathan Skerl