Section 16: Production, Workflow & Scoring Tables
Production output tables (Production_Casualties), flexible data bucket, 5-level ship type hierarchy, trigger guard tables (TRIGGER_DISABLE family), risk and sustainability scoring tables, and Vessel Data Model audit logs
Production_Casualties — Output Table
Production_Casualties
Production Casualty OutputThe primary output table for the casualty data production workflow. The spProduction_Casualties stored procedure (Section 12e) reads from the ABSD_ casualty tables (ABSD_CADI, ABSD_CAGE1, etc.) and writes a denormalised, production-ready version of each casualty event to this table. Downstream products and publications read from here rather than directly from the ABSD_ source tables.
Source
Denormalisation
Client-ready output
| Column | Type | Description |
|---|---|---|
ID | int IDENTITY PK | Auto-incrementing row identifier |
LRNO | char(7) | Lloyd's Register vessel number |
IncidentNumber | varchar(20) | Unique incident reference number (from ABSD_CADI.SEQNO combined with LRNO) |
IncidentDate | datetime | Date of the casualty event (converted from LR date string) |
NameAtTimeOfIncident | nvarchar(150) | Vessel name at the time of the casualty (historical lookup from ABSD_OVNA) |
FlagAtTimeOfIncident | varchar(3) | Flag state at time of casualty (historical lookup from ABSD_HIFL) |
ShipTypeLevel5Code | varchar(10) | 5-level ship type code (from tblStatCode5) at time of casualty |
ShipTypeLevel5Desc | nvarchar(100) | Level 5 ship type description |
ShipTypeLevel4Code | varchar(10) | Parent Level 4 ship type code |
ShipTypeLevel3Code | varchar(10) | Level 3 ship type group |
YearOfBuild | int | Year of construction |
GrossTonnage | decimal | Gross tonnage at time of incident |
DeadWeight | decimal | Deadweight tonnage at time of incident |
ClassAtTimeOfIncident | varchar(10) | Classification society code at time of casualty |
Status | varchar(10) | Casualty status code: TOTAL=total loss, SERIOUS=serious casualty, MINOR=minor casualty |
CasualtyType | varchar(50) | Type of casualty event: Foundered, Fire/Explosion, Collision, Grounding, etc. |
Location | nvarchar(200) | Location description of the incident |
Region | varchar(50) | Geographic region code (e.g. NORTHATLANTIC, FAREAST) |
LivesLost | int | Number of persons who died as a result of the casualty |
ProductionDate | datetime | Timestamp this row was last generated by spProduction_Casualties |
Production Table Family (23 tables)
Beyond casualty output, the Production family covers multiple analytical outputs:
| Table Pattern | Description |
|---|---|
Production_Casualties | Denormalised casualty event records (described above) |
Production_Casualties_TotalLoss | Total-loss subset for rapid reporting |
Production_Fleet_* | Fleet snapshot tables by ship type, flag, class (generated daily for reporting) |
Production_NewBuildings | Newbuilding order and delivery output — feeds newbuilding monitor products |
Production_Demolitions | Demolition/scrapping summary output |
Production_SafetyStats | Annual safety statistics summary used by IMO and ISL reporting |
Production_AIS_* | AIS position/last-seen data joined to vessel master records for products requiring AIS overlay |
Production_Log | Execution log for Production* stored procedures (run time, record count, status) |
tblFlexible_Bucket — Flexible Data Store
tblFlexible_Bucket
Flexible Data EAV PatternA generic Entity-Attribute-Value (EAV) extension table for storing vessel-level data fields that do not fit the fixed ABSD_ schema. When a new data requirement emerges that does not warrant a permanent schema change, the field is stored here using the FIELD_NAME + value columns pattern. The codebook for all valid field names is in tblFlexible_Bucket_CB.
| Column | Type | Description |
|---|---|---|
AUTO_KEY | int IDENTITY PK | Auto-incrementing row identifier |
KEY | varchar(10) | Entity key — typically an LRNO (vessel) or OW_CODE (company) |
FIELD_NAME | varchar(50) | The attribute name — must exist in tblFlexible_Bucket_CB.FIELD_NAME |
TEXT | varchar(250) | Value as free text (populated for DATA_TYPE='T' fields) |
WHOLE_NUM | int | Integer value (populated for DATA_TYPE='I' fields) |
PART_NUM | decimal(18,2) | Decimal value (populated for DATA_TYPE='D' fields) |
TRUE_FALSE | bit | Boolean value (populated for DATA_TYPE='B' fields) |
EFF_DATE | datetime | Effective date from which this value applies |
LOAD_DATE | datetime | Timestamp this row was written |
NOTES | varchar(8000) | Optional free-text notes on this value entry |
tblFlexible_Bucket has its own trigger (documented in Section 10j) that validates FIELD_NAME against the codebook, enforces uniqueness where required (tblFlexible_Bucket_CB.UNIQUE=1), and writes a tblChanges audit row. The trigger fires on INSERT, UPDATE, and DELETE.tblFlexible_Bucket_CB — Field Codebook
CodebookCodebook defining all valid FIELD_NAME values for the flexible bucket. Each row defines one attribute type — its human-readable description, data type, visibility flag, and uniqueness constraint.
| Column | Type | Description |
|---|---|---|
ID | int IDENTITY PK | Row identifier |
FIELD_NAME | varchar(50) UNIQUE | The attribute code — appears as tblFlexible_Bucket.FIELD_NAME |
FIELD_DESCRIPTION | varchar(200) | Human-readable description of what this field stores |
DATA_TYPE | char(1) | T=Text, I=Integer, D=Decimal, B=Boolean — determines which bucket column holds the value |
PUBLISHABLE_IND | bit | 1 = this field can be included in client-facing output; 0 = internal use only |
FIELD_TYPE | varchar(20) | Functional category: VESSEL, COMPANY, OPERATIONAL, COMMERCIAL |
UNIQUE | bit | 1 = only one active row per KEY+FIELD_NAME combination is allowed (trigger enforced) |
tblStatCode5 — 5-Level Ship Type Hierarchy
tblStatCode5
Ship Type 5-Level HierarchyDefines the 5-level ship type classification hierarchy used across LR products. Level 1 is the broadest category (e.g. Cargo Carrying); Level 5 is the most granular (e.g. Crude Oil Tanker > 250,000 DWT). Each row is one Level 5 leaf node with its full ancestry chain.
| Column | Type | Description |
|---|---|---|
Level1Code | varchar(10) | Broadest category code (e.g. CC=Cargo Carrying, NC=Non-Cargo Carrying) |
Level1Decode | nvarchar(100) | Level 1 description |
Level2Code | varchar(10) | Second-level category code (e.g. TK=Tanker) |
Level2Decode | nvarchar(100) | Level 2 description |
Level3Code | varchar(10) | Third-level sub-category code (e.g. OT=Oil Tanker) |
Level3Decode | nvarchar(100) | Level 3 description |
Level4Code | varchar(10) | Fourth-level type code (e.g. CRD=Crude Oil Tanker) |
Level4Decode | nvarchar(100) | Level 4 description |
Level5Code | varchar(10) PK | Most specific classification code — matches ABSD_OVTY.STATCODE |
Level5Decode | nvarchar(100) | Level 5 description including size bracket if applicable |
Lev5Hull | tinyint | Hull material indicator: 0=Steel, 1=GRP/FRP, 2=Aluminium, 3=Wood, 9=Other |
Lev5Sub | char(2) | Sub-type code for further grouping within Level 5 (used by analytics queries) |
Hierarchy Example
| Level | Code | Description |
|---|---|---|
| Level 1 | CC | Cargo Carrying |
| Level 2 | TK | Tanker |
| Level 3 | OT | Oil Tanker |
| Level 4 | CRD | Crude Oil Tanker |
| Level 5 | CRD3 | Crude Oil Tanker 200,001–299,999 DWT (VLCC) |
tblStatCode5 codebook trigger (Section 10j) fires when a STATCODE changes in ABSD_OVTY and validates the new code against this table. The SUPPLEMENTAL_ABSD_OVTY.STAT5CODE column (Section 09) stores the Level 5 code for each vessel.TRIGGER_DISABLE — Guard Table Architecture
TRIGGER_DISABLE
Guard Table All TriggersThe master trigger guard table. Every single trigger in the database checks this table at line 1 — if any row exists, the trigger exits immediately without executing. This single-row pattern disables all 282 triggers simultaneously, enabling bulk data loads, maintenance operations, and SSIS backfill jobs to run without cascading trigger side-effects.
| Column | Type | Description |
|---|---|---|
ALLTRIGGERSDISABLEDIFTHISEXISTS | int PK | The column name is self-documenting. Insert any row to disable all triggers. Delete all rows to re-enable. The column value is irrelevant — only presence/absence matters. |
Standard Guard Pattern (in every trigger)
-- First line of every trigger body IF (SELECT COUNT(*) FROM TRIGGER_DISABLE) > 0 RETURN -- Table-specific guard (prevents recursion within the same trigger) IF (SELECT COUNT(*) FROM TRIGGER_DISABLE_OVGE) > 0 RETURN
TRIGGER_DISABLE silently suspends all data quality enforcement, J06 auditing, SHIP_SEARCH updates, and cascade logic. Only authorised operations (SSIS packages, DBA maintenance, EDM backfill) should use this mechanism, and it must be immediately re-enabled on completion. The spEDM_BF_* procedures always wrap their operations in a try/finally pattern that removes the guard row even on failure.Table-Specific Guard Tables (12 variants)
Recursion PreventionIn addition to the global TRIGGER_DISABLE, table-specific guard tables prevent trigger recursion when a trigger on table A writes to table B, which itself has a trigger. The pattern is identical: one-column table, presence = disabled.
| Guard Table | Protects Against |
|---|---|
TRIGGER_DISABLE_OVGE | Recursion in TR_ABSD_OVGE_* when trigger writes back to OVGE (J06 update) |
TRIGGER_DISABLE_OWGE | Recursion in OW* company triggers when updating OWGE from OWNA/OWCO |
TRIGGER_DISABLE_HIFL | Recursion in HIFL/SUPPLEMENTAL_HIFL cascade |
TRIGGER_DISABLE_HITL | Recursion in SUPPLEMENTAL_HITL scrap price update |
TRIGGER_DISABLE_HIOW | Recursion in HIOW → OWST recomputation cascade |
TRIGGER_DISABLE_HIMA | Recursion in HIMA → HIOW → OWST cascade |
TRIGGER_DISABLE_TBLCHANGES | Prevents tblChanges self-trigger recursion |
TRIGGER_DISABLE_TBLANNLOG | Prevents tblAnnotationLogGeneral self-trigger recursion |
TRIGGER_DISABLE_NCON | Recursion in ABSD_NCON satellite cascade (OWNC rebuild) |
TRIGGER_DISABLE_SUPPL | Recursion in SUPPLEMENTAL_ tables writing back to ABSD_ |
TRIGGER_DISABLE_NEWOOM | New vessel creation workflow — disables all triggers during 62-table initialisation |
TRIGGER_DISABLE_CBCOROOT | Recursion in CBCOROOT 3-type dispatch cascade |
Risk & Sustainability Scoring Tables
LR's risk screening and sustainability scoring systems produce per-vessel scores across multiple dimensions. Three parallel table families hold the same dimensional structure in different representations: raw data values, computed numeric scores, and human-readable narrative strings.
Source data
Scoring SP
Raw values
Numeric scores
Text descriptions
tblRiskScreeningData
Risk Raw IndicatorsStores the raw indicator values for each risk dimension — the actual measurements from AIS data, PSC inspection records, class status, and flag performance. One row per vessel (LRNO = PK). Updated by the spRiskScreeningDataUpdate scheduled job.
| Column | Type | Notes |
|---|---|---|
LRNO | char(7) PK | LR vessel number |
LastUpdate | datetime | When this row was last recalculated |
Maintained | int | 1 = vessel is in the risk screening product; 0 = excluded |
AIS Behaviour Dimensions
Flag & PSC Dimensions
Class & Certification Dimensions
tblRiskScreeningScore
Risk Numeric ScoresParallel table to tblRiskScreeningData — same column names but values are computed risk scores (integer 0–100) rather than raw measurements. Each dimension's raw value is converted to a 0–100 risk score using a configurable scoring matrix. The overall risk score is a weighted sum of dimension scores.
Schema: identical column names to tblRiskScreeningData, suffixed with _Score for clarity in stored procedures. LRNO is PK. All score columns are int (0–100), with 0=no risk, 100=highest risk.
spRiskScreeningScoreCompute applies the current matrix.tblRiskScreeningDataNarrative
Risk Narrative TextThird parallel table — same dimensions as tblRiskScreeningData but values are short human-readable narrative strings (varchar(100)) explaining each dimension's contribution to the risk profile. Used by client-facing risk report generators.
Example values: AISLastSeen_Narrative = 'Last seen 14 days ago', Detentions_Narrative = '3 detentions in past 3 years', Flag_Narrative = 'Flag classified as High Risk by Paris MOU'.
tblSustainabilityData
Sustainability ESG IndicatorsPer-vessel sustainability and environmental performance indicators. One row per vessel (LRNO = PK). Populated by the spSustainabilityDataUpdate scheduled job from ABSD_ technical data, AIS data, and third-party environmental certifications.
| Dimension | Type | Description |
|---|---|---|
LRNO | char(7) PK | LR vessel number |
LastUpdate | datetime | Last recalculation timestamp |
Maintained | int | 1 = in sustainability product |
AgeofShip | int | Age in years (current year − ABSD_STDE.YEAR_OF_BUILD) |
TechnicalEfficiency | int | EEDI/EEXI index score band (1=best, 5=worst) |
TimeAtSea | decimal | Percentage of time vessel was underway (AIS-derived, 12-month window) |
FuelConsumption | decimal | Estimated fuel consumption (tonnes/year) from AIS speed/engine model |
CO2Emissions | decimal | Estimated annual CO₂ emissions (tonnes) from fuel consumption × emission factor |
GreenAwardCertified | bit | 1 = vessel holds a Green Award certification |
IHMGreenPassport | bit | 1 = Inventory of Hazardous Materials / Green Passport certificate held |
IMONOXRegulation13 | bit | 1 = engine complies with IMO NOx Tier III (Regulation 13 of MARPOL Annex VI) |
ScrubberFittedOrReady | bit | 1 = vessel has an exhaust gas cleaning system (scrubber) or is scrubber-ready |
LNGOrAlternateFuelReady | bit | 1 = vessel can operate on LNG or alternative low-carbon fuels |
BallastWaterManagementPlan | bit | 1 = valid BWM Plan and treatment system installed |
OnShorePowerFitted | bit | 1 = vessel equipped for cold-ironing / on-shore power connection |
tblSustainabilityNarrative
Sustainability Narrative TextParallel narrative table for tblSustainabilityData. Same column names with varchar(100) narrative strings per dimension. Used by sustainability report generators and ESG data product feeds.
Example: CO2Emissions_Narrative = 'Estimated 12,400 tonnes CO₂/year — above average for ship type', TechnicalEfficiency_Narrative = 'EEDI Phase 0 vessel — pre-regulation build'.
tblVDM_AuditLog — Vessel Data Model Audit
tblVDM_AuditLog
VDM Schema AuditAudit log for the VDM (Vessel Data Model) — LR's internal schema governance system. The VDM defines the authoritative field list and data dictionary for the vessel record. When a VDM-managed field's schema definition changes (new field, field rename, type change, deprecation), the change is logged here.
| Column | Type | Description |
|---|---|---|
LogID | bigint PK | Auto-incrementing log identifier |
LastUpdated | datetime | When the VDM entry was last modified |
Status | varchar(10) | VDM field lifecycle status: ACTIVE, DEPRECATED, DRAFT, REMOVED |
Datestamp | datetime | Original creation date of the VDM record (distinct from LastUpdated) |
FieldName | varchar(100) | VDM field identifier (may differ from ABSD_ column name — VDM uses English names) |
ChangeType | varchar(30) | Type of VDM change: NEW_FIELD, TYPE_CHANGE, RENAME, DEPRECATE, RESTORE |
ChangedBy | varchar(20) | Windows login of the data steward who made the VDM change |
OldValue | nvarchar(500) | Previous definition or value (for TYPE_CHANGE and RENAME entries) |
NewValue | nvarchar(500) | New definition or value |
Rationale | nvarchar(1000) | Business rationale for the schema change |
ABSD_OVNA.NEWNA, ABSD_OVGE.CLASS). The spGetEnglishFieldName stored procedure uses VDM metadata to translate column names in the annotation system.