---
title: Data model
summary: Cross-library database table reference for SAIF.PremiumAudit.Batch.
status: draft
owner: Policy Systems Team
last_reviewed: 2026-02-18
---

# Data model

This application interacts with 6 SQL Server tables in the `dbo` schema across 2
libraries.

## Policy audit domain

| Table | Owner library | Owner class | CRUD | SQL docs | Notes |
|---|---|---|---|---|---|
| `dbo.PolicyAudit` | SAIF.PremiumAudit.Batch | `AuditProcessor` | R, U | SQL index | Read through `dbo.usp_GetPendingAudits`; `Status`, `PostedDate`, and `PostedBy` updated inside the per-audit transaction. |
| `dbo.PolicyAuditDetail` | SAIF.PremiumAudit.Batch | `AuditProcessor` | R | SQL index | Audited payroll by class code for each audit. Read only; corrections are made by the underwriting application. |
| `dbo.PolicyAuditReject` | SAIF.PremiumAudit.Batch | `AuditProcessor` | C | SQL index | One row per rejected audit recording the failing business rule id; mirrors the File2 report. |

## Rating domain

| Table | Owner library | Owner class | CRUD | SQL docs | Notes |
|---|---|---|---|---|---|
| `dbo.PayrollClassCode` | SAIF.PremiumAudit.Batch | `AuditProcessor` | R | SQL index | Rate table loaded into memory during PreProcess and filtered by policy effective date at lookup time. |
| `dbo.ClassCodeValidation` | SAIF.Framework.Validation | `ClassCodeValidator` | R | SQL index | Valid class code ranges and payroll limits used by BR-001 and BR-002. |

## Premium transaction domain

| Table | Owner library | Owner class | CRUD | SQL docs | Notes |
|---|---|---|---|---|---|
| `dbo.PremiumTransaction` | SAIF.PremiumAudit.Batch | `AuditProcessor` | C | SQL index | One adjustment row per posted audit. Inserted in the same transaction that updates `dbo.PolicyAudit`, so a rolled back audit leaves no transaction row. |

## Related documentation

- Application index
- SAIF.PremiumAudit.Batch — Database tables
- SAIF.Framework.Validation — Database tables

## Sources

- `src/SAIF.PremiumAudit.Batch/AuditProcessor.vb`
- `src/SAIF.PremiumAudit.Batch/Program.vb`
- `src/SAIF.PremiumAudit.Batch/App.config`
- `src/SAIF.Framework.Validation/ClassCodeValidator.vb`
