Tables SQL 2005 Adventure Works OLTP

Production.Document

Object type: Table

Product maintenance documents.

Columns 

Name  Data type  Nullable  Description 
DocumentID  int  No Column has identity seed value of 1 with a step value of 1.
Primary key for Document records. 
Title  nvarchar(50)  No Title of the document. 
FileName  nvarchar(400)  No Directory path and file name of the document 
FileExtension  nvarchar(8)  No File extension indicating the document type. For example, .doc or .txt. 
Revision  nchar(5)  No Revision number of the document. 
ChangeNumber  int  No Default value: 0
Engineering change approval number. 
Status  tinyint  No 1 = Pending approval, 2 = Approved, 3 = Obsolete 
DocumentSummary  nvarchar(max)  Yes Document abstract. 
Document  varbinary(max)  Yes Complete document. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_Document_ChangeNumber  DEFAULT  ChangeNumber  Value: 0
Default constraint value of 0 
DF_Document_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_Document_Status  CHECK  N/A  Value: ([Status] BETWEEN 1 AND 3)
Check constraint [Status] BETWEEN (1) AND (3) 
PK_Document_DocumentID  PRIMARY KEY  DocumentID  Clustered index created by a primary key constraint. 

Indices 

Name  Description 
AK_Document_FileName_Revision  Unique nonclustered index. 

Triggers 

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

Linked tables 

Name  Description 
Production.ProductDocument  Cross-reference table mapping products to related product documents. 

Modified by 

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