AdventureWorks
| Table Name: | Sales.ShoppingCartItem |
| Description: | Contains online customer orders until the order is submitted or cancelled. |
| Primary Keys: | ShoppingCartItemID |
| Field | Type | Defaults | Nulls? | Comments |
|---|---|---|---|---|
| ShoppingCartItemID | int - Identity | None | No | Primary key for ShoppingCartItem records. |
| ShoppingCartID | nvarchar (50) | None | No | Shopping cart identification number. |
| Quantity | int | ((1)) | No | Product quantity ordered. |
| ProductID | int | None | No | Product ordered. Foreign key to Product.ProductID. |
| DateCreated | datetime | (getdate()) | No | Date the time the record was created. |
| ModifiedDate | datetime | (getdate()) | No | Date and time the record was last updated. |
| Index | Clustered? | Unique? | Fields |
|---|---|---|---|
| PK_ShoppingCartItem_ShoppingCartItemID | Yes | Yes | ShoppingCartItemID |
| IX_ShoppingCartItem_ShoppingCartID_ProductID | No | No | ShoppingCartID ProductID |
| Check Constraint | Text |
|---|---|
| CK_ShoppingCartItem_Quantity | ([Quantity]>=(1)) |
| Internal Foreign Key Constraint | Affected Field | Source Table |
|---|---|---|
| FK_ShoppingCartItem_Product_ProductID | ProductID | Production.Product |