Production |
04/26/2006 |
PRIMARY |
5544 |
912 |
67131 |
Work order details. |
|
|
WorkOrderID |
int |
4 |
|
|
|
|
Primary key. Foreign key to WorkOrder.WorkOrderID. |
|
|
ProductID |
int |
4 |
|
|
|
|
Primary key. Foreign key to Product.ProductID. |
|
|
OperationSequence |
smallint |
2 |
|
|
|
|
Primary key. Indicates the manufacturing process sequence. |
|
|
LocationID |
smallint |
2 |
|
|
|
|
Manufacturing location where the part is processed. Foreign key to Location.LocationID. |
|
|
ScheduledStartDate |
datetime |
8 |
|
|
|
|
Planned manufacturing start date. |
|
|
ScheduledEndDate |
datetime |
8 |
|
|
|
|
Planned manufacturing end date. |
|
|
ActualStartDate |
datetime |
8 |
|
|
|
|
Actual start date. |
|
|
ActualEndDate |
datetime |
8 |
|
|
|
|
Actual end date. |
|
|
ActualResourceHrs |
decimal |
5 |
|
|
|
|
Number of manufacturing hours used. |
|
|
PlannedCost |
money |
8 |
|
|
|
|
Estimated manufacturing cost. |
|
|
ActualCost |
money |
8 |
|
|
|
|
Actual manufacturing cost. |
|
|
ModifiedDate |
datetime |
8 |
|
(getdate()) |
|
|
Date and time the record was last updated. |
Total: 12 column(s)
Total: 2 index(es)
|
CK_WorkOrderRouting_ActualCost |
([ActualCost]>(0.00)) |
|
CK_WorkOrderRouting_ActualEndDate |
([ActualEndDate]>=[ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL) |
|
CK_WorkOrderRouting_ActualResourceHrs |
([ActualResourceHrs]>=(0.0000)) |
|
CK_WorkOrderRouting_PlannedCost |
([PlannedCost]>(0.00)) |
|
CK_WorkOrderRouting_ScheduledEndDate |
([ScheduledEndDate]>=[ScheduledStartDate]) |
Total: 5 constraint(s)
Total: 2 table(s)
Total: 10 object(s)
CREATE TABLE [WorkOrderRouting] (
[WorkOrderID] [int] NOT NULL ,
[ProductID] [int] NOT NULL ,
[OperationSequence] [smallint] NOT NULL ,
[LocationID] [smallint] NOT NULL ,
[ScheduledStartDate] [datetime] NOT NULL ,
[ScheduledEndDate] [datetime] NOT NULL ,
[ActualStartDate] [datetime] NULL ,
[ActualEndDate] [datetime] NULL ,
[ActualResourceHrs] [decimal](9, 4) NULL ,
[PlannedCost] [money] NOT NULL ,
[ActualCost] [money] NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_WorkOrderRouting_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence] PRIMARY KEY CLUSTERED
(
[WorkOrderID],
[ProductID],
[OperationSequence]
) ON [PRIMARY] ,
CONSTRAINT [FK_WorkOrderRouting_Location_LocationID] FOREIGN KEY
(
[LocationID]
) REFERENCES [Location] (
[LocationID]
),
CONSTRAINT [FK_WorkOrderRouting_WorkOrder_WorkOrderID] FOREIGN KEY
(
[WorkOrderID]
) REFERENCES [WorkOrder] (
[WorkOrderID]
),
CONSTRAINT [CK_WorkOrderRouting_ActualCost] CHECK ([ActualCost]>(0.00)),
CONSTRAINT [CK_WorkOrderRouting_ActualEndDate] CHECK ([ActualEndDate]>=[ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL),
CONSTRAINT [CK_WorkOrderRouting_ActualResourceHrs] CHECK ([ActualResourceHrs]>=(0.0000)),
CONSTRAINT [CK_WorkOrderRouting_PlannedCost] CHECK ([PlannedCost]>(0.00)),
CONSTRAINT [CK_WorkOrderRouting_ScheduledEndDate] CHECK ([ScheduledEndDate]>=[ScheduledStartDate])
) ON [PRIMARY]
GO
List of tables