Properties

Owner: dbo 
Creation Date: 08/06/2000 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 96 
Rows: 77 
Description:  

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    ProductID  int           
    ProductName  nvarchar  80           
    SupplierID  int           
    CategoryID  int           
    QuantityPerUnit  nvarchar  40           
    UnitPrice  money    (0)       
    UnitsInStock  smallint    (0)       
    UnitsOnOrder  smallint    (0)       
    ReorderLevel  smallint    (0)       
    Discontinued  bit    (0)       
Total: 10 column(s)

Identity column

Name Seed Increment Not for replication
  ProductID   

Indexes

Index Primary Unique Description
  PK_Products       
  CategoriesProducts       
  CategoryID       
  ProductName       
  SupplierID       
  SuppliersProducts       
Total: 6 index(es)

Check Constraints

Name Expression
  CK_Products_UnitPrice  ([UnitPrice] >= 0) 
  CK_ReorderLevel  ([ReorderLevel] >= 0) 
  CK_UnitsInStock  ([UnitsInStock] >= 0) 
  CK_UnitsOnOrder  ([UnitsOnOrder] >= 0) 
Total: 4 constraint(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  dbo.Order Details  FK_Order_Details_Products  PK_Products 
Total: 1 table(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  dbo.Categories  FK_Products_Categories  PK_Categories 
  dbo.Suppliers  FK_Products_Suppliers  PK_Suppliers 
Total: 2 table(s)

Objects that [dbo].[Products] depends on

Object Name Owner Object Type Dep Level
  Categories  dbo  Table 
  Suppliers  dbo  Table 
Total: 2 object(s)

Objects that depend on [dbo].[Products]

Object Name Owner Object Type Dep Level
  Alphabetical list of products  dbo  View 
  Current Product List  dbo  View 
  Products Above Average Price  dbo  View 
  Products by Category  dbo  View 
  Order Details  dbo  Table 
  Ten Most Expensive Products  dbo  Procedure 
  Invoices  dbo  View 
  Order Details Extended  dbo  View 
  Order Subtotals  dbo  View 
  Product Sales for 1997  dbo  View 
  CustOrderHist  dbo  Procedure 
  CustOrdersDetail  dbo  Procedure 
  SalesByCategory  dbo  Procedure 
  Category Sales for 1997  dbo  View 
  Sales by Category  dbo  View 
  Sales Totals by Amount  dbo  View 
  Summary of Sales by Quarter  dbo  View 
  Summary of Sales by Year  dbo  View 
  Employee Sales by Country  dbo  Procedure 
  Sales by Year  dbo  Procedure 
Total: 20 object(s)

SQL

CREATE TABLE [Products] (
    [ProductID] [int] IDENTITY (1, 1) NOT NULL ,
    [ProductName] [nvarchar] (40) COLLATE Cyrillic_General_CI_AS NOT NULL ,
    [SupplierID] [int] NULL ,
    [CategoryID] [int] NULL ,
    [QuantityPerUnit] [nvarchar] (20) COLLATE Cyrillic_General_CI_AS NULL ,
    [UnitPrice] [money] NULL CONSTRAINT [DF_Products_UnitPrice] DEFAULT (0),
    [UnitsInStock] [smallint] NULL CONSTRAINT [DF_Products_UnitsInStock] DEFAULT (0),
    [UnitsOnOrder] [smallint] NULL CONSTRAINT [DF_Products_UnitsOnOrder] DEFAULT (0),
    [ReorderLevel] [smallint] NULL CONSTRAINT [DF_Products_ReorderLevel] DEFAULT (0),
    [Discontinued] [bit] NOT NULL CONSTRAINT [DF_Products_Discontinued] DEFAULT (0),
    CONSTRAINT [PK_Products] PRIMARY KEY  CLUSTERED
    (
        [ProductID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_Products_Categories] FOREIGN KEY
    (
        [CategoryID]
    ) REFERENCES [Categories] (
        [CategoryID]
    ),
    CONSTRAINT [FK_Products_Suppliers] FOREIGN KEY
    (
        [SupplierID]
    ) REFERENCES [Suppliers] (
        [SupplierID]
    ),
    CONSTRAINT [CK_Products_UnitPrice] CHECK ([UnitPrice] >= 0),
    CONSTRAINT [CK_ReorderLevel] CHECK ([ReorderLevel] >= 0),
    CONSTRAINT [CK_UnitsInStock] CHECK ([UnitsInStock] >= 0),
    CONSTRAINT [CK_UnitsOnOrder] CHECK ([UnitsOnOrder] >= 0)
) ON [PRIMARY]
GO


See Also

List of tables