offdataai
HR & People · data model template

HR / HCM Core data model

Normalized (3NF) HR/HCM core covering org structure, the worker lifecycle, effective-dated assignment and compensation, payroll execution, time off, and benefits. Person identifiers and pay amounts carry PII/confidential classification with masking.

Human-capital-management operational data: the worker, the position/job/department/location structure, effective-dated assignments and compensation, payroll runs and payslips, time-off requests, and benefits enrollments. Worker PII and pay data are classified and masked for GDPR. It is a normalized (3NF) relational model that mirrors the source system, suited to operational databases and to landing source data faithfully.

3NFHR & PeopleGDPRSOC2
15
tables
132
columns
16
relationships
10
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: PostgreSQL). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

org_structureworkforcepayrolltime_and_benefits

Design decisions

  • Effective-dated rows instead of SCD

    An OLTP HCM system records assignment and compensation history as separate effective-dated rows (start/end dates), not warehouse SCD columns; this keeps the model 3NF and write-friendly.

  • Position management separate from job

    Headcount positions (seats) are distinct from job profiles (the definition of work); separating them supports open-requisition tracking and FTE budgeting independent of who fills the seat.

  • Payroll modeled as run -> payslip -> line

    Normalizing earnings/deductions into payslip lines referencing a pay-element lookup avoids wide, sparse payslip tables and lets new pay elements be added as data, not schema changes.

  • PII and pay data classified and masked

    National ID and bank account are restricted+full-masked while names/contact are PII+partial; compensation is confidential, satisfying GDPR minimization on the worker record.

Tables in the HR / HCM Core model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Tables (12)

location

Grain: one row per physical work location

ColumnTypeKeys
location_keybigintPK
location_codevarcharBK
location_namevarchar
address_line1varchar
address_line2varchar
cityvarchar
state_provincevarchar
postal_codevarchar
countryvarchar
timezonevarchar
is_remoteboolean

department

Grain: one row per organizational department

ColumnTypeKeys
department_keybigintPK
location_keybigint
department_codevarcharBK
department_namevarchar
parent_department_codevarchar
cost_centervarchar
is_activeboolean

job

Grain: one row per job profile / job code

ColumnTypeKeys
job_keybigintPK
job_codevarcharBK
job_titlevarchar
job_familyvarchar
job_levelvarchar
flsa_statusvarchar
is_managementboolean

position

Grain: one row per headcount position (a seat to be filled)

ColumnTypeKeys
position_keybigintPK
job_keybigint
department_keybigint
location_keybigint
position_codevarcharBK
position_titlevarchar
ftedecimal
statusvarchar
opened_datedate

employee

Grain: one row per worker (person)

Subject worker entity; PII classified for GDPR.

ColumnTypeKeys
employee_keybigintPK
employee_idvarcharBK
first_namevarcharPII
last_namevarcharPII
preferred_namevarcharPII
date_of_birthdatePII
national_idvarcharPII
gendervarcharPII
personal_emailvarcharPII
work_emailvarcharPII
phonevarcharPII
hire_datedate
termination_datedate
employment_statusvarchar
worker_typevarchar

assignment

Grain: one row per employee assignment to a position (effective-dated)

Effective-dated, 3NF (no SCD); history kept as separate rows.

ColumnTypeKeys
assignment_keybigintPK
employee_keybigint
position_keybigint
manager_employee_keybigint
assignment_typevarchar
effective_start_datedate
effective_end_datedate
is_primaryboolean
work_schedulevarchar
standard_hours_per_weekdecimal

compensation

Grain: one row per compensation record per assignment (effective-dated)

ColumnTypeKeys
compensation_keybigintPK
assignment_keybigint
pay_gradevarchar
base_amountdecimal
currency_codevarchar
pay_frequencyvarchar
bonus_target_pctdecimal
effective_start_datedate
effective_end_datedate

payroll_run

Grain: one row per payroll run (a pay cycle execution)

ColumnTypeKeys
payroll_run_keybigintPK
location_keybigint
run_codevarcharBK
pay_groupvarchar
period_start_datedate
period_end_datedate
pay_datedate
statusvarchar
currency_codevarchar
total_grossdecimal
total_netdecimal

payslip

Grain: one row per employee per payroll run

ColumnTypeKeys
payslip_keybigintPK
payroll_run_keybigint
employee_keybigint
gross_paydecimal
net_paydecimal
tax_withhelddecimal
pre_tax_deductionsdecimal
post_tax_deductionsdecimal
employer_contributionsdecimal
bank_account_maskedvarcharPII
pay_datedate

payslip_line

Grain: one row per earning/deduction line on a payslip

ColumnTypeKeys
payslip_line_keybigintPK
payslip_keybigint
pay_element_keybigint
amountdecimal
quantitydecimal
ratedecimal

time_off_request

Grain: one row per time-off request

ColumnTypeKeys
time_off_request_keybigintPK
employee_keybigint
time_off_type_keybigint
approver_employee_keybigint
start_datedate
end_datedate
hours_requesteddecimal
statusvarchar
reasonvarchar
requested_attimestamp
decided_attimestamp

benefit_enrollment

Grain: one row per employee per benefit plan enrollment

ColumnTypeKeys
benefit_enrollment_keybigintPK
employee_keybigint
benefit_plan_keybigint
coverage_levelvarchar
enrollment_datedate
coverage_start_datedate
coverage_end_datedate
employee_contributiondecimal
employer_contributiondecimal
statusvarchar

Lookup tables (3)

pay_element

Grain: reference list of pay elements (earnings/deductions)

ColumnTypeKeys
pay_element_keybigintPK
element_codevarcharBK
element_namevarchar
element_typevarchar
is_taxableboolean

time_off_type

Grain: reference list of leave/time-off types

ColumnTypeKeys
time_off_type_keybigintPK
type_codevarcharBK
type_namevarchar
is_paidboolean
accrual_methodvarchar

benefit_plan

Grain: reference list of benefit plans offered

ColumnTypeKeys
benefit_plan_keybigintPK
plan_codevarcharBK
plan_namevarchar
plan_typevarchar
provider_namevarchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • department.location_key → location (many-to-one)
  • position.job_key → job (many-to-one)
  • position.department_key → department (many-to-one)
  • position.location_key → location (many-to-one)
  • assignment.employee_key → employee (many-to-one)
  • assignment.position_key → position (many-to-one)
  • compensation.assignment_key → assignment (many-to-one)
  • payroll_run.location_key → location (many-to-one)
  • payslip.payroll_run_key → payroll_run (many-to-one)
  • payslip.employee_key → employee (many-to-one)
  • payslip_line.payslip_key → payslip (many-to-one)
  • payslip_line.pay_element_key → pay_element (many-to-one)
  • time_off_request.employee_key → employee (many-to-one)
  • time_off_request.time_off_type_key → time_off_type (many-to-one)
  • benefit_enrollment.employee_key → employee (many-to-one)
  • benefit_enrollment.benefit_plan_key → benefit_plan (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time