• lsrep17 Documentation
  • Tables [Sales].[ShoppingCartItem]
    Contains online customer orders until the order is submitted or cancelled.
    PropertyValue
    CollationSQL_Latin1_General_CP1_CI_AS
    Row Count (~)3
    Created13:14:19 14 marca 2012
    Last Modified13:14:55 14 marca 2012
    KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
    Cluster Primary Key PK_ShoppingCartItem_ShoppingCartItemID: ShoppingCartItemIDShoppingCartItemIDint4
    False
    1 - 1Primary key for ShoppingCartItem records.
    Indexes IX_ShoppingCartItem_ShoppingCartID_ProductIDShoppingCartIDnvarchar(50)100
    False
    Shopping cart identification number.
    Check Constraints CK_ShoppingCartItem_Quantity : ([Quantity]>=(1))Quantityint4
    False
    ((1))Product quantity ordered.
    Indexes IX_ShoppingCartItem_ShoppingCartID_ProductIDForeign Keys FK_ShoppingCartItem_Product_ProductID: [Production].[Product].ProductIDProductIDint4
    False
    Product ordered. Foreign key to Product.ProductID.
    DateCreateddatetime8
    False
    (getdate())Date the time the record was created.
    ModifiedDatedatetime8
    False
    (getdate())Date and time the record was last updated.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_ShoppingCartItem_ShoppingCartItemID: ShoppingCartItemIDPK_ShoppingCartItem_ShoppingCartItemIDShoppingCartItemID
    True
    Primary key (clustered) constraint
    IX_ShoppingCartItem_ShoppingCartID_ProductIDShoppingCartID, ProductIDNonclustered index.
    NameOn ColumnConstraintDescription
    CK_ShoppingCartItem_QuantityQuantity([Quantity]>=(1))Check constraint [Quantity] >= (1)
    NameColumnsDescription
    FK_ShoppingCartItem_Product_ProductIDProductID->[Production].[Product].[ProductID]Foreign key constraint referencing Product.ProductID.
    CREATE TABLE [Sales].[ShoppingCartItem]
    (
    [ShoppingCartItemID] [int] NOT NULL IDENTITY(1, 1),
    [ShoppingCartID] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_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())
    ) ON [PRIMARY]
    GO
    ALTER TABLE [Sales].[ShoppingCartItem] ADD CONSTRAINT [CK_ShoppingCartItem_Quantity] CHECK (([Quantity]>=(1)))
    GO
    ALTER TABLE [Sales].[ShoppingCartItem] ADD CONSTRAINT [PK_ShoppingCartItem_ShoppingCartItemID] PRIMARY KEY CLUSTERED  ([ShoppingCartItemID]) ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX [IX_ShoppingCartItem_ShoppingCartID_ProductID] ON [Sales].[ShoppingCartItem] ([ShoppingCartID], [ProductID]) ON [PRIMARY]
    GO
    ALTER TABLE [Sales].[ShoppingCartItem] ADD CONSTRAINT [FK_ShoppingCartItem_Product_ProductID] FOREIGN KEY ([ProductID]) REFERENCES [Production].[Product] ([ProductID])
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Contains online customer orders until the order is submitted or cancelled.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', NULL, NULL
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date the time the record was created.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'DateCreated'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Product ordered. Foreign key to Product.ProductID.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'ProductID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Product quantity ordered.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'Quantity'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Shopping cart identification number.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'ShoppingCartID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key for ShoppingCartItem records.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'COLUMN', N'ShoppingCartItemID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Check constraint [Quantity] >= (1)', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'CK_ShoppingCartItem_Quantity'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'DF_ShoppingCartItem_DateCreated'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'DF_ShoppingCartItem_ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of 1', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'DF_ShoppingCartItem_Quantity'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Product.ProductID.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'FK_ShoppingCartItem_Product_ProductID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'CONSTRAINT', N'PK_ShoppingCartItem_ShoppingCartItemID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'INDEX', N'IX_ShoppingCartItem_ShoppingCartID_ProductID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Sales', 'TABLE', N'ShoppingCartItem', 'INDEX', N'PK_ShoppingCartItem_ShoppingCartItemID'
    GO