---
title: SAIF.Framework.Data.NHibernate database tables
summary: Database tables used by this library with relationships and usage context.
status: draft
owner: Framework
last_reviewed: 2026-09-15
library: SAIF.Framework.Data.NHibernate
reference_type: package
---

# SAIF.Framework.Data.NHibernate database tables

This page catalogs the 48 database tables reachable through this library's 42 FluentNHibernate `ClassMap<TEntity>` mappings — 42 directly mapped entity tables plus 6 many-to-many join tables (`COMPANY_ADDRESS`, `COMPANY_PHONE`, `COMPANY_PERSON`, `PERSON_ADDRESS`, `PERSON_EMAIL`, `PERSON_PHONE`) that have no direct entity class. Schema is recorded as `[unqualified]**` for every table: no `OWNER.TABLE_NAME`-qualified reference or `@LINK` was found in any mapping file, and no connection-string/schema-owner override was found in `app.config` — the actual owning schema is resolved only at runtime by whichever connection string a consuming application supplies to `IUnitOfWorkFactory.GetUnitOfWork(connectionString, batchSize, showSql)`.

## Table catalog

| Table | Database | Schema/Link | CRUD | Purpose | Primary business object |
| --- | --- | --- | --- | --- | --- |
| [ADDRESS_CODE](#address_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for address types. | `AddressCode` |
| [ADDRESS](#address) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References ADDRESS_CODE; associated with COMPANY and PERSON via join tables. | `Address` |
| [COMPANY](#company) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Many-to-many with ADDRESS, PHONE, PERSON via join tables. | `Company` |
| [COMPANY_ADDRESS](#company_address) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the COMPANY-to-ADDRESS many-to-many association. | `Company <-> Address` |
| [COMPANY_PHONE](#company_phone) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the COMPANY-to-PHONE many-to-many association. | `Company <-> Phone` |
| [COMPANY_PERSON](#company_person) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the COMPANY-to-PERSON many-to-many association. | `Company <-> Person` |
| [COUNTRY](#country) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for countries. | `CountryCode` |
| [EMAIL_ADDRESS](#email_address) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References EMAIL_CODE; version-tracked via UpdateNum; referenced by EXT_USER. | `EmailAddress` |
| [EMAIL_CODE](#email_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for email types. | `EmailCode` |
| [PERSON](#person) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Many-to-many with ADDRESS, EMAIL_ADDRESS, PHONE via join tables; referenced by EXT_USER. | `Person` |
| [PERSON_ADDRESS](#person_address) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the PERSON-to-ADDRESS many-to-many association. | `Person <-> Address` |
| [PERSON_EMAIL](#person_email) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the PERSON-to-EMAIL_ADDRESS many-to-many association. | `Person <-> EmailAddress` |
| [PERSON_PHONE](#person_phone) | Oracle-style naming* | `[unqualified]**` | C/R/U/D (join table, no direct entity) | Join table for the PERSON-to-PHONE many-to-many association. | `Person <-> Phone` |
| [PHONE_CODE](#phone_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for phone types. | `PhoneCode` |
| [PHONE](#phone) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References PHONE_CODE; associated with COMPANY and PERSON via join tables. | `Phone` |
| [ALL_STATES](#all_states) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for U.S. states. | `StateCode` |
| [DEPLOYMENT_REQUEST](#deployment_request) | unspecified* | `[unqualified]**` | C/R/U/D | Deployment domain entity; ID generation strategy not confirmed. | `DeploymentRequest` |
| [DEPLOYMENT_RESULT](#deployment_result) | unspecified* | `[unqualified]**` | C/R/U/D | Deployment domain entity; ID generation strategy not confirmed. | `DeploymentResult` |
| [DEPLOYMENT_STAGED](#deployment_staged) | unspecified* | `[unqualified]**` | C/R/U/D | Deployment domain entity; ID generation strategy not confirmed. | `DeploymentStaged` |
| [ADP_EMPLOYEE](#adp_employee) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Self-referencing via RPT_MGR_EMPLID (Supervisor). | `Employee` |
| [EMPLOYEE_STATUS_CODE](#employee_status_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for employee status. | `EmployeeStatusCode` |
| [WCIS_Employee](#wcis_employee) | unspecified - lower_snake_case columns* | `[unqualified]**` | C/R/U/D | References a status code table (target entity inferred*). | `WcisEmployee` |
| [image](#image) | Oracle-style naming* | `[unqualified]**` | C/R/U/D - populated via SQL-001, not a mapped generator | Version-tracked via UpdateDate; read-only references to DocumentCategory/ImageSystem/DocumentType/DocumentName; has many ImageAffiliations. | `Image` |
| [IMAGE_AFFILIATION](#image_affiliation) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References image (Image); dual ID-generation path (native generator and SQL-003) not reconciled.** | `ImageAffiliation` |
| [image_category_code](#image_category_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Has many ImageDocumentTypeCode (composite-keyed, Cascade.None()). | `ImageCategoryCode` |
| [image_document_name_code](#image_document_name_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for image document names. | `ImageDocumentNameCode` |
| [image_document_name_gcode](#image_document_name_gcode) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for image document names (grouped variant). | `ImageDocumentNameGCode` |
| [image_document_type_code](#image_document_type_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | KeyReference to image_category_code composite key. | `ImageDocumentTypeCode` |
| [image_document_type_gcode](#image_document_type_gcode) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for image document types (grouped variant). | `ImageDocumentTypeGCode` |
| [image_file_code](#image_file_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for image document type groups. | `ImageDocumentTypeGroupCode` |
| [image_external_view_code](#image_external_view_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table for image external view types. | `ImageExternalViewCode` |
| [IMGSYS](#imgsys) | Oracle-style naming* | `[unqualified]**` | C/R/U/D - populated via SQL-002, not a mapped generator | Has many Image; columns heavily abbreviated (IFNDS, IFNID, NPAGES, DELCD, CRTRID, IDXFL, SLEVEL, SCANDT, UPDTTS, UPDRID, BATID). | `ImageSystem` |
| [BOL_MENU_VW](#bol_menu_vw) | unspecified* | `[unqualified]**` | R only (maps a database view, not a base table)* | Maps a database view rather than a base table. | `BusinessOnlineMenuItem` |
| [pdf_app_error_code](#pdf_app_error_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Version-tracked via CreateDate; referenced by pdf_tracking. | `PDFApplicationErrorCode` |
| [pdf_cache](#pdf_cache) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | PDF cache domain entity. | `PDFCache` |
| [pdf_cache_process](#pdf_cache_process) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References pdf_cache_status_code (Status). | `PDFCacheProcess` |
| [pdf_cache_request](#pdf_cache_request) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References pdf_cache_status_code (Status). | `PDFCacheRequest` |
| [pdf_cache_status_code](#pdf_cache_status_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table referenced by pdf_cache_process, pdf_cache_request, pdf_tracking. | `PDFStatusCode` |
| [pdf_tracking_code](#pdf_tracking_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table referenced by pdf_tracking. | `PDFTrackingCode` |
| [pdf_tracking](#pdf_tracking) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Version-tracked via UpdateNumber; references pdf_app_error_code, pdf_cache_status_code, pdf_tracking_code. | `PDFTracking` |
| [XDOCUMENT](#xdocument) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References XPRINT_CONTROL. | `XDocument` |
| [XPRINT_CONTROL](#xprint_control) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Has many XDOCUMENT (inverse, .Not.OptimisticLock()). | `XPrintControl` |
| [USER_PREFERENCE](#user_preference) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | User preferences domain entity. | `Preference` |
| [EXT_USER](#ext_user) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Version-tracked via UpdateNumber; references EMAIL_ADDRESS, PERSON, ext_user_status_code (Status); has many ext_user_type (inverse, Cascade.AllDeleteOrphan()). | `ExternalUser` |
| [ext_user_status_code](#ext_user_status_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table referenced by EXT_USER (Status). | `ExternalUserStatusCode` |
| [ext_user_type_code](#ext_user_type_code) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | Reference/lookup code table referenced by ext_user_type. | `ExternalUserTypeCode` |
| [ext_user_type](#ext_user_type) | Oracle-style naming* | `[unqualified]**` | C/R/U/D | References COMPANY, EXT_USER (User), ext_user_type_code (UserTypeCode). | `ExternalUserType` |
| [Context](#context) | unspecified* | `[unqualified]**` | C/R/U/D | Several unmapped-column, convention-matched properties. | `WebContextItem` |

## ADDRESS_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for address types. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `AddressCode` |

---

## ADDRESS

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References ADDRESS_CODE; associated with COMPANY and PERSON via join tables. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | ADDRESS_SEQ |
| **Business objects** | `Address` |

---

## COMPANY

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Many-to-many with ADDRESS, PHONE, PERSON via join tables. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | COMPANY_SEQ |
| **Business objects** | `Company` |

---

## COMPANY_ADDRESS

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the COMPANY-to-ADDRESS many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Company <-> Address` |

---

## COMPANY_PHONE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the COMPANY-to-PHONE many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Company <-> Phone` |

---

## COMPANY_PERSON

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the COMPANY-to-PERSON many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Company <-> Person` |

---

## COUNTRY

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for countries. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `CountryCode` |

---

## EMAIL_ADDRESS

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References EMAIL_CODE; version-tracked via UpdateNum; referenced by EXT_USER. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | EMAIL_ADDRESS_SEQ |
| **Business objects** | `EmailAddress` |

---

## EMAIL_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for email types. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `EmailCode` |

---

## PERSON

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Many-to-many with ADDRESS, EMAIL_ADDRESS, PHONE via join tables; referenced by EXT_USER. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | PERSON_SEQ |
| **Business objects** | `Person` |

---

## PERSON_ADDRESS

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the PERSON-to-ADDRESS many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Person <-> Address` |

---

## PERSON_EMAIL

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the PERSON-to-EMAIL_ADDRESS many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Person <-> EmailAddress` |

---

## PERSON_PHONE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Join table for the PERSON-to-PHONE many-to-many association. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D (join table, no direct entity) |
| **Sequence** | N/A |
| **Business objects** | `Person <-> Phone` |

---

## PHONE_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for phone types. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `PhoneCode` |

---

## PHONE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References PHONE_CODE; associated with COMPANY and PERSON via join tables. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | PHONE_SEQ |
| **Business objects** | `Phone` |

---

## ALL_STATES

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for U.S. states. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `StateCode` |

---

## DEPLOYMENT_REQUEST

| Field | Value |
| --- | --- |
| **Database** | unspecified* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Deployment domain entity; ID generation strategy not confirmed. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | unspecified generator strategy** |
| **Business objects** | `DeploymentRequest` |

---

## DEPLOYMENT_RESULT

| Field | Value |
| --- | --- |
| **Database** | unspecified* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Deployment domain entity; ID generation strategy not confirmed. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | unspecified generator strategy** |
| **Business objects** | `DeploymentResult` |

---

## DEPLOYMENT_STAGED

| Field | Value |
| --- | --- |
| **Database** | unspecified* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Deployment domain entity; ID generation strategy not confirmed. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | unspecified generator strategy** |
| **Business objects** | `DeploymentStaged` |

---

## ADP_EMPLOYEE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Self-referencing via RPT_MGR_EMPLID (Supervisor). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (EMPLID assigned by convention*) |
| **Business objects** | `Employee` |

---

## EMPLOYEE_STATUS_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for employee status. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `EmployeeStatusCode` |

---

## WCIS_Employee

| Field | Value |
| --- | --- |
| **Database** | unspecified - lower_snake_case columns* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References a status code table (target entity inferred*). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (user_name assigned by convention*) |
| **Business objects** | `WcisEmployee` |

---

## image

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Version-tracked via UpdateDate; read-only references to DocumentCategory/ImageSystem/DocumentType/DocumentName; has many ImageAffiliations. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D - populated via SQL-001, not a mapped generator |
| **Sequence** | N/A (no GeneratedBy clause; ID obtained externally via SQL-001) |
| **Business objects** | `Image` |

### SQL referencing IMAGE
- [SQL-001: Oracle sequence-based ID generation for Image](sql/SQL-001-saif-framework-data-nhibernate.md)

### Operations referencing IMAGE
- [Oracle sequence based ID generation (Imaging domain)](operations-processes.md#oracle-sequence-based-id-generation-imaging-domain)

---

## IMAGE_AFFILIATION

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References image (Image); dual ID-generation path (native generator and SQL-003) not reconciled.** |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | IMAGE_AFFILIATION_SEQ (native) - also independently queryable via SQL-003* |
| **Business objects** | `ImageAffiliation` |

### SQL referencing IMAGE_AFFILIATION
- [SQL-003: Oracle sequence-based ID generation for ImageAffiliation](sql/SQL-003-saif-framework-data-nhibernate.md)

### Operations referencing IMAGE_AFFILIATION
- [Oracle sequence based ID generation (Imaging domain)](operations-processes.md#oracle-sequence-based-id-generation-imaging-domain)

---

## image_category_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Has many ImageDocumentTypeCode (composite-keyed, Cascade.None()). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (composite key: image_file_code, code) |
| **Business objects** | `ImageCategoryCode` |

---

## image_document_name_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for image document names. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ImageDocumentNameCode` |

---

## image_document_name_gcode

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for image document names (grouped variant). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ImageDocumentNameGCode` |

---

## image_document_type_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | KeyReference to image_category_code composite key. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (composite key: KeyReference(Category) + code) |
| **Business objects** | `ImageDocumentTypeCode` |

---

## image_document_type_gcode

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for image document types (grouped variant). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (composite key: code, culture_code, image_category_code, image_file_code) |
| **Business objects** | `ImageDocumentTypeGCode` |

---

## image_file_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for image document type groups. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ImageDocumentTypeGroupCode` |

---

## image_external_view_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table for image external view types. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ImageExternalViewCode` |

---

## IMGSYS

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Has many Image; columns heavily abbreviated (IFNDS, IFNID, NPAGES, DELCD, CRTRID, IDXFL, SLEVEL, SCANDT, UPDTTS, UPDRID, BATID). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D - populated via SQL-002, not a mapped generator |
| **Sequence** | N/A (no GeneratedBy clause; ID obtained externally via SQL-002) |
| **Business objects** | `ImageSystem` |

### SQL referencing IMGSYS
- [SQL-002: Oracle sequence-based ID generation for ImageSystem](sql/SQL-002-saif-framework-data-nhibernate.md)

### Operations referencing IMGSYS
- [Oracle sequence based ID generation (Imaging domain)](operations-processes.md#oracle-sequence-based-id-generation-imaging-domain)

---

## BOL_MENU_VW

| Field | Value |
| --- | --- |
| **Database** | unspecified* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Maps a database view rather than a base table. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | R only (maps a database view, not a base table)* |
| **Sequence** | N/A (composite key: MENUITEMSEQNUM, FAVORITEFLAG) |
| **Business objects** | `BusinessOnlineMenuItem` |

---

## pdf_app_error_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Version-tracked via CreateDate; referenced by pdf_tracking. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `PDFApplicationErrorCode` |

---

## pdf_cache

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | PDF cache domain entity. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (assigned) |
| **Business objects** | `PDFCache` |

---

## pdf_cache_process

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References pdf_cache_status_code (Status). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (pdf_cache_process_id, GeneratedBy.Assigned()) |
| **Business objects** | `PDFCacheProcess` |

---

## pdf_cache_request

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References pdf_cache_status_code (Status). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (pdf_cache_process_id, GeneratedBy.Assigned()) |
| **Business objects** | `PDFCacheRequest` |

---

## pdf_cache_status_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table referenced by pdf_cache_process, pdf_cache_request, pdf_tracking. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `PDFStatusCode` |

---

## pdf_tracking_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table referenced by pdf_tracking. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `PDFTrackingCode` |

---

## pdf_tracking

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Version-tracked via UpdateNumber; references pdf_app_error_code, pdf_cache_status_code, pdf_tracking_code. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | pdf_tracking_seq (native) |
| **Business objects** | `PDFTracking` |

---

## XDOCUMENT

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References XPRINT_CONTROL. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | XDOCUMENT_SEQ (native) |
| **Business objects** | `XDocument` |

---

## XPRINT_CONTROL

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Has many XDOCUMENT (inverse, .Not.OptimisticLock()). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A (XPRINT_CONTROL_SEQ_NUM, GeneratedBy.Assigned()) |
| **Business objects** | `XPrintControl` |

---

## USER_PREFERENCE

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | User preferences domain entity. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | USER_PREFERENCE_SEQ (native) |
| **Business objects** | `Preference` |

---

## EXT_USER

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Version-tracked via UpdateNumber; references EMAIL_ADDRESS, PERSON, ext_user_status_code (Status); has many ext_user_type (inverse, Cascade.AllDeleteOrphan()). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | EXT_USER_SEQ (native) |
| **Business objects** | `ExternalUser` |

---

## ext_user_status_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table referenced by EXT_USER (Status). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ExternalUserStatusCode` |

---

## ext_user_type_code

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Reference/lookup code table referenced by ext_user_type. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | N/A |
| **Business objects** | `ExternalUserTypeCode` |

---

## ext_user_type

| Field | Value |
| --- | --- |
| **Database** | Oracle-style naming* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | References COMPANY, EXT_USER (User), ext_user_type_code (UserTypeCode). |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | ext_user_type_seq (native) |
| **Business objects** | `ExternalUserType` |

---

## Context

| Field | Value |
| --- | --- |
| **Database** | unspecified* |
| **Schema/Link** | `[unqualified]**` |
| **Purpose** | Several unmapped-column, convention-matched properties. |
| **Access pattern** | Direct SQL (NHibernate-generated) |
| **CRUD operations** | C/R/U/D |
| **Sequence** | unspecified generator strategy** |
| **Business objects** | `WebContextItem` |

---

## Table relationship diagram

The following diagram shows relationships between tables used by this library, derived from the FluentNHibernate mapping associations (`References`/`HasMany`/`HasManyToMany`/`KeyReference`).

```mermaid
erDiagram
    ADDRESS_CODE ||--o{ ADDRESS : "one-to-many"
    COMPANY ||--o{ ADDRESS : "many-to-many (COMPANY_ADDRESS)"
    COMPANY ||--o{ PHONE : "many-to-many (COMPANY_PHONE)"
    COMPANY ||--o{ PERSON : "many-to-many (COMPANY_PERSON)"
    PERSON ||--o{ ADDRESS : "many-to-many (PERSON_ADDRESS)"
    PERSON ||--o{ EMAIL_ADDRESS : "many-to-many (PERSON_EMAIL)"
    PERSON ||--o{ PHONE : "many-to-many (PERSON_PHONE)"
    EMAIL_CODE ||--o{ EMAIL_ADDRESS : "one-to-many"
    PHONE_CODE ||--o{ PHONE : "one-to-many"
    ADP_EMPLOYEE ||--o{ ADP_EMPLOYEE : "self-referencing (Supervisor)"
    image_category_code ||--o{ image_document_type_code : "one-to-many (composite)"
    IMGSYS ||--o{ image : "one-to-many"
    image ||--o{ IMAGE_AFFILIATION : "one-to-many"
    pdf_cache_status_code ||--o{ pdf_cache_process : "one-to-many"
    pdf_cache_status_code ||--o{ pdf_cache_request : "one-to-many"
    pdf_app_error_code ||--o{ pdf_tracking : "one-to-many"
    pdf_cache_status_code ||--o{ pdf_tracking : "one-to-many"
    pdf_tracking_code ||--o{ pdf_tracking : "one-to-many"
    XPRINT_CONTROL ||--o{ XDOCUMENT : "one-to-many"
    EMAIL_ADDRESS ||--o{ EXT_USER : "one-to-many"
    PERSON ||--o{ EXT_USER : "one-to-many"
    ext_user_status_code ||--o{ EXT_USER : "one-to-many"
    EXT_USER ||--o{ ext_user_type : "one-to-many"
    COMPANY ||--o{ ext_user_type : "one-to-many"
    ext_user_type_code ||--o{ ext_user_type : "one-to-many"
```

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [SQL catalog](sql/index.md)
- [API reference](api/index.md)

## Sources
- `Mappings/Contacts/AddressCodeMap.cs`
- `Mappings/Contacts/AddressMap.cs`
- `Mappings/Contacts/CompanyMap.cs`
- `Mappings/Contacts/CountryCodeMap.cs`
- `Mappings/Contacts/EmailAddressMap.cs`
- `Mappings/Contacts/EmailCodeMap.cs`
- `Mappings/Contacts/PersonMap.cs`
- `Mappings/Contacts/PhoneCodeMap.cs`
- `Mappings/Contacts/PhoneMap.cs`
- `Mappings/Contacts/StateCodeMap.cs`
- `Mappings/Deployment/DeploymentRequestMap.cs`
- `Mappings/Deployment/DeploymentResultMap.cs`
- `Mappings/Deployment/DeploymentStagedMap.cs`
- `Mappings/Employee/EmployeeMap.cs`
- `Mappings/Employee/EmployeeStatusMap.cs`
- `Mappings/Employee/WCISEmployeeMap.cs`
- `Mappings/Imaging/ImageMap.cs`
- `Mappings/Imaging/ImageAffiliationMap.cs`
- `Mappings/Imaging/ImageCategoryCodeMap.cs`
- `Mappings/Imaging/ImageDocumentNameCodeMap.cs`
- `Mappings/Imaging/ImageDocumentNameGCodeMap.cs`
- `Mappings/Imaging/ImageDocumentTypeCodeMap.cs`
- `Mappings/Imaging/ImageDocumentTypeGCodeMap.cs`
- `Mappings/Imaging/ImageDocumentTypeGroupCodeMap.cs`
- `Mappings/Imaging/ImageExternalViewCodeMap.cs`
- `Mappings/Imaging/ImageSystemMap.cs`
- `Mappings/Menu/BusinessOnlineMenuItemMap.cs`
- `Mappings/PDF/PDFAppErrorCodeMap.cs`
- `Mappings/PDF/PDFCacheMap.cs`
- `Mappings/PDF/PDFCacheProcessMap.cs`
- `Mappings/PDF/PDFCacheRequestMap.cs`
- `Mappings/PDF/PDFStatusCodeMap.cs`
- `Mappings/PDF/PDFTrackingCodeMap.cs`
- `Mappings/PDF/PDFTrackingMap.cs`
- `Mappings/Printing/XDocumentMap.cs`
- `Mappings/Printing/XPrintControlMap.cs`
- `Mappings/Preferences/PreferencesMap.cs`
- `Mappings/Users/ExternalUserMap.cs`
- `Mappings/Users/ExternalUserStatusCodeMap.cs`
- `Mappings/Users/ExternalUserTypeCodeMap.cs`
- `Mappings/Users/ExternalUserTypeMap.cs`
- `Mappings/WebContext/WebContextItemMap.cs`
