Sales.ShoppingCartItem Table

Information

NameShoppingCartItem
SchemaSales
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:55

Extended Properties

NameTypeProperty NameValue
ShoppingCartItemTABLEMS_DescriptionContains online customer orders until the order is submitted or cancelled.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   ShoppingCartItemIDint   
 
 
 
   ShoppingCartIDnvarchar(50) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   Quantityint   
((1))
 
 
   ProductIDint  Production.Product.ProductID
 
 
 
   DateCreateddatetime   
(getdate())
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_ShoppingCartItem_ShoppingCartItemIDClustered  ShoppingCartItemID
IX_ShoppingCartItem_ShoppingCartID_ProductIDNonClustered  ShoppingCartID, ProductID

Check Constraints

NameColumnEnabledTrustedExpression
CK_ShoppingCartItem_QuantityQuantity  ([Quantity]>=(1))

Foreign Key Constraints

NameTypeReferenced Table
FK_ShoppingCartItem_Product_ProductIDForeign keyProduction.Product

SQL Script

CREATE TABLE [Sales].[ShoppingCartItem] (
    [ShoppingCartItemID] int NOT NULL IDENTITY,
    [ShoppingCartID] nvarchar(50) NOT NULL,
    [Quantity] int NOT NULL DEFAULT ((1)),
    [ProductID] int NOT NULL,
    [DateCreated] datetime NOT NULL DEFAULT (getdate()),
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE INDEX [IX_ShoppingCartItem_ShoppingCartID_ProductID] on [Sales].[ShoppingCartItem]([ShoppingCartID], [ProductID]);