All tables
tables · table

machine

The machine table serves as the central registry for all manufacturing equipment and assets within the organization. It tracks physical characteristics (capacity, model, make), operational metadata (department, machine group, location), and maintenance parameters (preventative maintenance frequency, oil change schedules).

Row count
346
Last entry
Source
tables

Columns

23
ColumnTypeNullableMeaning
indexintegerNoPrimary key / Row index
compcodestringNoCompany Identifier
mccodestringNoUnique Machine Code
mcnamestringNoDescriptive Machine Name
mcmakestringYesManufacturer Name
capacityintegerYesMachine Capacity (Units/Hr or Tons)
usernamestringYesLast User to modify the record
macgroupstringYesClassification of Machine Group
dpcodestringYesDepartment Code
locationstringYesPhysical Shop Floor Location
McShortCodestringYesAbbreviated Machine ID
SubLocCodestringYesDetailed Location/Section Code
PMFeqstringYesPreventive Maintenance Frequency Unit
PMFeqNonumberYesPM Frequency Interval Value
OilChangeFreqstringYesFrequency of Oil Replacement
OilChangeFreqNonumberYesInterval for Oil Change
OilCapacitynumberYesSump Capacity
OilGradestringYesSpecific Oil Grade Required
ConnectedLoadnumberYesElectrical Load requirement
AirConsumptionnumberYesPneumatic Consumption rate
ModelstringYesMachine Model Number
UtilitystringYesUtility connections required
Include_In_OEEstringNoFlag for OEE reporting eligibility

Full documentation

### 1) Overview
 The `machine` table serves as the central registry for all manufacturing equipment and assets within the organization. It tracks physical characteristics (capacity, model, make), operational metadata (department, machine group, location), and maintenance parameters (preventative maintenance frequency, oil change schedules). 
 
 Crucially, this table contains the `Include_In_OEE` flag, which determines if a machine's production data is factored into Overall Equipment Effectiveness (OEE) calculations. It is heavily referenced by production logs (`product1`, `product2`) and maintenance schedules to provide equipment context to manufacturing output.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary key / Row index | | Primary Key |
 | **compcode** | string | No | Company Identifier | e.g., "DAS", "BAM" | Join Key |
 | **mccode** | string | No | Unique Machine Code | e.g., "124", "CNC" | Primary Lookup / Join Key |
 | **mcname** | string | No | Descriptive Machine Name | | Display Name |
 | **mcmake** | string | Yes | Manufacturer Name | | Reference |
 | **capacity** | integer | Yes | Machine Capacity (Units/Hr or Tons) | | OEE Calculations |
 | **username** | string | Yes | Last User to modify the record | | Audit |
 | **macgroup** | string | Yes | Classification of Machine Group | e.g., "FORG", "CNC" | Join to `mactypemas` |
 | **dpcode** | string | Yes | Department Code | e.g., "01", "GPDN" | Join to `dprt_mas` |
 | **location** | string | Yes | Physical Shop Floor Location | | Filtering |
 | **McShortCode**| string | Yes | Abbreviated Machine ID | | Internal Reference |
 | **SubLocCode** | string | Yes | Detailed Location/Section Code | | Metadata |
 | **PMFeq** | string | Yes | Preventive Maintenance Frequency Unit | e.g., "Monthly" | Maintenance Logic |
 | **PMFeqNo** | number | Yes | PM Frequency Interval Value | | Maintenance Logic |
 | **OilChangeFreq**| string | Yes | Frequency of Oil Replacement | | Maintenance Logic |
 | **OilChangeFreqNo**| number | Yes | Interval for Oil Change | | Maintenance Logic |
 | **OilCapacity** | number | Yes | Sump Capacity | | Maintenance Logic |
 | **OilGrade** | string | Yes | Specific Oil Grade Required | | Maintenance Logic |
 | **ConnectedLoad**| number | Yes | Electrical Load requirement | | Utility tracking |
 | **AirConsumption**| number | Yes | Pneumatic Consumption rate | | Utility tracking |
 | **Model** | string | Yes | Machine Model Number | | Technical Spec |
 | **Utility** | string | Yes | Utility connections required | | Technical Spec |
 | **Include_In_OEE**| string | No | Flag for OEE reporting eligibility | "Y", "N" | Report Filtering |
 
 ### 3) Relationships & Join Map
 
 #### Primary Join Keys
 * **compcode**: Used in almost all joins to ensure multi-tenant data integrity.
 * **mccode**: Joins to production and job header tables (often aliased as `machine_cd` or `mc_code`).
 
 #### Physical Join Map (Based on SCHEMA_MAP)
 
 | Target Table | Join Columns | Relationship Type | Purpose |
 | :--- | :--- | :--- | :--- |
 | `dbo.dprt_mas` | `machine.compcode = dprt_mas.compcode` AND `machine.dpcode = dprt_mas.dpcode` | Many-to-One | Departmental categorization of machines. |
 | `dbo.mactypemas` | `machine.compcode = mactypemas.compcode` AND `machine.macgroup = mactypemas.maccode` | Many-to-One | Machine group descriptive naming. |
 | `dbo.product1` | `machine.compcode = product1.compcode` AND `machine.mccode = product1.machine_cd` | One-to-Many | Linking 2nd operation production data to assets. |
 | `dbo.product2` | `machine.compcode = product2.compcode` AND `machine.mccode = product2.machine_cd` | One-to-Many | Linking 1st operation production data to assets. |
 | `dbo.mchdr` | `machine.compcode = mchdr.compcode` AND `machine.mccode = mchdr.mccode` | One-to-Many | Production job card assignments (In-house). |
 | `dbo.pmchdr2` | `machine.compcode = pmchdr2.compcode` AND `machine.mccode = pmchdr2.mccode` | One-to-Many | Maintenance/Production scheduling for 2nd ops. |
 | `dbo.DownTime100HDR`| `machine.compcode = DownTime100HDR.compcode` AND `machine.mccode = DownTime100HDR.mccode` | One-to-Many | Downtime tracking against specific machines. |
 | `dbo.onlinerej_hdr`| `machine.compcode = onlinerej_hdr.compcode` AND `machine.mccode = onlinerej_hdr.mc_code` | One-to-Many | Quality rejection tracking by asset. |