Openedx Roles and Permission Management

I tried to customize the OpenEdx ironwood release with the native installation. I connected to MySQL for knowing how the roles and permissions are managed. I didn’t get a clear idea about how they are internally connected. I saw django_comment_client_role ,django_comment_client_permission both tables are used only for handling discussion in a course am I right? student_courseaccessrole table also has some roles. How can I determine its a student for the course? Is any master table for keeping all roles. please guide me for exploring roles and permissions in the system. Thanks in advance.