Northwind30/03/2009
4.25 MB
Summary
Tables
(14)
Views
(16)
dbo.Alphabetical list of products
dbo.Category Sales for 1997
dbo.Current Product List
dbo.Customer and Suppliers by City
dbo.Invoices
dbo.Order Details Extended
dbo.Order Subtotals
dbo.Orders Qry
dbo.Product Sales for 1997
dbo.Products Above Average Price
dbo.Products by Category
dbo.Quarterly Orders
dbo.Sales by Category
dbo.Sales Totals by Amount
dbo.Summary of Sales by Quarter
dbo.Summary of Sales by Year
Stored procedures
(7)
User-defined types
(1)
Users (2)
Roles (10)
Tables
Table: dbo.CategoriesFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | CategoryID | int | Categories of Northwind products. | ||
![]() | CategoryName | nvarchar (15) | Name of food category. | ||
| Description | ntext | Yes | Full description of the category. Provide samples. | ||
| Picture | image | Yes | A picture representing the food category. |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Products | FK_Products_Categories | PK_Categories |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
CategoryName | CategoryName | ASC | NONCLUSTERED | |
PK_Categories | CategoryID | ASC | Yes | CLUSTERED |
Field extended properties:
| Column name | Extended property | Value |
| CategoryID | Author | Field level property |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Extended properties
Author | John Smith |
CustomProperty1 | Sample value to test extended properties |
Objects that depend on dbo.Categories
dbo.Alphabetical list of products
dbo.Product Sales for 1997
dbo.Products by Category
dbo.Sales by Category
dbo.SalesByCategory
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Categories]( [CategoryID] [int] IDENTITY(1,1) NOT NULL, [CategoryName] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NOT NULL, [Description] [ntext] COLLATE Modern_Spanish_CI_AS NULL, [Picture] [image] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Table: dbo.CustomerCustomerDemoFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() ![]() | CustomerID | nchar (5) | 234 | ||
![]() ![]() | CustomerTypeID | nchar (10) | 234 |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_CustomerCustomerDemo_Customers | CustomerID | PK_Customers
(dbo.Customers)
| |
FK_CustomerCustomerDemo | CustomerTypeID | PK_CustomerDemographics
(dbo.CustomerDemographics)
|
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_CustomerCustomerDemo | CustomerID | ASC | Yes | NONCLUSTERED |
PK_CustomerCustomerDemo | CustomerTypeID | ASC | Yes | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[CustomerCustomerDemo]( [CustomerID] [nchar](5) COLLATE Modern_Spanish_CI_AS NOT NULL, [CustomerTypeID] [nchar](10) COLLATE Modern_Spanish_CI_AS NOT NULL ) ON [PRIMARY]
Table: dbo.CustomerDemographicsFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | CustomerTypeID | nchar (10) | 123465 | ||
| CustomerDesc | ntext | Yes | sdfg |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.CustomerCustomerDemo | FK_CustomerCustomerDemo | PK_CustomerDemographics |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_CustomerDemographics | CustomerTypeID | ASC | Yes | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[CustomerDemographics]( [CustomerTypeID] [nchar](10) COLLATE Modern_Spanish_CI_AS NOT NULL, [CustomerDesc] [ntext] COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Table: dbo.CustomersFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | CustomerID | nchar (5) | Unique five-character code based on customer name. | ||
![]() | CompanyName | nvarchar (40) | sdfg | ||
| ContactName | nvarchar (30) | Yes | sdg | ||
| ContactTitle | nvarchar (30) | Yes | sdfg | ||
| Address | nvarchar (60) | Yes | Street or post-office box. | ||
![]() | City | nvarchar (15) | Yes | ||
![]() | Region | nvarchar (15) | Yes | State or province. | |
![]() | PostalCode | nvarchar (10) | Yes | ||
| Country | nvarchar (15) | Yes | |||
| Phone | nvarchar (24) | Yes | Phone number includes country code or area code. | ||
| Fax | nvarchar (24) | Yes | Phone number includes country code or area code. |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.CustomerCustomerDemo | FK_CustomerCustomerDemo_Customers | PK_Customers |
dbo.Orders | FK_Orders_Customers | PK_Customers |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
City | City | ASC | NONCLUSTERED | |
CompanyName | CompanyName | ASC | NONCLUSTERED | |
IX_Customers | CompanyName | ASC | NONCLUSTERED | |
PK_Customers | CustomerID | ASC | Yes | CLUSTERED |
PostalCode | PostalCode | ASC | NONCLUSTERED | |
Region | Region | ASC | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Extended properties
Author | John Smith |
CustomProperty1 | Sample value to test extended properties |
Objects that depend on dbo.Customers
dbo.Customer and Suppliers by City
dbo.CustOrderHist
dbo.Invoices
dbo.Orders Qry
dbo.Quarterly Orders
dbo.Sales Totals by Amount
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Customers]( [CustomerID] [nchar](5) COLLATE Modern_Spanish_CI_AS NOT NULL, [CompanyName] [nvarchar](40) COLLATE Modern_Spanish_CI_AS NOT NULL, [ContactName] [nvarchar](30) COLLATE Modern_Spanish_CI_AS NULL, [ContactTitle] [nvarchar](30) COLLATE Modern_Spanish_CI_AS NULL, [Address] [nvarchar](60) COLLATE Modern_Spanish_CI_AS NULL, [City] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [Region] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [PostalCode] [nvarchar](10) COLLATE Modern_Spanish_CI_AS NULL, [Country] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [Phone] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL, [Fax] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY]
Table: dbo.EmployeesFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | EmployeeID | int | Number automatically assigned to new employee. | ||
![]() | LastName | nvarchar (20) | |||
| FirstName | nvarchar (10) | ||||
| Title | nvarchar (30) | Yes | Employee's title. | ||
| TitleOfCourtesy | nvarchar (25) | Yes | |||
| BirthDate | datetime | Yes | |||
| HireDate | datetime | Yes | |||
| Address | nvarchar (60) | Yes | Street or post-office box. | ||
| City | nvarchar (15) | Yes | |||
| Region | nvarchar (15) | Yes | Street or post-office box. | ||
![]() | PostalCode | nvarchar (10) | Yes | ||
| Country | nvarchar (15) | Yes | |||
| HomePhone | nvarchar (24) | Yes | Phone number includes country code or area code. | ||
| Extension | nvarchar (4) | Yes | Internal telephone extension number. | ||
| Photo | image | Yes | Picture of employee. | ||
| Notes | ntext | Yes | General information about employee's background. | ||
![]() | ReportsTo | int | Yes | Employee's supervisor. | |
| PhotoPath | nvarchar (255) | Yes |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_Employees_Employees | ReportsTo | PK_Employees
(dbo.Employees)
|
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Employees | FK_Employees_Employees | PK_Employees |
dbo.EmployeeTerritories | FK_EmployeeTerritories_Employees | PK_Employees |
dbo.Orders | FK_Orders_Employees | PK_Employees |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
LastName | LastName | ASC | NONCLUSTERED | |
PK_Employees | EmployeeID | ASC | Yes | CLUSTERED |
PostalCode | PostalCode | ASC | NONCLUSTERED |
Check constraints
| Check name | Column name | Check expresion |
CK_Birthdate | BirthDate | ([BirthDate] < getdate()) |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Objects that depend on dbo.Employees
dbo.Employee Sales by Country
dbo.Invoices
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Employees]( [EmployeeID] [int] IDENTITY(1,1) NOT NULL, [LastName] [nvarchar](20) COLLATE Modern_Spanish_CI_AS NOT NULL, [FirstName] [nvarchar](10) COLLATE Modern_Spanish_CI_AS NOT NULL, [Title] [nvarchar](30) COLLATE Modern_Spanish_CI_AS NULL, [TitleOfCourtesy] [nvarchar](25) COLLATE Modern_Spanish_CI_AS NULL, [BirthDate] [datetime] NULL, [HireDate] [datetime] NULL, [Address] [nvarchar](60) COLLATE Modern_Spanish_CI_AS NULL, [City] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [Region] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [PostalCode] [nvarchar](10) COLLATE Modern_Spanish_CI_AS NULL, [Country] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [HomePhone] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL, [Extension] [nvarchar](4) COLLATE Modern_Spanish_CI_AS NULL, [Photo] [image] NULL, [Notes] [ntext] COLLATE Modern_Spanish_CI_AS NULL, [ReportsTo] [int] NULL, [PhotoPath] [nvarchar](255) COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Table: dbo.EmployeeTerritoriesFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() ![]() | EmployeeID | int | |||
![]() ![]() | TerritoryID | nvarchar (20) |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_EmployeeTerritories_Employees | EmployeeID | PK_Employees
(dbo.Employees)
| |
FK_EmployeeTerritories_Territories | TerritoryID | PK_Territories
(dbo.Territories)
|
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_EmployeeTerritories | EmployeeID | ASC | Yes | NONCLUSTERED |
PK_EmployeeTerritories | TerritoryID | ASC | Yes | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[EmployeeTerritories]( [EmployeeID] [int] NOT NULL, [TerritoryID] [nvarchar](20) COLLATE Modern_Spanish_CI_AS NOT NULL ) ON [PRIMARY]
Table: dbo.Order DetailsFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() ![]() | OrderID | int | Same as Order ID in Orders table. | ||
![]() ![]() | ProductID | int | Same as Product ID in Products table. | ||
| UnitPrice | money | (0) | |||
| Quantity | smallint | (1) | |||
| Discount | real | (0) |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_Order_Details_Orders | OrderID | PK_Orders
(dbo.Orders)
| |
FK_Order_Details_Products | ProductID | PK_Products
(dbo.Products)
|
Indices
| Index name | Column name | Sort direction | Unique | Index type |
OrderID | OrderID | ASC | NONCLUSTERED | |
OrdersOrder_Details | OrderID | ASC | NONCLUSTERED | |
PK_Order_Details | OrderID | ASC | Yes | CLUSTERED |
PK_Order_Details | ProductID | ASC | Yes | CLUSTERED |
ProductID | ProductID | ASC | NONCLUSTERED | |
ProductsOrder_Details | ProductID | ASC | NONCLUSTERED |
Check constraints
| Check name | Column name | Check expresion |
CK_Discount | Discount | ([Discount] >= 0 and [Discount] <= 1) |
CK_Quantity | Quantity | ([Quantity] > 0) |
CK_UnitPrice | UnitPrice | ([UnitPrice] >= 0) |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Objects that depend on dbo.Order Details
dbo.CustOrderHist
dbo.CustOrdersDetail
dbo.Invoices
dbo.Order Details Extended
dbo.Order Subtotals
dbo.Product Sales for 1997
dbo.SalesByCategory
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Order Details]( [OrderID] [int] NOT NULL, [ProductID] [int] NOT NULL, [UnitPrice] [money] NOT NULL, [Quantity] [smallint] NOT NULL, [Discount] [real] NOT NULL ) ON [PRIMARY]
Table: dbo.OrdersFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | OrderID | int | |||
![]() | CustomerID | nchar (5) | Yes | ||
![]() | EmployeeID | int | Yes | Same entry as in Employees table. | |
![]() | OrderDate | datetime | Yes | ||
| RequiredDate | datetime | Yes | |||
![]() | ShippedDate | datetime | Yes | ||
![]() | ShipVia | int | Yes | Same as Shipper ID in Shippers table. | |
| Freight | money | Yes | (0) | ||
| ShipName | nvarchar (40) | Yes | Name of person or company to receive the shipment. | ||
| ShipAddress | nvarchar (60) | Yes | Street address only -- no post-office box allowed. | ||
| ShipCity | nvarchar (15) | Yes | |||
| ShipRegion | nvarchar (15) | Yes | State or province. | ||
![]() | ShipPostalCode | nvarchar (10) | Yes | ||
| ShipCountry | nvarchar (15) | Yes |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_Orders_Customers | CustomerID | PK_Customers
(dbo.Customers)
| |
FK_Orders_Employees | EmployeeID | PK_Employees
(dbo.Employees)
| |
FK_Orders_Shippers | ShipVia | PK_Shippers
(dbo.Shippers)
|
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Order Details | FK_Order_Details_Orders | PK_Orders |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
CustomerID | CustomerID | ASC | NONCLUSTERED | |
CustomersOrders | CustomerID | ASC | NONCLUSTERED | |
EmployeeID | EmployeeID | ASC | NONCLUSTERED | |
EmployeesOrders | EmployeeID | ASC | NONCLUSTERED | |
OrderDate | OrderDate | ASC | NONCLUSTERED | |
PK_Orders | OrderID | ASC | Yes | CLUSTERED |
ShippedDate | ShippedDate | ASC | NONCLUSTERED | |
ShippersOrders | ShipVia | ASC | NONCLUSTERED | |
ShipPostalCode | ShipPostalCode | ASC | NONCLUSTERED |
Field extended properties:
| Column name | Extended property | Value |
| OrderID | MS_Descriptions | Unique order number. |
| CustomerID | MS_Descriptions | Same entry as in Customers table. |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Objects that depend on dbo.Orders
dbo.CustOrderHist
dbo.CustOrdersOrders
dbo.Employee Sales by Country
dbo.Invoices
dbo.Orders Qry
dbo.Product Sales for 1997
dbo.Quarterly Orders
dbo.Sales by Category
dbo.Sales by Year
dbo.Sales Totals by Amount
dbo.SalesByCategory
dbo.Summary of Sales by Quarter
dbo.Summary of Sales by Year
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Orders]( [OrderID] [int] IDENTITY(1,1) NOT NULL, [CustomerID] [nchar](5) COLLATE Modern_Spanish_CI_AS NULL, [EmployeeID] [int] NULL, [OrderDate] [datetime] NULL, [RequiredDate] [datetime] NULL, [ShippedDate] [datetime] NULL, [ShipVia] [int] NULL, [Freight] [money] NULL, [ShipName] [nvarchar](40) COLLATE Modern_Spanish_CI_AS NULL, [ShipAddress] [nvarchar](60) COLLATE Modern_Spanish_CI_AS NULL, [ShipCity] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [ShipRegion] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [ShipPostalCode] [nvarchar](10) COLLATE Modern_Spanish_CI_AS NULL, [ShipCountry] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY]
Table: dbo.ProductsFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | ProductID | int | Number automatically assigned to new product. | ||
![]() | ProductName | nvarchar (40) | |||
![]() | SupplierID | int | Yes | Same entry as in Suppliers table. | |
![]() | CategoryID | int | Yes | Same entry as in Categories table. | |
| QuantityPerUnit | nvarchar (20) | Yes | (e.g., 24-count case, 1-liter bottle). | ||
| UnitPrice | money | Yes | (0) | ||
| UnitsInStock | smallint | Yes | (0) | ||
| UnitsOnOrder | smallint | Yes | (0) | ||
| ReorderLevel | smallint | Yes | (0) | Minimum units to maintain in stock. | |
| Discontinued | bit | (0) | Yes means item is no longer available. |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_Products_Suppliers | SupplierID | PK_Suppliers
(dbo.Suppliers)
| |
FK_Products_Categories | CategoryID | PK_Categories
(dbo.Categories)
|
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Order Details | FK_Order_Details_Products | PK_Products |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
CategoriesProducts | CategoryID | ASC | NONCLUSTERED | |
CategoryID | CategoryID | ASC | NONCLUSTERED | |
PK_Products | ProductID | ASC | Yes | CLUSTERED |
ProductName | ProductName | ASC | NONCLUSTERED | |
SupplierID | SupplierID | ASC | NONCLUSTERED | |
SuppliersProducts | SupplierID | ASC | NONCLUSTERED |
Check constraints
| Check name | Column name | Check expresion |
CK_Products_UnitPrice | UnitPrice | ([UnitPrice] >= 0) |
CK_ReorderLevel | ReorderLevel | ([ReorderLevel] >= 0) |
CK_UnitsInStock | UnitsInStock | ([UnitsInStock] >= 0) |
CK_UnitsOnOrder | UnitsOnOrder | ([UnitsOnOrder] >= 0) |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Objects that depend on dbo.Products
dbo.Alphabetical list of products
dbo.Current Product List
dbo.CustOrderHist
dbo.CustOrdersDetail
dbo.Invoices
dbo.Order Details Extended
dbo.Product Sales for 1997
dbo.Products Above Average Price
dbo.Products by Category
dbo.Sales by Category
dbo.SalesByCategory
dbo.Ten Most Expensive Products
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Products]( [ProductID] [int] IDENTITY(1,1) NOT NULL, [ProductName] [nvarchar](40) COLLATE Modern_Spanish_CI_AS NOT NULL, [SupplierID] [int] NULL, [CategoryID] [int] NULL, [QuantityPerUnit] [nvarchar](20) COLLATE Modern_Spanish_CI_AS NULL, [UnitPrice] [money] NULL, [UnitsInStock] [smallint] NULL, [UnitsOnOrder] [smallint] NULL, [ReorderLevel] [smallint] NULL, [Discontinued] [bit] NOT NULL ) ON [PRIMARY]
Table: dbo.RegionFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | RegionID | int | |||
| RegionDescription | nchar (50) |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Territories | FK_Territories_Region | PK_Region |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_Region | RegionID | ASC | Yes | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Region]( [RegionID] [int] NOT NULL, [RegionDescription] [nchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL ) ON [PRIMARY]
Table: dbo.ShippersFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | ShipperID | int | Number automatically assigned to new shipper. | ||
| CompanyName | nvarchar (40) | Name of shipping company. | |||
| Phone | nvarchar (24) | Yes | Phone number includes country code or area code. |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Orders | FK_Orders_Shippers | PK_Shippers |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_Shippers | ShipperID | ASC | Yes | CLUSTERED |
Objects that depend on dbo.Shippers
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Shippers]( [ShipperID] [int] IDENTITY(1,1) NOT NULL, [CompanyName] [nvarchar](40) COLLATE Modern_Spanish_CI_AS NOT NULL, [Phone] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY]
Table: dbo.SuppliersFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | SupplierID | int | Number automatically assigned to new supplier. | ||
![]() | CompanyName | nvarchar (40) | |||
| ContactName | nvarchar (30) | Yes | |||
| ContactTitle | nvarchar (30) | Yes | |||
| Address | nvarchar (60) | Yes | Street or post-office box. | ||
| City | nvarchar (15) | Yes | |||
| Region | nvarchar (15) | Yes | State or province. | ||
![]() | PostalCode | nvarchar (10) | Yes | ||
| Country | nvarchar (15) | Yes | |||
| Phone | nvarchar (24) | Yes | Phone number includes country code or area code. | ||
| Fax | nvarchar (24) | Yes | Phone number includes country code or area code. | ||
| HomePage | ntext | Yes | Supplier's home page on World Wide Web. |
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.Products | FK_Products_Suppliers | PK_Suppliers |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
CompanyName | CompanyName | ASC | NONCLUSTERED | |
PK_Suppliers | SupplierID | ASC | Yes | CLUSTERED |
PostalCode | PostalCode | ASC | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Objects that depend on dbo.Suppliers
dbo.Customer and Suppliers by City
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Suppliers]( [SupplierID] [int] IDENTITY(1,1) NOT NULL, [CompanyName] [nvarchar](40) COLLATE Modern_Spanish_CI_AS NOT NULL, [ContactName] [nvarchar](30) COLLATE Modern_Spanish_CI_AS NULL, [ContactTitle] [nvarchar](30) COLLATE Modern_Spanish_CI_AS NULL, [Address] [nvarchar](60) COLLATE Modern_Spanish_CI_AS NULL, [City] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [Region] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [PostalCode] [nvarchar](10) COLLATE Modern_Spanish_CI_AS NULL, [Country] [nvarchar](15) COLLATE Modern_Spanish_CI_AS NULL, [Phone] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL, [Fax] [nvarchar](24) COLLATE Modern_Spanish_CI_AS NULL, [HomePage] [ntext] COLLATE Modern_Spanish_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Table: dbo.TerritoriesFields
| Field name | Data type | Nullable | Default value | Field description | |
![]() | TerritoryID | nvarchar (20) | sdfg | ||
| TerritoryDescription | nchar (50) | sdfg | |||
![]() | RegionID | int | sdfg |
Foreign keys dependencies:
| Name | Column | Reference | Foreign Key description |
FK_Territories_Region | RegionID | PK_Region
(dbo.Region)
|
Referencing tables
| Table name | Foreign key | Primary key or unique constraint |
dbo.EmployeeTerritories | FK_EmployeeTerritories_Territories | PK_Territories |
Indices
| Index name | Column name | Sort direction | Unique | Index type |
PK_Territories | TerritoryID | ASC | Yes | NONCLUSTERED |
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() | ![]() |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[Territories]( [TerritoryID] [nvarchar](20) COLLATE Modern_Spanish_CI_AS NOT NULL, [TerritoryDescription] [nchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL, [RegionID] [int] NOT NULL ) ON [PRIMARY]
Table: dbo.TestTableFields
| Field name | Data type | Nullable | Default value | Field description | |
| TestCustomField | TestType (20) | Yes | sdcs |
Table definition
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [dbo].[TestTable]( [TestCustomField] [TestType] NULL ) ON [PRIMARY]
Views
View: dbo.Alphabetical list of products| View name: | dbo.Alphabetical list of products |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Products | ProductID | int | ||
dbo.Products | ProductName | nvarchar (40) | ||
dbo.Products | SupplierID | int | Yes | |
dbo.Products | CategoryID | int | Yes | |
dbo.Products | QuantityPerUnit | nvarchar (20) | Yes | |
dbo.Products | UnitPrice | money | Yes | |
dbo.Products | UnitsInStock | smallint | Yes | |
dbo.Products | UnitsOnOrder | smallint | Yes | |
dbo.Products | ReorderLevel | smallint | Yes | |
dbo.Products | Discontinued | bit | ||
dbo.Categories | CategoryName | nvarchar (15) |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Category Sales for 1997| View name: | dbo.Category Sales for 1997 |
| Description: | Totals product sales by category based on values returned by the Product Sales for 1997 query. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Product Sales for 1997 | CategoryName | nvarchar (15) | CatName | |
![]() | CategorySales | money | Yes | CatSales |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Current Product List| View name: | dbo.Current Product List |
| Description: | Filters records in Products table; query returns only products that are not discontinued. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Products | ProductID | int | ||
dbo.Products | ProductName | nvarchar (40) |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Customer and Suppliers by City| View name: | dbo.Customer and Suppliers by City |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Customers | City | nvarchar (15) | Yes | |
dbo.Customers | CompanyName | nvarchar (40) | ||
dbo.Customers | ContactName | nvarchar (30) | Yes | |
![]() | Relationship | varchar (9) |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Invoices| View name: | dbo.Invoices |
| Description: | (Criteria) Record source for Invoice report. Based on six tables. Includes expressions that concatenate first and last employee name and that use the CCur function to calculate extended price. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Orders | ShipName | nvarchar (40) | Yes | Name of the shipper |
dbo.Orders | ShipAddress | nvarchar (60) | Yes | |
dbo.Orders | ShipCity | nvarchar (15) | Yes | |
dbo.Orders | ShipRegion | nvarchar (15) | Yes | |
dbo.Orders | ShipPostalCode | nvarchar (10) | Yes | |
dbo.Orders | ShipCountry | nvarchar (15) | Yes | |
dbo.Orders | CustomerID | nchar (5) | Yes | |
![]() | CustomerName | nvarchar (40) | ||
dbo.Customers | Address | nvarchar (60) | Yes | |
dbo.Customers | City | nvarchar (15) | Yes | |
dbo.Customers | Region | nvarchar (15) | Yes | |
dbo.Customers | PostalCode | nvarchar (10) | Yes | |
dbo.Customers | Country | nvarchar (15) | Yes | |
![]() | Salesperson | nvarchar (31) | ||
dbo.Orders | OrderID | int | ||
dbo.Orders | OrderDate | datetime | Yes | |
dbo.Orders | RequiredDate | datetime | Yes | |
dbo.Orders | ShippedDate | datetime | Yes | |
![]() | ShipperName | nvarchar (40) | ||
dbo.Products | ProductID | int | ||
dbo.Products | ProductName | nvarchar (40) | ||
dbo.Order Details | UnitPrice | money | ||
dbo.Order Details | Quantity | smallint | ||
dbo.Order Details | Discount | real | ||
![]() | ExtendedPrice | money | Yes | |
dbo.Orders | Freight | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
dbo.Customers
dbo.Shippers
dbo.Employees
dbo.Order Details
dbo.Products
dbo.Orders
View: dbo.Order Details Extended| View name: | dbo.Order Details Extended |
| Description: | Record source for several forms and reports. Uses CCur function to compute the ExtendedPrice for each item ordered. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Order Details | OrderID | int | ||
dbo.Products | ProductID | int | ||
dbo.Products | ProductName | nvarchar (40) | ||
dbo.Order Details | UnitPrice | money | ||
dbo.Order Details | Quantity | smallint | ||
dbo.Order Details | Discount | real | ||
![]() | ExtendedPrice | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
Objects that depend on dbo.Order Details Extended
View: dbo.Order Subtotals| View name: | dbo.Order Subtotals |
| Description: | Record source for other queries. Uses Sum and CCur functions to compute subtotal for each order. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Order Details | OrderID | int | ||
![]() | Subtotal | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
Objects that depend on dbo.Order Subtotals
dbo.Employee Sales by Country
dbo.Sales by Year
dbo.Sales Totals by Amount
dbo.Summary of Sales by Quarter
dbo.Summary of Sales by Year
View: dbo.Orders Qry| View name: | dbo.Orders Qry |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Orders | OrderID | int | ||
dbo.Orders | CustomerID | nchar (5) | Yes | |
dbo.Orders | EmployeeID | int | Yes | |
dbo.Orders | OrderDate | datetime | Yes | |
dbo.Orders | RequiredDate | datetime | Yes | |
dbo.Orders | ShippedDate | datetime | Yes | |
dbo.Orders | ShipVia | int | Yes | |
dbo.Orders | Freight | money | Yes | |
dbo.Orders | ShipName | nvarchar (40) | Yes | |
dbo.Orders | ShipAddress | nvarchar (60) | Yes | |
dbo.Orders | ShipCity | nvarchar (15) | Yes | |
dbo.Orders | ShipRegion | nvarchar (15) | Yes | |
dbo.Orders | ShipPostalCode | nvarchar (10) | Yes | |
dbo.Orders | ShipCountry | nvarchar (15) | Yes | |
dbo.Customers | CompanyName | nvarchar (40) | ||
dbo.Customers | Address | nvarchar (60) | Yes | |
dbo.Customers | City | nvarchar (15) | Yes | |
dbo.Customers | Region | nvarchar (15) | Yes | |
dbo.Customers | PostalCode | nvarchar (10) | Yes | |
dbo.Customers | Country | nvarchar (15) | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Product Sales for 1997| View name: | dbo.Product Sales for 1997 |
| Description: | Record source for Category Sales for 1997 query. Uses Sum and CCur functions. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Categories | CategoryName | nvarchar (15) | ||
dbo.Products | ProductName | nvarchar (40) | ||
![]() | ProductSales | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
dbo.Order Details
dbo.Categories
dbo.Products
dbo.Orders
Objects that depend on dbo.Product Sales for 1997
View: dbo.Products Above Average Price| View name: | dbo.Products Above Average Price |
| Description: | (Subquery) Returns products that have a unit price higher than the average. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Products | ProductName | nvarchar (40) | ||
dbo.Products | UnitPrice | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Products by Category| View name: | dbo.Products by Category |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Categories | CategoryName | nvarchar (15) | ||
dbo.Products | ProductName | nvarchar (40) | ||
dbo.Products | QuantityPerUnit | nvarchar (20) | Yes | |
dbo.Products | UnitsInStock | smallint | Yes | |
dbo.Products | Discontinued | bit |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Quarterly Orders| View name: | dbo.Quarterly Orders |
| Description: | Record source for Quarterly Orders form. Lists only customers who had orders in 1995. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Orders | CustomerID | nchar (5) | Yes | |
dbo.Customers | CompanyName | nvarchar (40) | Yes | |
dbo.Customers | City | nvarchar (15) | Yes | |
dbo.Customers | Country | nvarchar (15) | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Sales by Category| View name: | dbo.Sales by Category |
| Description: | Record source for Sales by Category report. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Products | CategoryID | int | ||
dbo.Categories | CategoryName | nvarchar (15) | ||
dbo.Products | ProductName | nvarchar (40) | ||
![]() | ProductSales | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
dbo.Categories
dbo.Products
dbo.Orders
dbo.Order Details Extended
View: dbo.Sales Totals by Amount| View name: | dbo.Sales Totals by Amount |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
![]() | SaleAmount | money | Yes | |
dbo.Orders | OrderID | int | ||
dbo.Customers | CompanyName | nvarchar (40) | ||
dbo.Orders | ShippedDate | datetime | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
dbo.Customers
dbo.Orders
dbo.Order Subtotals
View: dbo.Summary of Sales by Quarter| View name: | dbo.Summary of Sales by Quarter |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Orders | ShippedDate | datetime | Yes | |
dbo.Orders | OrderID | int | ||
dbo.Order Subtotals | Subtotal | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
View: dbo.Summary of Sales by Year| View name: | dbo.Summary of Sales by Year |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Fields
| Source | Field name | Data type | Nullable | Field description |
dbo.Orders | ShippedDate | datetime | Yes | |
dbo.Orders | OrderID | int | ||
dbo.Order Subtotals | Subtotal | money | Yes |
| View definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() | ![]() | ![]() | ![]() |
Related objects
Stored procedures
Stored procedure: dbo.CustOrderHist| Stored procedure name: | dbo.CustOrderHist |
| Description: | This description has been extracted from the procedure definition |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @CustomerID | nchar (5) | This is stored procedure parameter description |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
dbo.Order Details
dbo.Customers
dbo.Products
dbo.Orders
Stored procedure: dbo.CustOrdersDetail| Stored procedure name: | dbo.CustOrdersDetail |
| Description: | Record source for several forms and reports. Uses CCur function to compute the ExtendedPrice for each item ordered. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @OrderID | int |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
Stored procedure: dbo.CustOrdersOrders| Stored procedure name: | dbo.CustOrdersOrders |
| Description: | |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @CustomerID | nchar (5) |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
Stored procedure: dbo.Employee Sales by Country| Stored procedure name: | dbo.Employee Sales by Country |
| Description: | Record source for Employee Sales by Country report. Prompts for beginning and ending dates. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @Beginning_Date | datetime | |
| IN | @Ending_Date | datetime |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
dbo.Employees
dbo.Orders
dbo.Order Subtotals
Stored procedure: dbo.Sales by Year| Stored procedure name: | dbo.Sales by Year |
| Description: | Record source for Sales by Year report and its subreport. Refers to controls on Sales by Year Dialog for parameter values. Uses Format function to return the year value of a shipped date. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @Beginning_Date | datetime | |
| IN | @Ending_Date | datetime |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
Stored procedure: dbo.SalesByCategory| Stored procedure name: | dbo.SalesByCategory |
| Description: | Record source for Sales by Category report. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
Parameters
| Direction | Parameter name | Data type | Description |
| IN | @CategoryName | nvarchar (15) | |
| IN | @OrdYear | nvarchar (4) |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
dbo.Order Details
dbo.Categories
dbo.Products
dbo.Orders
Stored procedure: dbo.Ten Most Expensive Products| Stored procedure name: | dbo.Ten Most Expensive Products |
| Description: | Returns 10 most expensive products. Specifies the number of highest values to return using the Top Values box on the toolbar. |
| Creation date: | 06 Ago 2000 |
| Last altered date: | 06 Ago 2000 |
| Stored procedure definition | |
|
Object permissions
| User / Role | SELECT | INSERT | UPDATE | DELETE | EXECUTE | DRI | |
![]() | public | ![]() |
Related objects
User-defined types
| UDT name | Base type | Nullable | Description |
TestType | varchar (20) | not null |
Users
| User name | Login name | Creation date | User roles | User description |
dbo | sa | 06 Ago 2000 | db_owner | |
guest | 06 Ago 2000 |
Roles
| Role name | Is appplication role | Users in this role | Role description |
db_accessadmin | |||
db_backupoperator | |||
db_datareader | |||
db_datawriter | |||
db_ddladmin | |||
db_denydatareader | |||
db_denydatawriter | |||
db_owner | dbo | ||
db_securityadmin | |||
public |