Since you will have a one-to-one relationship, the solution suggested by Philip Kelly is better. Just add a new column in USERunder the name access_role_id, and then enter the foreign key in the table USERas follows:
ALTER TABLE USER ADD CONSTRAINT fk_access_roles_users
FOREIGN KEY (access_role_id)
REFERENCES ACCESS_ROLES(access_role_id);
Do not add USER_IDto the table ACCESS_ROLESas you suggested.
source
share