Owner: | Sales |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 8 |
Index Size KB: | 24 |
Rows: | 3 |
Description: | Contains online customer orders until the order is submitted or cancelled. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
ShoppingCartItemID | int | 4 | Primary key for ShoppingCartItem records. | ||||||
ShoppingCartID | nvarchar | 50 | Shopping cart identification number. | ||||||
Quantity | int | 4 | ((1)) | Product quantity ordered. | |||||
ProductID | int | 4 | Product ordered. Foreign key to Product.ProductID. | ||||||
DateCreated | datetime | 8 | (getdate()) | Date the time the record was created. | |||||
ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
Name | Seed | Increment | Not for replication | |
ShoppingCartItemID | 1 | 1 |
Index | Primary | Unique | Description | |
PK_ShoppingCartItem_ShoppingCartItemID | Primary key (clustered) constraint | |||
IX_ShoppingCartItem_ShoppingCartID_ProductID | Nonclustered index. |
Name | Expression | |
CK_ShoppingCartItem_Quantity | ([Quantity]>=(1)) |
Table | Foreign Key | Primary Key or Unique Constraint | |
Production.Product | FK_ShoppingCartItem_Product_ProductID | PK_Product_ProductID |
Objects that [Sales].[ShoppingCartItem] depends on
Object Name | Owner | Object Type | Dep Level | |
Flag | dbo | User Defined type | 1 | |
Name | dbo | User Defined type | 1 | |
ProductCategory | Production | Table | 2 | |
ProductModel | Production | Table | 2 | |
UnitMeasure | Production | Table | 2 | |
ProductSubcategory | Production | Table | 3 | |
Product | Production | Table | 4 |
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