table icon Table: ProductReview

Properties

Property Value
Name ProductReview
ID 354100302
Owner dbo
Schema Production
Filegroup PRIMARY
Data Size (KB) 16 KB
Index Size (KB) 120 KB
Rows 4
Unused (KB) 0 KB
ANSI Null On true
Quoted Identifier true
Lock Escalation TABLE
Lock On Bulk Load false
Lob Data Space
Filestream Data Space ID
Has Unchecked Assembly Data false
Text In Row Limit (bytes) Option not set
Large Value Types Out Of Row false
FullText Change Tracking On true
Tracked By Cdc false
Published false
Schema Published false
Replicated false
Replication Filter false
Merge Published false
Sync Tran Subscribed false
MS Shipped false
Modify Date 8/8/2010 5:23:40 PM
Create Date 8/8/2010 5:21:51 PM

Extended Properties

Name Value
MS_Description Customer reviews of products they have purchased.

Columns

Column ID Column Name Datatype Nullable Is Sparse Is Column Set
1 ProductReviewID int false false false
2 ProductID int false false false
3 ReviewerName Name false false false
4 ReviewDate datetime false false false
5 EmailAddress nvarchar(50) false false false
6 Rating int false false false
7 Comments nvarchar(3850) true false false
8 ModifiedDate datetime false false false

Identity Columns

Column Seed Value Increment Value Last Value Is Not For Replication Is Computed Is Sparse Is Column Set
ProductReviewID 1 1 4 false false false false

Primary Key Constraints

Name Is System Named Extended Property Name Extended Property Value
PK_ProductReview_ProductReviewID false MS_Description Primary key (clustered) constraint

Primary Key Columns

Name
ProductReviewID

Foreign Keys

Name Referenced Object Update Action Delete Action
FK_ProductReview_Product_ProductID Production.Product No action No action

Column Level Check Constraints

Name Column ID Column Definition Is Disabled Is Not For Replication Is Not Trusted Uses Database Collation Is System Named
CK_ProductReview_Rating 6 Rating ([Rating]>=(1) AND [Rating]<=(5)) false false false true false

Table Level Check Constraints

No table constraints defined.

Default Constraints

Name Column Definition Is System Named Extended Property Name Extended Property Value
DF_ProductReview_ReviewDate ReviewDate (getdate()) false MS_Description Default constraint value of GETDATE()
DF_ProductReview_ModifiedDate ModifiedDate (getdate()) false MS_Description Default constraint value of GETDATE()

Indexes

Name Index Type Primary Key Unique Unique Constraint Ignore Duplicate Key Disabled
PK_ProductReview_ProductReviewID CLUSTERED true true false false false
IX_ProductReview_ProductID_Name NONCLUSTERED false false false false false

FullText Indexes

Name Corresponding Unique Index Name Is Enabled Change Tracking State Description
FullText Index PK_ProductReview_ProductReviewID true Auto

Referencing Tables

No referencing tables defined.

Object Level Permissions

No object level permissions defined.

Column Level Permissions

No explicit column permissions granted to this object

Statistics

Detailed Statistics General

NameUpdatedRowsRows SampledStepsDensityAverage Key LengthString IndexFilter ExpressionUnfiltered Rows
PK_ProductReview_ProductReviewID Aug 8 2010 5:22PM 4 4 3 1 4 false 4

Detailed Statistics Density

All Density Average Length Columns
0.25 4 ProductReviewID

Detailed Statistics Histogram

Range High Key Range Rows Estimated Rows Distinct Range Rows Avg Range Rows
1 0 1 0 1
3 1 1 1 1
4 0 1 0 1

Detailed Statistics General

NameUpdatedRowsRows SampledStepsDensityAverage Key LengthString IndexFilter ExpressionUnfiltered Rows
IX_ProductReview_ProductID_Name Aug 8 2010 5:23PM 4 4 3 0 23.5 false 4

Detailed Statistics Density

All Density Average Length Columns
0.3333333 4 ProductID
0.25 19.5 ProductID, ReviewerName
0.25 23.5 ProductID, ReviewerName, ProductReviewID

Detailed Statistics Histogram

Range High Key Range Rows Estimated Rows Distinct Range Rows Avg Range Rows
709 0 1 0 1
798 0 1 0 1
937 0 2 0 1

Objects that depend on [ProductReview]

Objects on which [ProductReview] depends

SQL

Script
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [Production].[ProductReview]( [ProductReviewID] [int] IDENTITY(1,1) NOT NULL, [ProductID] [int] NOT NULL, [ReviewerName] [dbo].[Name] NOT NULL, [ReviewDate] [datetime] NOT NULL, [EmailAddress] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Rating] [int] NOT NULL, [Comments] [nvarchar](3850) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [ModifiedDate] [datetime] NOT NULL ) ON [PRIMARY]
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key for ProductReview records.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'ProductReviewID'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Product identification number. Foreign key to Product.ProductID.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'ProductID'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name of the reviewer.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'ReviewerName'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date review was submitted.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'ReviewDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reviewer''s e-mail address.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'EmailAddress'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Product rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'Rating'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Reviewer''s comments' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'Comments'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time the record was last updated.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview', @level2type=N'COLUMN',@level2name=N'ModifiedDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Customer reviews of products they have purchased.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'ProductReview'

See also

List of Tables