All tables
tables · table

downtimemas

The downtimemas table serves as the primary master repository for downtime classification codes and descriptions within the SQL Server database. It categorizes various reasons for production halts (e.g., "NO POWER", "MACHINE CLEANING", "MATERIAL SHORTING") and associates them with specific stations or operations. This table is critical for OEE (Overall Equipment Effectiveness) reporting, machine utilization analysis, and maintenance tracking.

Row count
76
Last entry
Source
tables

Columns

7
ColumnTypeNullableMeaning
indexintegerNoPrimary key; unique system-generated identifier for the record.
compcodestringYesCompany Code; identifies the specific business unit or plant.
downcodeintegerYesUnique identifier for a specific downtime reason.
downreasonstringYesThe descriptive name of the downtime event.
usernamestringYesThe user account that created or last modified the entry.
StationCodestringYesLink to a specific production station where this downtime applies.
Short_CodestringYesAn abbreviated or alphanumeric identifier for the downtime reason.

Full documentation

### 1) Overview
 The `downtimemas` table serves as the primary master repository for downtime classification codes and descriptions within the SQL Server database. It categorizes various reasons for production halts (e.g., "NO POWER", "MACHINE CLEANING", "MATERIAL SHORTING") and associates them with specific stations or operations. This table is critical for OEE (Overall Equipment Effectiveness) reporting, machine utilization analysis, and maintenance tracking.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary key; unique system-generated identifier for the record. | | PK for internal row management. |
 | **compcode** | string | Yes | Company Code; identifies the specific business unit or plant. | e.g., "DAS", "RFL" | Used in joins to filter data by company context. |
 | **downcode** | integer | Yes | Unique identifier for a specific downtime reason. | 1, 2, 3... | Key join column for detail tables like `downtimedtl`. |
 | **downreason** | string | Yes | The descriptive name of the downtime event. | "NO POWER", "SETTING" | Used for display in reports and pivot headers. |
 | **username** | string | Yes | The user account that created or last modified the entry. | "system", "admin" | Audit trail for master data changes. |
 | **StationCode** | string | Yes | Link to a specific production station where this downtime applies. | Likely FK | Joins with `oprstationmas` to group downtimes by station. |
 | **Short_Code** | string | Yes | An abbreviated or alphanumeric identifier for the downtime reason. | | Used in report headers (e.g., `StationName + '#' + Short_Code`). |
 
 ### 3) Relationships & Join Map
 
 Based on the `SCHEMA_MAP` and `REFERENCE_JSON`, the following connections are authoritative:
 
 #### Primary Joins (Validated)
 * **dbo.downtimedtl**: Joins on `downcode` and `compcode`. This is the most common join used to fetch descriptions for specific downtime events recorded against production numbers.
 * **dbo.oprstationmas**: Joins on `stationcode` and `compcode`. Used to associate downtime reasons with physical locations or machinery groups for categorized reporting.
 * **dbo.DownTime100DTL**: Joins on `downcode` (mapped from `downtimereason`) and `compcode`. Used specifically in concise or high-level downtime reporting structures.
 
 #### Likely Joins (Inferred)
 * **dbo.product2 / dbo.product1**: While not joining directly, these tables link to `downtimemas` via the bridge table `downtimedtl` (using `prodno`).
 * **dbo.itemopr**: Likely related via `stationcode` for associating specific operation steps with valid downtime reasons.