Performance Management — Data Model & Entity Relationships
This document answers one question in depth: how do the tables across SkillManagement, TMS, PERM, and CMGM relate to each other? The confusion arises because the word "Competency" is used in two different modules with different meanings — and because CMGM borrows tables from SkillManagement rather than owning them. This guide maps every table, every FK, and shows a concrete sample of data flowing end-to-end through all four modules.
SkillManagement — skill catalog & proficiency levelsTMS — training programmes & training competenciesPERM — appraisal KRAs & evaluation scoresCMGM — competency frameworks, gap analysis, dev plans
The Key Confusion — MSKILL vs MCOMPETENCY
Both MSKILL and MCOMPETENCY exist. They are different tables in different modules representing different concepts. Neither is "missing" — they serve parallel purposes that will eventually be linked.
📚 MSKILL (SkillManagement module)
What it is: A discrete, assessable work capability with a structured 1–5 proficiency scale
Proficiency levels:MAXLEVELNO column only — no separate level-descriptor table
Who uses it: TMS only — linked to training programmes via MPROGCOMPETENCYMAP
CMGM role:Does not directly drive CMGM gap analysis. Is a parallel concept — the "training output" that will be linked to CMGM gaps in a future integration
⚠ Why two separate "competency" concepts?
MSKILL is granular and multi-levelled — designed for precise employee assessment (Level 3 = Competent, Level 5 = Expert with specific observable behaviours). MCOMPETENCY is coarser — designed to tag what a training programme addresses (e.g. "this course builds Communication & Presentation competency up to Level 3"). The two share MSKILLGROUP and MSKILLDOMAIN as classification references, but serve different purposes. Future integration: when CMGM raises a Critical gap for SkillId=2 (SQL Proficiency), the system will look up TMS programmes where MPROGCOMPETENCYMAP covers competencies in the same domain/group — and surface them as recommended training.
Dimension
MSKILL (SkillManagement)
MCOMPETENCY (TMS)
Owner module
SkillManagement
TMS
Primary key
SKILLID
COMPETENCYID
Proficiency scale
Detailed — child table MSKILLLEVEL with label + descriptor per level
Simple — MAXLEVELNO column only, no level descriptor table
Behavioral anchors
Yes — MCOMPETENCYANCHOR in CMGM stores observable indicators per Skill×Level
In MEMPLOYEESKILL (SkillManagement), also derived in TEMPLOYEECOMPETENCYPROFILE.SkillGapsJson (CMGM)
Not stored per employee
Cross-Module Zone Map
This diagram shows which tables live in which module, and which cross-module foreign key relationships exist. Solid arrows = FK constraint. Dashed arrows = business trigger (no DB-level FK — data flows via BLL logic).
Complete Foreign Key Reference
From Table
Column
→ To Table
Column
Module
Type
MSKILL
GROUPID
MSKILLGROUP
GROUPID
SkillMgmt
DB FK
MSKILL
DOMAINID
MSKILLDOMAIN
DOMAINID
SkillMgmt
DB FK
MSKILLLEVEL
SKILLID
MSKILL
SKILLID
SkillMgmt
DB FK
MEMPLOYEESKILL
SKILLID
MSKILL
SKILLID
SkillMgmt
DB FK
MCOMPETENCY
DOMAINID
MSKILLDOMAIN
DOMAINID
TMS → SM
DB FK cross-module
MCOMPETENCY
GROUPID
MSKILLGROUP
GROUPID
TMS → SM
DB FK cross-module
MPROGCOMPETENCYMAP
PROGRAMMEID
MTRAININGPROGRAMME
PROGRAMMEID
TMS
DB FK
MPROGCOMPETENCYMAP
COMPETENCYID
MCOMPETENCY
COMPETENCYID
TMS
DB FK
TAPPRAISALEVAL
KRAId
MKRA
KRAId
PERM
DB FK
TAPPRAISALEVAL
EmployeeId
MEMPLOYEE
EMPLOYEEID
PERM
DB FK
MCOMPETENCYKRAMAP
FrameworkId
MCOMPETENCYFRAMEWORK
FrameworkId
CMGM
DB FK
MCOMPETENCYKRAMAP
KRAId
MKRA
KRAId
CMGM → PERM
DB FK cross-module
MCOMPETENCYKRAMAP
SkillId
MSKILL
SKILLID
CMGM → SM
DB FK cross-module
MCOMPETENCYANCHOR
SkillId
MSKILL
SKILLID
CMGM → SM
DB FK cross-module
MCAREERPATH
FrameworkId
MCOMPETENCYFRAMEWORK
FrameworkId
CMGM
DB FK
MCAREERPATH
CurrentRoleId
MDESIGNATION
DESIGNATIONID
CMGM → HR Core
DB FK
MCAREERPATHREQUIREMENT
CareerPathId
MCAREERPATH
CareerPathId
CMGM
DB FK
MCAREERPATHREQUIREMENT
SkillId
MSKILL
SKILLID
CMGM → SM
DB FK cross-module
TEMPLOYEECOMPETENCYPROFILE
EmployeeId
MEMPLOYEE
EMPLOYEEID
CMGM
DB FK
TEMPLOYEECOMPETENCYPROFILE
FrameworkId
MCOMPETENCYFRAMEWORK
FrameworkId
CMGM
DB FK
TSKILLDEVPLAN
SkillId
MSKILL
SKILLID
CMGM → SM
DB FK cross-module
TAPPRAISALEVAL (PERM)
—
TEMPLOYEECOMPETENCYPROFILE (CMGM)
—
PERM → CMGM
BLL trigger only — no DB FK. CompetencyProfileBLL is called by AppraisalFinalizedSubscriber (Dapr event)
End-to-End Sample Data Journey
Follow one employee — Arun Kumar, Junior Software Engineer — through the complete flow. Each step shows the actual rows written to or read from the database.
1
HR creates Skills in SkillManagement
SkillManagement Tables: MSKILL + MSKILLLEVEL
SKILLID
SKILLCODE
SKILLNAME
LEVELCOUNT
TENANTID
1
SK-001
Presentation Skills
5
1001
2
SK-002
SQL Proficiency
5
1001
7
SK-007
Project Planning
5
1001
Each skill also has 5 MSKILLLEVEL rows (SLNO 1–5) with LEVELLABEL and LEVELDESCRIPTOR. These are written in SkillManagement — CMGM reads them but never writes them.
CMGM Table: MCOMPETENCYKRAMAP — this is the bridge between PERM and SkillManagement
MapId
FrameworkId
KRAId
KRAName
SkillId
SkillName
ExpectedLevel
IsMandatory
1
10
301
Technical Delivery
2
SQL Proficiency
4
1 (Yes)
2
10
301
Technical Delivery
7
Project Planning
3
1 (Yes)
3
10
302
Client Communication
1
Presentation Skills
4
1 (Yes)
Reading this: "For employees in the Software Engineer Framework — when their Technical Delivery KRA scores well, we expect them to be at Level 4 in SQL Proficiency and Level 3 in Project Planning."
↓
4
Manager evaluates Arun Kumar in the PERM appraisal cycle
PERM Table: TAPPRAISALEVAL — KRA scores per employee
↓ BLL writes one row to TEMPLOYEECOMPETENCYPROFILE
6
TEMPLOYEECOMPETENCYPROFILE row written for Arun Kumar
CMGM Table: TEMPLOYEECOMPETENCYPROFILE — ONE row per employee per framework per cycle
ProfileId
EmployeeId
FrameworkId
GeneratedOn
OverallScore
Status
100
1001 (Arun Kumar)
10 (SW Eng Framework)
2026-04-15
58.50
1 (Published)
SkillGapsJson column (shown expanded — stored as JSON array in DB):
SkillId
SkillName
CurrentLevel
RequiredLevel
Gap
IsMandatory
Severity
2
SQL Proficiency
3
4
+1
Yes
HIGH
7
Project Planning
3
3
0
Yes
MET
1
Presentation Skills
4
4
0
Yes
MET
↓ Manager reviews gap → creates dev plan
7
Manager creates a Skill Development Plan for the HIGH gap
CMGM Table: TSKILLDEVPLAN — manually created per gap, references MSKILL (SkillManagement)
DevPlanId
TargetId
SkillId
SkillName
CurrentLevel
TargetLevel
Method
TargetDate
Status
200
1001 (Arun)
2
SQL Proficiency
3
4
Online (2)
2026-09-30
InProgress
TSKILLDEVPLAN.SkillId = 2 → foreign key to MSKILL.SKILLID = 2 (in SkillManagement). The dev plan "owns" nothing about the skill — it just points to it.
↓ (future) TMS integration — search MPROGCOMPETENCYMAP for courses that develop SQL Proficiency
8
(Future) TMS surfaces relevant training programmes
TMS Tables: MCOMPETENCY + MPROGCOMPETENCYMAP — planned integration, not yet live
CompetencyId
CompetencyName
ProgrammeId
ProgrammeName
ContributesToLevelNo
102
Data & Analytics
2002
SQL Foundations Certification
3
102
Data & Analytics
2005
Advanced Query Optimisation
4
The link "SQL Proficiency (SkillId=2) → Data & Analytics Competency (CompetencyId=102)" does not yet exist as a DB FK. The planned integration adds a MSKILL_COMPETENCY_MAP bridge table or a MCOMPETENCY.RelatedSkillId column so CMGM gaps can query TMS programmes automatically.
Gap Severity Calculation — Full Reference
Gap severity is computed in CompetencyProfileBLL after deriving each skill level. No separate table stores severity — it is calculated at runtime and embedded in SkillGapsJson.
Gap Value
IsMandatory
Severity
Colour
Action Required
≤ −1 (Actual > Required)
Either
EXCEEDS
Green
Consider for mentoring or stretch assignment
0 (Actual = Required)
Either
MET
Green
Maintain current level
1
No (Optional)
MEDIUM
Yellow
Development plan recommended this cycle
1
Yes (Mandatory)
HIGH
Orange
Development plan required this cycle
≥ 2
Yes (Mandatory)
CRITICAL
Red
Immediate intervention — plan + escalation to HR
ⓘ IsMandatory source:MCOMPETENCYKRAMAP.IsMandatory — set by HR when mapping KRAs to skills. If a skill appears in multiple KRA mappings with different IsMandatory values, the most restrictive (mandatory) wins during gap calculation. The ExpectedProficiencyLevel used is the highest required level across all KRAs that map to that skill.
Sample: Three employees, same framework, different gap outcomes