Tables SQL 2005 Adventure Works OLTP

Production.WorkOrderRouting

Object type: Table

Work order details.

Columns 

Name  Data type  Nullable  Description 
WorkOrderID  int  No Primary key. Foreign key to WorkOrder.WorkOrderID. 
ProductID  int  No Primary key. Foreign key to Product.ProductID. 
OperationSequence  smallint  No Primary key. Indicates the manufacturing process sequence. 
LocationID  smallint  No Manufacturing location where the part is processed. Foreign key to Location.LocationID. 
ScheduledStartDate  datetime  No Planned manufacturing start date. 
ScheduledEndDate  datetime  No Planned manufacturing end date. 
ActualStartDate  datetime  Yes Actual start date. 
ActualEndDate  datetime  Yes Actual end date. 
ActualResourceHrs  decimal(9, 4)  Yes Number of manufacturing hours used.> 
PlannedCost  money  No Estimated manufacturing cost. 
ActualCost  money  Yes Actual manufacturing cost. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_WorkOrderRouting_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_WorkOrderRouting_ScheduledEndDate  CHECK  N/A  Value: ([ScheduledEndDate] >= [ScheduledStartDate])
Check constraint [ScheduledEndDate] >= [ScheduledStartDate] 
CK_WorkOrderRouting_ActualEndDate  CHECK  N/A  Value: (([ActualEndDate] >= [ActualStartDate]) OR ([ActualEndDate] IS NULL) OR ([ActualStartDate] IS NULL) )
Check constraint [ActualEndDate] >= [ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL 
CK_WorkOrderRouting_ActualResourceHrs  CHECK  N/A  Value: ([ActualResourceHrs] >= 0.0000)
Check constraint [ActualResourceHrs]>=(0.0000) 
CK_WorkOrderRouting_PlannedCost  CHECK  N/A  Value: ([PlannedCost] > 0.00)
Check constraint [PlannedCost]>(0.00) 
CK_WorkOrderRouting_ActualCost  CHECK  N/A  Value: ([ActualCost] > 0.00)
Check constraint [ActualCost]>(0.00) 
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence  PRIMARY KEY  WorkOrderID
ProductID
OperationSequence 
Clustered index created by a primary key constraint. 
FK_WorkOrderRouting_Location_LocationID  FOREIGN KEY  LocationID  Reference table: Production.Location
Foreign key constraint referencing Location.LocationID. 
FK_WorkOrderRouting_WorkOrder_WorkOrderID  FOREIGN KEY  WorkOrderID  Reference table: Production.WorkOrder
Foreign key constraint referencing WorkOrder.WorkOrderID. 

Indices 

Name  Description 
IX_WorkOrderRouting_ProductID  Nonclustered index. 

Triggers 

Name  Description 
Production.uWorkOrderRouting  AFTER UPDATE trigger setting the ModifiedDate column in the WorkOrderRouting table to the current date. 

Modified by 

Name  Description 
Production.uWorkOrderRouting  AFTER UPDATE trigger setting the ModifiedDate column in the WorkOrderRouting table to the current date. 

Applies to

Tables | User
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.