For "historical" reasons the Clarity data-model in the resource/user area is split over a number of tables.
The relationship to "primary role" is held in the PRJ_RESOURCES.prprimaryroleid column* (and that value is a join back to the 'role' which is just another type of resource -i.e. the prprimaryroleid value will be the srm_resources.id of the role record).
(* - the relationship between SRM_RESOURCES and PRJ_PRESOURCES is a 1 to 1 relationship on id = prid)
--
The technical reference guide documents contain ERD pictures - one of which is "Resources" and this shows you all the relationships.
LINK TO RESOURCES ERD