Section 16
Production, Workflow & Scoring Tables

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

23
Production Tables
2
Flexible Tables
13
Guard Tables
5
Risk/Sust. Tables

Production_Casualties — Output Table

Production_Casualties

Production Casualty Output

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

ABSD_CADI
Source
spProduction_Casualties
Denormalisation
Production_Casualties
Client-ready output
ColumnTypeDescription
IDint IDENTITY PKAuto-incrementing row identifier
LRNOchar(7)Lloyd's Register vessel number
IncidentNumbervarchar(20)Unique incident reference number (from ABSD_CADI.SEQNO combined with LRNO)
IncidentDatedatetimeDate of the casualty event (converted from LR date string)
NameAtTimeOfIncidentnvarchar(150)Vessel name at the time of the casualty (historical lookup from ABSD_OVNA)
FlagAtTimeOfIncidentvarchar(3)Flag state at time of casualty (historical lookup from ABSD_HIFL)
ShipTypeLevel5Codevarchar(10)5-level ship type code (from tblStatCode5) at time of casualty
ShipTypeLevel5Descnvarchar(100)Level 5 ship type description
ShipTypeLevel4Codevarchar(10)Parent Level 4 ship type code
ShipTypeLevel3Codevarchar(10)Level 3 ship type group
YearOfBuildintYear of construction
GrossTonnagedecimalGross tonnage at time of incident
DeadWeightdecimalDeadweight tonnage at time of incident
ClassAtTimeOfIncidentvarchar(10)Classification society code at time of casualty
Statusvarchar(10)Casualty status code: TOTAL=total loss, SERIOUS=serious casualty, MINOR=minor casualty
CasualtyTypevarchar(50)Type of casualty event: Foundered, Fire/Explosion, Collision, Grounding, etc.
Locationnvarchar(200)Location description of the incident
Regionvarchar(50)Geographic region code (e.g. NORTHATLANTIC, FAREAST)
LivesLostintNumber of persons who died as a result of the casualty
ProductionDatedatetimeTimestamp this row was last generated by spProduction_Casualties

Production Table Family (23 tables)

Beyond casualty output, the Production family covers multiple analytical outputs:

Table PatternDescription
Production_CasualtiesDenormalised casualty event records (described above)
Production_Casualties_TotalLossTotal-loss subset for rapid reporting
Production_Fleet_*Fleet snapshot tables by ship type, flag, class (generated daily for reporting)
Production_NewBuildingsNewbuilding order and delivery output — feeds newbuilding monitor products
Production_DemolitionsDemolition/scrapping summary output
Production_SafetyStatsAnnual 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_LogExecution log for Production* stored procedures (run time, record count, status)

tblFlexible_Bucket — Flexible Data Store

tblFlexible_Bucket

Flexible Data EAV Pattern

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

ColumnTypeDescription
AUTO_KEYint IDENTITY PKAuto-incrementing row identifier
KEYvarchar(10)Entity key — typically an LRNO (vessel) or OW_CODE (company)
FIELD_NAMEvarchar(50)The attribute name — must exist in tblFlexible_Bucket_CB.FIELD_NAME
TEXTvarchar(250)Value as free text (populated for DATA_TYPE='T' fields)
WHOLE_NUMintInteger value (populated for DATA_TYPE='I' fields)
PART_NUMdecimal(18,2)Decimal value (populated for DATA_TYPE='D' fields)
TRUE_FALSEbitBoolean value (populated for DATA_TYPE='B' fields)
EFF_DATEdatetimeEffective date from which this value applies
LOAD_DATEdatetimeTimestamp this row was written
NOTESvarchar(8000)Optional free-text notes on this value entry
Trigger on this table: 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

Codebook

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

