Tables SQL 2005 Adventure Works OLTP

Production.TransactionHistoryArchive

Object type: Table

Transactions for previous years.

Columns 

Name  Data type  Nullable  Description 
TransactionID  int  No Primary key for TransactionHistoryArchive records. 
ProductID  int  No Product identification number. Foreign key to Product.ProductID. 
ReferenceOrderID  int  No Purchase order, sales order, or work order identification number. 
ReferenceOrderLineID  int  No Default value: 0
Line number associated with the purchase order, sales order, or work order. 
TransactionDate  datetime  No Default value: GETDATE()
Date and time of the transaction. 
TransactionType  nchar(1)  No W = Work Order, S = Sales Order, P = Purchase Order 
Quantity  int  No Product quantity. 
ActualCost  money  No Product cost. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_TransactionHistoryArchive_ReferenceOrderLineID  DEFAULT  ReferenceOrderLineID  Value: 0
Default constraint value of 0 
DF_TransactionHistoryArchive_TransactionDate  DEFAULT  TransactionDate  Value: GETDATE()
Default constraint value of GETDATE() 
DF_TransactionHistoryArchive_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_TransactionHistoryArchive_TransactionType  CHECK  N/A  Value: (UPPER([TransactionType]) IN ('W', 'S', 'P') )
Check constraint [TransactionType]='p' OR [TransactionType]='s' OR [TransactionType]='w' OR [TransactionType]='P' OR [TransactionType]='S' OR [TransactionType]='W' 
PK_TransactionHistoryArchive_TransactionID  PRIMARY KEY  TransactionID  Clustered index created by a primary key constraint. 

Indices 

Name  Description 
IX_TransactionHistoryArchive_ProductID  Nonclustered index. 
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID  Nonclustered index. 

Triggers 

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

Modified by 

Name  Description 
Production.uTransactionHistoryArchive  AFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistoryArchive 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.