AdventureWorks

Basic Index   Expanded Index

Table Name:Production.TransactionHistoryArchive
Description:Transactions for previous years.
Primary Keys:TransactionID
FieldTypeDefaultsNulls?Comments
TransactionIDintNoneNoPrimary key for TransactionHistoryArchive records.
ProductIDintNoneNoProduct identification number. Foreign key to Product.ProductID.
ReferenceOrderIDintNoneNoPurchase order, sales order, or work order identification number.
ReferenceOrderLineIDint((0))NoLine number associated with the purchase order, sales order, or work order.
TransactionDatedatetime(getdate())NoDate and time of the transaction.
TransactionTypenchar (1)NoneNoW = Work Order, S = Sales Order, P = Purchase Order
QuantityintNoneNoProduct quantity.
ActualCostmoneyNoneNoProduct cost.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_TransactionHistoryArchive_TransactionIDYesYesTransactionID
IX_TransactionHistoryArchive_ProductIDNoNoProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineIDNoNoReferenceOrderID
ReferenceOrderLineID

Check ConstraintText
CK_TransactionHistoryArchive_TransactionType(upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')

No internal foreign key constraints
No primary keys as foreign key constraints
No triggers