ColumnTypeDescription
IDint IDENTITY PKRow identifier
FIELD_NAMEvarchar(50) UNIQUEThe attribute code — appears as tblFlexible_Bucket.FIELD_NAME
FIELD_DESCRIPTIONvarchar(200)Human-readable description of what this field stores
DATA_TYPEchar(1)T=Text, I=Integer, D=Decimal, B=Boolean — determines which bucket column holds the value
PUBLISHABLE_INDbit1 = this field can be included in client-facing output; 0 = internal use only
FIELD_TYPEvarchar(20)Functional category: VESSEL, COMPANY, OPERATIONAL, COMMERCIAL
UNIQUEbit1 = only one active row per KEY+FIELD_NAME combination is allowed (trigger enforced)

tblStatCode5 — 5-Level Ship Type Hierarchy

tblStatCode5

Ship Type 5-Level Hierarchy

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

ColumnTypeDescription
Level1Codevarchar(10)Broadest category code (e.g. CC=Cargo Carrying, NC=Non-Cargo Carrying)
Level1Decodenvarchar(100)Level 1 description
Level2Codevarchar(10)Second-level category code (e.g. TK=Tanker)
Level2Decodenvarchar(100)Level 2 description
Level3Codevarchar(10)Third-level sub-category code (e.g. OT=Oil Tanker)
Level3Decodenvarchar(100)Level 3 description
Level4Codevarchar(10)Fourth-level type code (e.g. CRD=Crude Oil Tanker)
Level4Decodenvarchar(100)Level 4 description
Level5Codevarchar(10) PKMost specific classification code — matches ABSD_OVTY.STATCODE
Level5Decodenvarchar(100)Level 5 description including size bracket if applicable
Lev5HulltinyintHull material indicator: 0=Steel, 1=GRP/FRP, 2=Aluminium, 3=Wood, 9=Other
Lev5Subchar(2)Sub-type code for further grouping within Level 5 (used by analytics queries)

Hierarchy Example

LevelCodeDescription
Level 1CCCargo Carrying
Level 2TKTanker
Level 3OTOil Tanker
Level 4CRDCrude Oil Tanker
Level 5CRD3Crude Oil Tanker 200,001–299,999 DWT (VLCC)
Trigger integration: The 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 Triggers

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

ColumnTypeDescription
ALLTRIGGERSDISABLEDIFTHISEXISTSint PKThe 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
Production risk: Inserting a row into 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 Prevention

In 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 TableProtects Against
TRIGGER_DISABLE_OVGERecursion in TR_ABSD_OVGE_* when trigger writes back to OVGE (J06 update)
TRIGGER_DISABLE_OWGERecursion in OW* company triggers when updating OWGE from OWNA/OWCO
TRIGGER_DISABLE_HIFLRecursion in HIFL/SUPPLEMENTAL_HIFL cascade
TRIGGER_DISABLE_HITLRecursion in SUPPLEMENTAL_HITL scrap price update
TRIGGER_DISABLE_HIOWRecursion in HIOW → OWST recomputation cascade
TRIGGER_DISABLE_HIMARecursion in HIMA → HIOW → OWST cascade
TRIGGER_DISABLE_TBLCHANGESPrevents tblChanges self-trigger recursion
TRIGGER_DISABLE_TBLANNLOGPrevents tblAnnotationLogGeneral self-trigger recursion
TRIGGER_DISABLE_NCONRecursion in ABSD_NCON satellite cascade (OWNC rebuild)
TRIGGER_DISABLE_SUPPLRecursion in SUPPLEMENTAL_ tables writing back to ABSD_
TRIGGER_DISABLE_NEWOOMNew vessel creation workflow — disables all triggers during 62-table initialisation
TRIGGER_DISABLE_CBCOROOTRecursion 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.

PSC / AIS / Class
Source data
spRiskScreen*
Scoring SP
tblRiskScreeningData
Raw values
tblRiskScreeningScore
Numeric scores
*Narrative
Text descriptions

tblRiskScreeningData

Risk Raw Indicators

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

ColumnTypeNotes
LRNOchar(7) PKLR vessel number
LastUpdatedatetimeWhen this row was last recalculated
Maintainedint1 = vessel is in the risk screening product; 0 = excluded

AIS Behaviour Dimensions

