Tables and views in the Roles Database

Last modified 9/12/2006

Tables, views, and synonyms

In the Roles Database, tables and views are owned by user ROLESBB. Table names have the form "RDB_T_name". View names have the form "RDB_V_name". Each table and view has a public synonym of just the name part of the table or view name. Most tables and views have public access, i.e., the command "GRANT SELECT ON table_name TO PUBLIC" has been executed. An exception is the table RDB_T_SUPPRESSED_QUALNAME which is not readable by the public.

When writing stored procedures, web scripts, or data feed scripts, always refer to the public SYNONYM name rather than refering directly to the table_name or view_name. This leaves more flexibility for modifications or upgrades in the future. For example, we could change a public synonym to refer to a view rather than a table in the future without having to make changes to stored procedures or web scripts.

In this document, we will not show the "RDB_T_" or "RDB_V_" prefixes for tables or views, and will show the shortened synonym name.


Core tables

These are tables that directly define Authorizations, Functions, People, and Qualifiers in Roles Database, along with closely-related data. The "core" tables do not include tables that were defined just for the PowerBuilder application, for logging changes, or for special-purpose web reports.


Core tables
Table or viewTable or view nameDescription
tableAUTHORIZATION Each record represents an Authorization, which contains a Person (from the PERSON table), a Function (from the FUNCTION table) and a Quailfier (from the QUALIFIER table) plus some flags and other information. This table is denormalized, because of decisions made in 1997 related to our expectations for performance at that time. Note that the qualifier_type for the Function must match the qualifier_type for the Qualifier, and this is enforced by the stored procedures that create and update authorizations.
tableCATEGORY Each record represents a Function Category, or application area for which Authorizations can be granted. Each Function has exactly one Function Category. Therefore, each Authorization has exactly one Function Category.
tableFUNCTION Each record contains a Function, which is the business function that a person gains authority to do (or role that a person takes on) when an Authorization is granted.
tableFUNCTION_CHILD Some Functions have "child" Functions. If you have an Authorization for Function X and Qualifier Q, and Function Y is a child of Function X, then you also have an implied Authorization for Function Y and Qualifier Q. Each record in the FUNCTION_CHILD table represents one parent/child pair of Functions. Usually, the parent Function and child Function must have the same Qualifier Type. (There are exceptions when the set of Qualifiers of one Qualifier Type are a subset of Quailfiers of another Qualifier Type.)

Most Functions have neither a parent Function nor a Child Function, so most Functions have no corresponding records in this table. Note that unlike the QUALIFIER_CHILD table, the FUNCTION_CHILD table has no corresponding "FUNCTION_DESCENDENT" table. Thus, if there is a parent/child record for Function X and Function Y (making X a parent of Y), and there is a parent/child record for Function Y and Function Z (making Y a parent of Z), it is not the case that Function X is a parent of Function Z unless someone manually adds a specific parent/child record for Function X / Function Z.

