User relation with roles and groups

wakespirit
Kilo Guru

Dear all,

by running a practice test on admin servicenow which is new to me, I get a question which I do not understand well.

It was relative to database relation between users and roles/groups

I understand that User can belongs to 1 or more groups or role

And a role or group can be used by more than one user

So based on that that is a Many to many relation no ?

 

Answer say it is a 1 to many , so I get confused

 

Thanks for clarification

 

1 ACCEPTED SOLUTION

Strange, I still can't seem to download it in either Chrome or Firefox. Not to worry as it is definitely an many-to-many. The following recent video from Chuck Tomasi in the NOWCommunity channel on YouTube actually talks about exactly this if you would like more of an understanding around m2m relationships in ServiceNow (I have linked directly to the timestamp for you where it is discussed):

NOWCommunity Live Stream - 2018-11-05

 

View solution in original post

8 REPLIES 8

suvro
Mega Sage
Mega Sage

You are right it should be many to many, sometimes flashcards and classmarker shows 1 to many relationship

why they say 1 to many then ? Its a simple mistakes or a particular case ?

Joel Millwood2
Kilo Guru

Hi scal,

For some reason I can't view the image you have attached however you are correct. There is a many-to-many relationship between users and groups and users and roles.

ServiceNow stores these relationships in two tables: User Roles (sys_user_has_role) and Group Members (sys_user_grmember). In the case of the User Roles table, each row has a reference to the Users table and a reference to Roles table. In the case of Groups Members it is a reference to the Users table and a reference to the Groups table. Hope this helps and best of luck!

here is the image again