---
title: SAIF.NetCore.NHibernate database tables
summary: Tables and pseudo-tables referenced by this library's SQL and ORM usage.
status: draft
owner: Framework
last_reviewed: 2026-10-02
library: SAIF.NetCore.NHibernate
reference_type: package
---

# SAIF.NetCore.NHibernate database tables

This library ships no entity mappings or business schema of its own. Only two table-like entities surface in its own code: one Oracle pseudo-table used by the built-in system-date query, and the unresolved, consumer-supplied generic entity type used by the connectivity-test helper.

## Table catalog

| Table | Type | Engine | Description |
| --- | --- | --- | --- |
| [DUAL](#dual) | Pseudo-table | Oracle | Built-in single-row Oracle pseudo-table queried by `OracleSessionHelper.SystemDate` to read the database server date. |
| [TEntity](#tentity) | Unresolved/generic** | Any (consumer-mapped) | Placeholder for whatever entity type a consuming application supplies to `Repository<TEntity>.Query()`/`UnitOfWork.TestConnection<TEntity>()`; this library has no mapping for it. |

## DUAL

| Field | Value |
| --- | --- |
| **Engine** | Oracle |
| **Schema** | Unqualified** (resolved via the public `DUAL` synonym; the connecting schema/user is determined by the consumer's connection string, not by this library) |
| **Access pattern** | Read-only, via `Session.CreateSqlQuery("select sysdate from dual").UniqueResult()` in `OracleSessionHelper.SystemDate` |
| **Referenced by** | [SQL-001](sql/SQL-001-oracle-system-date.md) |
| **Related business rules** | [BR-NH-17](business-rules.md#br-nh-17-systemdate-comes-from-the-database-server), [BR-NH-18](business-rules.md#br-nh-18-systemdate-falls-back-to-local-time-on-sentinel-values) |

`DUAL` is Oracle's standard single-row, single-column pseudo-table; it holds no application data and exists solely so that `SELECT sysdate FROM dual` has a `FROM` clause to query against.

## TEntity

| Field | Value |
| --- | --- |
| **Engine** | Any — selected by `UnitOfWorkOptions.Database`/the connection configuration a consumer supplies, not by the entity mapping itself |
| **Schema** | Unresolved** — no concrete entity or mapping exists in this library's own source |
| **Access pattern** | Read, via LINQ-to-NHibernate (`Repository<TEntity>.Query().Where(x => false).ToList()`) in `UnitOfWork.TestConnection<TEntity>()` |
| **Referenced by** | [SQL-004](sql/SQL-004-test-connection.md) |
| **Related business rules** | [BR-NH-01](business-rules.md#br-nh-01-mapping-assemblies-fixed-at-registration), [BR-NH-04](business-rules.md#br-nh-04-non-empty-connection-string-required), [BR-NH-08](business-rules.md#br-nh-08-fluent-and-hbm-mappings-both-loaded), [BR-NH-11](business-rules.md#br-nh-11-transactions-always-use-readcommitted-isolation), [BR-NH-12](business-rules.md#br-nh-12-begin-refused-while-a-transaction-is-active), [BR-NH-13](business-rules.md#br-nh-13-commit-requires-an-active-transaction) |

`TEntity` is a type parameter, not a concrete table. `UnitOfWork.TestConnection<TEntity>()` is a generic connectivity probe: it runs `Repository<TEntity>.Query().Where(x => false).ToList()` against whatever entity type and NHibernate mapping the calling application supplies. The constant-false predicate is translated to a `WHERE` clause that can never match a row, so the query always materializes zero rows — it proves connectivity, session-factory build success, and mapped-table accessibility without ever reading real data. The actual table/schema queried is unknown to this library and varies per caller.**

## Table relationships

No cross-table relationships were identified in this library's SQL or mapping usage. `DUAL` and `TEntity` are queried independently and never joined.

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

> **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.

## Sources
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/SessionHelpers/OracleSessionHelper.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/SessionHelpers/SessionHelperBase.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/UnitOfWork.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/Repository.cs`