AISLastSeenDays since last AIS signal
AISDaysCoverageAIS coverage % over 90 days
AISIMOCorrect1=IMO in AIS matches register
AISNameDifferenceLevenshtein vs registered name
AISAnomaliesCount of AIS position anomalies
DarkActivityHours with AIS intentionally off
PortCallsPort call count (90 days)
STSOperationsShip-to-ship transfer count
DriftingHours drifting (90 days)
RiskEventHigh-risk area transit count

Flag & PSC Dimensions

FlagFlag state risk tier (1–5)
ParisMOUParis PSC detention rate
TokyoMOUTokyo PSC detention rate
USCGMOUUSCG detention count
USCGQUALSHIP21QUALSHIP 21 certification
DaysSinceInspectionDays since last PSC inspection
InspectionTotal PSC inspections (3yr)
DefectsTotal deficiencies (3yr)
DetentionsTotal detentions (3yr)

Class & Certification Dimensions

SMCSafety Management Certificate status
DOCChangesDocument of Compliance changes (1yr)
ClassClassification society risk tier
ClassStatus0=In class, 1=Suspended, 2=Withdrawn

tblRiskScreeningScore

Risk Numeric Scores

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

Scoring matrix: The conversion from raw data to score is defined in a separate configuration table (not exposed in this schema). Weights and thresholds are adjusted by the risk analytics team without schema changes. The stored procedure spRiskScreeningScoreCompute applies the current matrix.

tblRiskScreeningDataNarrative

Risk Narrative Text

Third 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 Indicators

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

DimensionTypeDescription
LRNOchar(7) PKLR vessel number
LastUpdatedatetimeLast recalculation timestamp
Maintainedint1 = in sustainability product
AgeofShipintAge in years (current year − ABSD_STDE.YEAR_OF_BUILD)
TechnicalEfficiencyintEEDI/EEXI index score band (1=best, 5=worst)
TimeAtSeadecimalPercentage of time vessel was underway (AIS-derived, 12-month window)
FuelConsumptiondecimalEstimated fuel consumption (tonnes/year) from AIS speed/engine model
CO2EmissionsdecimalEstimated annual CO₂ emissions (tonnes) from fuel consumption × emission factor
GreenAwardCertifiedbit1 = vessel holds a Green Award certification
IHMGreenPassportbit1 = Inventory of Hazardous Materials / Green Passport certificate held
IMONOXRegulation13bit1 = engine complies with IMO NOx Tier III (Regulation 13 of MARPOL Annex VI)
ScrubberFittedOrReadybit1 = vessel has an exhaust gas cleaning system (scrubber) or is scrubber-ready
LNGOrAlternateFuelReadybit1 = vessel can operate on LNG or alternative low-carbon fuels
BallastWaterManagementPlanbit1 = valid BWM Plan and treatment system installed
OnShorePowerFittedbit1 = vessel equipped for cold-ironing / on-shore power connection

tblSustainabilityNarrative

Sustainability Narrative Text

Parallel 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 Audit

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

ColumnTypeDescription
LogIDbigint PKAuto-incrementing log identifier
LastUpdateddatetimeWhen the VDM entry was last modified
Statusvarchar(10)VDM field lifecycle status: ACTIVE, DEPRECATED, DRAFT, REMOVED
DatestampdatetimeOriginal creation date of the VDM record (distinct from LastUpdated)
FieldNamevarchar(100)VDM field identifier (may differ from ABSD_ column name — VDM uses English names)
ChangeTypevarchar(30)Type of VDM change: NEW_FIELD, TYPE_CHANGE, RENAME, DEPRECATE, RESTORE
ChangedByvarchar(20)Windows login of the data steward who made the VDM change
OldValuenvarchar(500)Previous definition or value (for TYPE_CHANGE and RENAME entries)
NewValuenvarchar(500)New definition or value
Rationalenvarchar(1000)Business rationale for the schema change
VDM vs ABSD_ schema: The VDM is a logical data model that sits above the physical ABSD_ schema. VDM field names like Vessel Name or Classification Society map to specific ABSD_ columns (ABSD_OVNA.NEWNA, ABSD_OVGE.CLASS). The spGetEnglishFieldName stored procedure uses VDM metadata to translate column names in the annotation system.