Description
Product maintenance documents.
Table properties
| name | value |
|---|
| name | [Production].[Document] |
| created | Mar 19 2009 9:08PM |
| modified | Mar 19 2009 9:08PM
|
| ansi nulls | on
|
| quoted identifier | on
|
| row count | 9 |
| Size of data | 344 kb |
| Size of indexes | 24 kb |
| Maximum size of a single row | 4,294,969,163 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| DocumentID | int identity(1,1) | 10 | 4 | | no
| yes
| |
| no
| Primary key for Document records.
|
| Title | nvarchar(50) | 50 | 200 | | no
|
| |
| no
| Title of the document.
|
| FileName | nvarchar(400) | 400 | 1600 | | no
|
| |
| no
| Directory path and file name of the document
|
| FileExtension | nvarchar(8) | 8 | 32 | | no
|
| |
| no
| File extension indicating the document type. For example, .doc or .txt.
|
| Revision | nchar(5) | 5 | 20 | | no
|
| |
| no
| Revision number of the document.
|
| ChangeNumber | int | 10 | 4 | ((0)) | no
|
| |
| no
| Engineering change approval number.
|
| Status | tinyint | 3 | 1 | | no
|
| |
| no
| 1 = Pending approval, 2 = Approved, 3 = Obsolete
|
| DocumentSummary | nvarchar(max) | max | 2147483647 | | yes
|
| |
| no
| Document abstract.
|
| Document | varbinary | max | 2147483647 | | yes
|
| |
| no
| Complete document.
|
| ModifiedDate | datetime | 23 | 8 | (getdate()) | no
|
| |
| no
| Date and time the record was last updated.
|
Indexes
| name | description | column | comment |
|---|
| AK_Document_FileName_Revision | nonclustered, unique located on PRIMARY | FileName, Revision | Unique nonclustered index.
|
| PK_Document_DocumentID | clustered, unique, primary key located on PRIMARY | DocumentID | Clustered index created by a primary key constraint.
|
Referenced by
Foreign key graph
Check constraints
| name | column | comment |
|---|
CK_Document_Status([Status]>=(1) AND [Status]<=(3)) | Status
| Check constraint [Status] BETWEEN (1) AND (3)
|
Defaults
Dependency graph
Sample rows
| DocumentID | Title | FileName | FileExtension | Revision | ChangeNumber | Status | DocumentSummary | Document | ModifiedDate |
|---|
| 1
| Crank Arm and Tire Maintenance
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 0
| 0
| 1
| NULL
| System.Byte[]
| 11/20/2002 9:56:38 AM
|
| 2
| Front Reflector Bracket and Reflector Assembly 3
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 3
| 25
| 2
| NULL
| System.Byte[]
| 6/1/2002 12:00:00 AM
|
| 3
| Front Reflector Bracket Installation
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 1
| 15
| 2
| Reflectors are vital safety components of your bicycle. Always ensure your front and back reflectors...
| System.Byte[]
| 6/1/2002 12:00:00 AM
|
| 4
| Installing Replacement Pedals
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 0
| 32
| 2
| Detailed instructions for replacing pedals with Adventure Works Cycles replacement pedals. Instruct...
| System.Byte[]
| 6/1/2002 12:00:00 AM
|
| 5
| Introduction 1
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 4
| 28
| 2
| NULL
| System.Byte[]
| 7/1/2003 12:00:00 AM
|
| 6
| Lubrication Maintenance
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 2
| 11
| 1
| Guidelines and recommendations for lubricating the required components of your Adventure Works Cycle...
| System.Byte[]
| 7/1/2003 12:00:00 AM
|
| 7
| Repair and Service Guidelines
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 0
| 8
| 2
| It is important that you maintain your bicycle and keep it in good repair. Detailed repair and servi...
| System.Byte[]
| 5/2/1998 12:00:00 AM
|
| 8
| Seat Assembly
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 8
| 55
| 2
| Worn or damaged seats can be easily replaced following these simple instructions. Instructions are ...
| System.Byte[]
| 6/1/2003 12:00:00 AM
|
| 9
| Training Wheels 2
| C:\Program Files\Microsoft SQL Server\MSSQL.1\Samples\Microsoft SQL Server Engine Samples\Full Text ...
| .doc
| 1
| 288
| 3
| NULL
| System.Byte[]
| 7/1/2003 12:00:00 AM
|
Code
CREATE TABLE [Production].[Document](
[DocumentID] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FileName] [nvarchar](400) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FileExtension] [nvarchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Revision] [nchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DocumentID] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FileExtension] [nvarchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ChangeNumber] [int] NOT NULL,
[Status] [tinyint] NOT NULL,
[DocumentSummary] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Document] [varbinary](max) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Document_DocumentID] PRIMARY KEY CLUSTERED
(
[DocumentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [Production].[Document] WITH CHECK ADD CONSTRAINT [CK_Document_Status] CHECK (([Status]>=(1) AND [Status]<=(3)))
ALTER TABLE [Production].[Document] CHECK CONSTRAINT [CK_Document_Status]
ALTER TABLE [Production].[Document] ADD CONSTRAINT [DF_Document_ChangeNumber] DEFAULT ((0)) FOR [ChangeNumber]
ALTER TABLE [Production].[Document] ADD CONSTRAINT [DF_Document_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate]