Properties

Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 24 
Rows:
Description: Contains online customer orders until the order is submitted or cancelled. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    ShoppingCartItemID  int          Primary key for ShoppingCartItem records. 
    ShoppingCartID  nvarchar  50          Shopping cart identification number. 
    Quantity  int    ((1))      Product quantity ordered. 
    ProductID  int          Product ordered. Foreign key to Product.ProductID. 
    DateCreated  datetime    (getdate())      Date the time the record was created. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 6 column(s)

Identity column

Name Seed Increment Not for replication
  ShoppingCartItemID   

Indexes

Index Primary Unique Description
  PK_ShoppingCartItem_ShoppingCartItemID      Primary key (clustered) constraint 
  IX_ShoppingCartItem_ShoppingCartID_ProductID      Nonclustered index. 
Total: 2 index(es)

Check Constraints

Name Expression
  CK_ShoppingCartItem_Quantity  ([Quantity]>=(1)) 
Total: 1 constraint(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_ShoppingCartItem_Product_ProductID  PK_Product_ProductID 
Total: 1 table(s)

Objects that [Sales].[ShoppingCartItem] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  ProductCategory  Production  Table 
  ProductModel  Production  Table 
  UnitMeasure  Production  Table 
  ProductSubcategory  Production  Table 
  Product  Production  Table 
Total: 7 object(s)

SQL

CREATE TABLE [ShoppingCartItem] (
    [ShoppingCartItemID] [int] IDENTITY (1, 1) NOT NULL ,
    [ShoppingCartID] [nvarchar] (50) COLLATE Latin1_General_CS_AS NOT NULL ,
    [Quantity] [int] NOT NULL CONSTRAINT [DF_ShoppingCartItem_Quantity] DEFAULT ((1)),
    [ProductID] [int] NOT NULL ,
    [DateCreated] [datetime] NOT NULL CONSTRAINT [DF_ShoppingCartItem_DateCreated] DEFAULT (getdate()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ShoppingCartItem_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_ShoppingCartItem_ShoppingCartItemID] PRIMARY KEY  CLUSTERED
    (
        [ShoppingCartItemID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_ShoppingCartItem_Product_ProductID] FOREIGN KEY
    (
        [ProductID]
    ) REFERENCES [Product] (
        [ProductID]
    ),
    CONSTRAINT [CK_ShoppingCartItem_Quantity] CHECK ([Quantity]>=(1))
) ON [PRIMARY]
GO


See Also

List of tables