Owner: | dbo |
Creation Date: | 08/06/2000 |
Located On: | PRIMARY |
Data Size KB: | 8 |
Index Size KB: | 96 |
Rows: | 77 |
Description: |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
|
ProductID | int | 4 |
|
|
|
|||
|
ProductName | nvarchar | 80 |
|
|
|
|||
|
|
SupplierID | int | 4 |
|
|
|
||
|
|
CategoryID | int | 4 |
|
|
|
||
|
QuantityPerUnit | nvarchar | 40 |
|
|
|
|||
|
UnitPrice | money | 8 |
|
(0) |
|
|
||
|
UnitsInStock | smallint | 2 |
|
(0) |
|
|
||
|
UnitsOnOrder | smallint | 2 |
|
(0) |
|
|
||
|
ReorderLevel | smallint | 2 |
|
(0) |
|
|
||
|
Discontinued | bit | 1 |
|
(0) |
|
|
Name | Seed | Increment | Not for replication | |
|
ProductID | 1 | 1 |
|
Index | Primary | Unique | Description | |
|
PK_Products |
|
|
|
|
CategoriesProducts |
|
|
|
|
CategoryID |
|
|
|
|
ProductName |
|
|
|
|
SupplierID |
|
|
|
|
SuppliersProducts |
|
|
Name | Expression | |
|
CK_Products_UnitPrice | ([UnitPrice] >= 0) |
|
CK_ReorderLevel | ([ReorderLevel] >= 0) |
|
CK_UnitsInStock | ([UnitsInStock] >= 0) |
|
CK_UnitsOnOrder | ([UnitsOnOrder] >= 0) |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
dbo.Order Details | FK_Order_Details_Products | PK_Products |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
dbo.Categories | FK_Products_Categories | PK_Categories |
|
dbo.Suppliers | FK_Products_Suppliers | PK_Suppliers |
Objects that [dbo].[Products] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Categories | dbo | Table | 1 |
|
Suppliers | dbo | Table | 1 |
Objects that depend on [dbo].[Products]
Object Name | Owner | Object Type | Dep Level | |
|
Alphabetical list of products | dbo | View | 1 |
|
Current Product List | dbo | View | 1 |
|
Products Above Average Price | dbo | View | 1 |
|
Products by Category | dbo | View | 1 |
|
Order Details | dbo | Table | 1 |
|
Ten Most Expensive Products | dbo | Procedure | 1 |
|
Invoices | dbo | View | 2 |
|
Order Details Extended | dbo | View | 2 |
|
Order Subtotals | dbo | View | 2 |
|
Product Sales for 1997 | dbo | View | 2 |
|
CustOrderHist | dbo | Procedure | 2 |
|
CustOrdersDetail | dbo | Procedure | 2 |
|
SalesByCategory | dbo | Procedure | 2 |
|
Category Sales for 1997 | dbo | View | 3 |
|
Sales by Category | dbo | View | 3 |
|
Sales Totals by Amount | dbo | View | 3 |
|
Summary of Sales by Quarter | dbo | View | 3 |
|
Summary of Sales by Year | dbo | View | 3 |
|
Employee Sales by Country | dbo | Procedure | 3 |
|
Sales by Year | dbo | Procedure | 3 |
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