tablePERSON Each record represents one Person. The table contains a record for all people who currently have a valid Kerberos principle at MIT, plus a few special-case usernames that represent servers that also have Authorizations in the Roles Database.
tablePERSON_TYPE Each record represents a Person Type, e.g., EMPLOYEE, STUDENT, or OTHER. Each Person has exactly one Person Type.
tableQUALIFIER Each record represents one Qualifier, a financial, HR, academic, or other unit that makes up the third part of an Authorization. The Qualifier "qualifies" the area in which a person is authorized to perform a given Function.
tableQUALIFIER_CHILD The QUALIFIER_CHILD table defines the hierarchy of Qualifiers of a given Qualifier Type. Each record represents a parent/child pair of Qualifiers within a given hierarchy of Qualifiers (and therefore the parent and child Qualifiers in one record must have the same Qualifier Type). Each record represents only a direct parent/child relationship between two (different) Qualifiers. Each Qualifier of a given Qualifier Type, except for the root, has at least one parent Qualifier (and in rare instances, more than one parent Qualifier). Many, but not all Qualifiers have one or more child Qualifiers. Parent/child links cannot create cycles or loops. In other words, if you follow the chain of child, grandchild, great grandchild, etc., Qualifiers under a given Qualifier, you can never get back to the original Qualifier.
tableQUALIFIER_DESCENDENT The QUALIFIER_DESCENDENT table is derived from the QUALIFIER_CHILD table. Each record in this table represents an ancestor/descendent link between two Qualifiers. It contains one record for each link between a Qualifier and its immediate children, plus one record for each link between a Qualifier and its grandchildren, plus one record for each link between a Qualifier and its great grandchildren, etc.. Within each ancestor/descendent pair, both Qualifiers must have the same Qualifier Type.
tableQUALIFIER_TYPE Each record defines a "type" of Qualifier, e.g., 8-digit HR org unit, Fund/Funds Center, Academit org unit, etc.. Each Qualifier has exactly one Qualifier Type. There is one root Qualifier for each Qualifier Type (although the root is currently not recorded in the QUALIFIER_TYPE table).
tableSUPPRESSED_QUALNAME This table is currently only defined on the test Roles Database, and has not yet been defined on the production database. Some Qualifier Types are flagged as IS_SENSITIVE='Y' in the QUALIFIER_TYPE table. Qualifiers for these Qualifier Types have a their qualifier_name suppressed (i.e., set to "(value suppressed)" in the QUALIFIER table to prevent unauthorized users from viewing them. For these Qualifiers, the actual qualifier name is recorded in the table SUPPRESSED_QUALNAME, which is under tighter access control.
The following 3 tables are used to determine which functions and qualifiers can be picked by FINANCIAL and HR PRIMARY AUTHORIZERs when they create authorizations.
tableDEPT_APPROVER_FUNCTION Some Functions, i.e., financial approver Functions, are specific to certain DLCs. If you are a Financial Primary Authorizer within a given DLC, you should be limited to assigning the financial approver Functions related to your DLC. The table DEPT_APPROVER_FUNCTION maps function_id's to their related dept_code, so that the Roles application can limit which financial approver Functions can be granted according to the DLC for which a person is a Financial Primary Authorizer.

The data in this table are derived each night from other tables by a program. The program fix_dept_appr_func.pl combines data from the flat file data/pa.approver_functions with data from tables PRIMARY_AUTH_DESCENDENT, QUALIFIER, and WH_COST_COLLECTOR to build a list of approver functions mapped to each DLC, and use it to update the table DEPT_APPROVER_FUNCTION.

tablePA_GROUP This table contains one record for each type of Primary Authorizer, e.g., HR and FIN. See the section "Adding another type of Primary Authorizer" within the document sys_admin_tasks.html.
tablePRIMARY_AUTH_DESCENDENT...


Tables used by the PowerBuilder application

These are tables defined specifically to support the PowerBuilder application.

PowerBuilder related tables
Table or viewTable or view nameDescription
tableAPPLICATION_VERSION...
tableCONNECT_LOG...
tableCRITERIA...
tableCRITERIA_INSTANCE...
tableERROR_KLUGE...
tableHIDE_DEFAULT...
tableLOG_SQL...
tableSCREEN...
tableSELECTION_SET...


Tables related to external authorizations

External authorizations are authorizations extracted from other tables, and not maintained manually in the Roles Database. Nightly (or more frequent) data feed programs will extract data from other sources and generate these records in the table EXTERNAL_AUTH. The external authorizations can be used for checking someone's authority to perform a function, similar to regular authorizations in the AUTHORIZATION table.

Tables related to external authorizations
Table or viewTable or view nameDescription
tableEXTERNAL_AUTH...
tableEXTERNAL_FUNCTION...


Miscellaneous tables
Table or viewTable or view nameDescription
tableAUTH_AUDIT...
tableEXTRACT_CATEGORY...
tablePERSON_HISTORY...
tableROLES_USERS...
tableSPECIAL_USERNAME...
tableWH_COST_COLLECTOR...


Test/development tables that may never be put into production

The tables listed below were defined in the TROLES database for testing or development purposes, but might not ever be moved to the production Roles Database.

Test/development tables - may never be moved to production
Table or viewTable or view nameDescription
tableACCESS_TO_QUALNAME...
tableDLC_SHADOW...
tablePROXY_USER...
tableTERM_OR_TRANSFER_CODE...
tableUSER_TERM_OR_TRANSFER...