AdventureWorks

Basic Index   Expanded Index

Table Name:Production.Document
Description:Product maintenance documents.
Primary Keys:DocumentID
FieldTypeDefaultsNulls?Comments
DocumentIDint - IdentityNoneNoPrimary key for Document records.
Titlenvarchar (50)NoneNoTitle of the document.
FileNamenvarchar (400)NoneNoDirectory path and file name of the document
FileExtensionnvarchar (8)NoneNoFile extension indicating the document type. For example, .doc or .txt.
Revisionnchar (5)NoneNoRevision number of the document.
ChangeNumberint((0))NoEngineering change approval number.
StatustinyintNoneNo1 = Pending approval, 2 = Approved, 3 = Obsolete
DocumentSummarynvarchar (MAX)NoneYesDocument abstract.
Documentvarbinary (MAX)NoneYesComplete document.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_Document_DocumentIDYesYesDocumentID
AK_Document_FileName_RevisionNoYesFileName
Revision

Check ConstraintText
CK_Document_Status([Status]>=(1) AND [Status]<=(3))

No internal foreign key constraints
Primary Key as Foreign Key ConstraintAffected TableAffected Field
FK_ProductDocument_Document_DocumentIDProduction.ProductDocumentDocumentID

No triggers