Northwind project

Database Design
Northwind

02.19.2007
Index
Database: Northwind
_
3
Tables
_
3
Categories
_
3
CustomerCustomerDemo
_
3
CustomerDemographics
_
3
Customers
_
3
Employees
_
3
EmployeeTerritories
_
3
Order Details
_
3
Orders
_
3
Products
_
3
Region
_
3
Shippers
_
3
Suppliers
_
3
Territories
_
3
Views
_
3
Alphabetical list of products
_
3
Category Sales for 1997
_
3
Current Product List
_
3
Customer and Suppliers by City
_
3
Invoices
_
3
Order Details Extended
_
3
Order Subtotals
_
3
Orders Qry
_
3
Product Sales for 1997
_
3
Products Above Average Price
_
3
Products by Category
_
3
Quarterly Orders
_
3
Sales by Category
_
3
Sales Totals by Amount
_
3
Summary of Sales by Quarter
_
3
Summary of Sales by Year
_
3
Stored Procedures
_
3
CustOrderHist
_
3
CustOrdersDetail
_
3
CustOrdersOrders
_
3
Employee Sales by Country
_
3
Sales by Year
_
3
SalesByCategory
_
3
Ten Most Expensive Products
_
3
Users
_
3
dbo
_
3
guest
_
3
Roles
_
3
public
_
3
db_owner
_
3
Server Info
_
3
Logins
_
3
sa
_
3
BUILTIN\Administrators
_
3
About
_
3
Database: Northwind
Properties
Northwind |
sa |
08.06.2000 |
80 |
Database is available for query |
|
D:\Program Files\Microsoft SQL Server\MSSQL\data\northwnd.mdf |
539 |
4.25 MB |
2504 KB |
976 KB |
1256 KB |
272 KB |
|
Data Files
Northwind |
D:\Program Files\Microsoft SQL Server\MSSQL\data\northwnd.mdf |
PRIMARY |
3 |
|
10 % |
Unrestricted |
Total: 1 data file(s)
Log Files
Northwind_log |
D:\Program Files\Microsoft SQL Server\MSSQL\data\northwnd.ldf |
1 |
|
10 % |
Unrestricted |
Total: 1 log file(s)
Tables
Total: 13 table(s)
Views
Total: 16 view(s)
Stored procedures
Total: 7 stored procedure(s)
Database Options
Server overview
Tables
Table: Categories
Properties
dbo |
08.06.2000 |
2041058307 |
PRIMARY |
8 |
112 |
32 |
|
Columns
|
|
|
CategoryID |
int |
4 |
|
|
|
|
|
|
|
CategoryName |
nvarchar |
30 |
|
|
|
|
|
|
|
Description |
ntext |
16 |
|
|
|
|
|
|
|
Picture |
image |
16 |
|
|
|
|
Total: 4 column(s)
Indexes
Total: 2 indexes(s)
Identity column
|
CategoryID |
1 |
1 |
|
Referencing Tables
Objects that depend on [dbo].[Categories]
Total: 21 objects
SQL
CREATE TABLE [Categories] (
[CategoryID] [int] IDENTITY (1, 1) NOT NULL ,
[CategoryName] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[Description] [ntext] COLLATE Cyrillic_General_CI_AS NULL ,
[Picture] [image] NULL ,
CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED
(
[CategoryID]
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Categories on table dbo.Categories
Properties
Index Columns
|
CategoryID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Categories] ON [dbo].[Categories]([CategoryID]) ON [PRIMARY]
GO
List of indexes
Index: CategoryName on table dbo.Categories
Properties
Index Columns
|
CategoryName |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
25 |
0 |
8 |
8 |
8 |
SQL
CREATE INDEX [CategoryName] ON [dbo].[Categories]([CategoryName]) ON [PRIMARY]
GO
List of indexes
Table: CustomerCustomerDemo
Properties
dbo |
08.06.2000 |
853578079 |
PRIMARY |
0 |
0 |
0 |
|
Columns
|
|
|
CustomerID |
nchar |
10 |
|
|
|
|
|
|
|
CustomerTypeID |
nchar |
20 |
|
|
|
|
Total: 2 column(s)
Indexes
Total: 1 indexes(s)
Referenced Tables
Objects that [dbo].[CustomerCustomerDemo] depends on
Total: 2 objects
SQL
CREATE TABLE [CustomerCustomerDemo] (
[CustomerID] [nchar] (5) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[CustomerTypeID] [nchar] (10) COLLATE Cyrillic_General_CI_AS NOT NULL ,
CONSTRAINT [PK_CustomerCustomerDemo] PRIMARY KEY NONCLUSTERED
(
[CustomerID],
[CustomerTypeID]
) ON [PRIMARY] ,
CONSTRAINT [FK_CustomerCustomerDemo] FOREIGN KEY
(
[CustomerTypeID]
) REFERENCES [CustomerDemographics] (
[CustomerTypeID]
),
CONSTRAINT [FK_CustomerCustomerDemo_Customers] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customers] (
[CustomerID]
)
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_CustomerCustomerDemo on table dbo.CustomerCustomerDemo
Properties
Index Columns
|
CustomerID |
0 |
|
CustomerTypeID |
0 |
Total: 2 column(s)
Statistics
SQL
CREATE UNIQUE INDEX [PK_CustomerCustomerDemo] ON [dbo].[CustomerCustomerDemo]([CustomerID], [CustomerTypeID]) ON [PRIMARY]
GO
List of indexes
Relationships
Relationship: [FK_CustomerCustomerDemo] on [CustomerCustomerDemo]
Properties
dbo |
CustomerDemographics |
PK_CustomerDemographics |
|
|
Relationship Columns
|
CustomerTypeID |
CustomerTypeID |
nchar |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[CustomerCustomerDemo] ADD CONSTRAINT [FK_CustomerCustomerDemo] FOREIGN KEY
(
[CustomerTypeID]
) REFERENCES [CustomerDemographics] (
[CustomerTypeID]
)
GO
Table [CustomerDemographics]
Table [CustomerCustomerDemo]
Relationship: [FK_CustomerCustomerDemo_Customers] on [CustomerCustomerDemo]
Properties
dbo |
Customers |
PK_Customers |
|
|
Relationship Columns
|
CustomerID |
CustomerID |
nchar |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[CustomerCustomerDemo] ADD CONSTRAINT [FK_CustomerCustomerDemo_Customers] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customers] (
[CustomerID]
)
GO
Table [Customers]
Table [CustomerCustomerDemo]
Table: CustomerDemographics
Properties
dbo |
08.06.2000 |
869578136 |
PRIMARY |
0 |
0 |
0 |
|
Columns
|
|
|
CustomerTypeID |
nchar |
20 |
|
|
|
|
|
|
|
CustomerDesc |
ntext |
16 |
|
|
|
|
Total: 2 column(s)
Indexes
Total: 1 indexes(s)
Referencing Tables
Objects that depend on [dbo].[CustomerDemographics]
Total: 1 objects
SQL
CREATE TABLE [CustomerDemographics] (
[CustomerTypeID] [nchar] (10) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[CustomerDesc] [ntext] COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_CustomerDemographics] PRIMARY KEY NONCLUSTERED
(
[CustomerTypeID]
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_CustomerDemographics on table dbo.CustomerDemographics
Properties
Index Columns
|
CustomerTypeID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE INDEX [PK_CustomerDemographics] ON [dbo].[CustomerDemographics]([CustomerTypeID]) ON [PRIMARY]
GO
List of indexes
Table: Customers
Properties
dbo |
08.06.2000 |
2073058421 |
PRIMARY |
91 |
24 |
80 |
|
Columns
|
|
|
CustomerID |
nchar |
10 |
|
|
|
|
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
|
|
|
|
ContactName |
nvarchar |
60 |
|
|
|
|
|
|
|
ContactTitle |
nvarchar |
60 |
|
|
|
|
|
|
|
Address |
nvarchar |
120 |
|
|
|
|
|
|
|
City |
nvarchar |
30 |
|
|
|
|
|
|
|
Region |
nvarchar |
30 |
|
|
|
|
|
|
|
PostalCode |
nvarchar |
20 |
|
|
|
|
|
|
|
Country |
nvarchar |
30 |
|
|
|
|
|
|
|
Phone |
nvarchar |
48 |
|
|
|
|
|
|
|
Fax |
nvarchar |
48 |
|
|
|
|
Total: 11 column(s)
Indexes
Total: 5 indexes(s)
Referencing Tables
Objects that depend on [dbo].[Customers]
Total: 21 objects
SQL
CREATE TABLE [Customers] (
[CustomerID] [nchar] (5) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[CompanyName] [nvarchar] (40) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[ContactName] [nvarchar] (30) COLLATE Cyrillic_General_CI_AS NULL ,
[ContactTitle] [nvarchar] (30) COLLATE Cyrillic_General_CI_AS NULL ,
[Address] [nvarchar] (60) COLLATE Cyrillic_General_CI_AS NULL ,
[City] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[Region] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[PostalCode] [nvarchar] (10) COLLATE Cyrillic_General_CI_AS NULL ,
[Country] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[Phone] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
[Fax] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED
(
[CustomerID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Customers on table dbo.Customers
Properties
Index Columns
|
CustomerID |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
10 |
1,098901E-02 |
91 |
91 |
91 |
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Customers] ON [dbo].[Customers]([CustomerID]) ON [PRIMARY]
GO
List of indexes
Index: City on table dbo.Customers
Properties
Index Columns
|
City |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
26,02198 |
0 |
91 |
91 |
69 |
SQL
CREATE INDEX [City] ON [dbo].[Customers]([City]) ON [PRIMARY]
GO
List of indexes
Index: CompanyName on table dbo.Customers
Properties
Index Columns
|
CompanyName |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
47,8022 |
0 |
91 |
91 |
91 |
SQL
CREATE INDEX [CompanyName] ON [dbo].[Customers]([CompanyName]) ON [PRIMARY]
GO
List of indexes
Index: PostalCode on table dbo.Customers
Properties
Index Columns
|
PostalCode |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
21,01099 |
0 |
91 |
91 |
86 |
SQL
CREATE INDEX [PostalCode] ON [dbo].[Customers]([PostalCode]) ON [PRIMARY]
GO
List of indexes
Index: Region on table dbo.Customers
Properties
Index Columns
|
Region |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
12,21978 |
0 |
91 |
91 |
18 |
SQL
CREATE INDEX [Region] ON [dbo].[Customers]([Region]) ON [PRIMARY]
GO
List of indexes
Table: Employees
Properties
dbo |
08.06.2000 |
1977058079 |
PRIMARY |
9 |
232 |
48 |
|
Columns
|
|
|
EmployeeID |
int |
4 |
|
|
|
|
|
|
|
LastName |
nvarchar |
40 |
|
|
|
|
|
|
|
FirstName |
nvarchar |
20 |
|
|
|
|
|
|
|
Title |
nvarchar |
60 |
|
|
|
|
|
|
|
TitleOfCourtesy |
nvarchar |
50 |
|
|
|
|
|
|
|
BirthDate |
datetime |
8 |
|
([BirthDate] < getdate()) |
|
|
|
|
|
HireDate |
datetime |
8 |
|
|
|
|
|
|
|
Address |
nvarchar |
120 |
|
|
|
|
|
|
|
City |
nvarchar |
30 |
|
|
|
|
|
|
|
Region |
nvarchar |
30 |
|
|
|
|
|
|
|
PostalCode |
nvarchar |
20 |
|
|
|
|
|
|
|
Country |
nvarchar |
30 |
|
|
|
|
|
|
|
HomePhone |
nvarchar |
48 |
|
|
|
|
|
|
|
Extension |
nvarchar |
8 |
|
|
|
|
|
|
|
Photo |
image |
16 |
|
|
|
|
|
|
|
Notes |
ntext |
16 |
|
|
|
|
|
|
|
ReportsTo |
int |
4 |
|
|
|
|
|
|
|
PhotoPath |
nvarchar |
510 |
|
|
|
|
Total: 18 column(s)
Indexes
Total: 3 indexes(s)
Check Constraints
|
CK_Birthdate |
([BirthDate] < getdate()) |
Total: 1 constraints
Identity column
|
EmployeeID |
1 |
1 |
|
Referencing Tables
Referenced Tables
Objects that depend on [dbo].[Employees]
Total: 20 objects
SQL
CREATE TABLE [Employees] (
[EmployeeID] [int] IDENTITY (1, 1) NOT NULL ,
[LastName] [nvarchar] (20) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[FirstName] [nvarchar] (10) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[Title] [nvarchar] (30) COLLATE Cyrillic_General_CI_AS NULL ,
[TitleOfCourtesy] [nvarchar] (25) COLLATE Cyrillic_General_CI_AS NULL ,
[BirthDate] [datetime] NULL ,
[HireDate] [datetime] NULL ,
[Address] [nvarchar] (60) COLLATE Cyrillic_General_CI_AS NULL ,
[City] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[Region] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[PostalCode] [nvarchar] (10) COLLATE Cyrillic_General_CI_AS NULL ,
[Country] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[HomePhone] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
[Extension] [nvarchar] (4) COLLATE Cyrillic_General_CI_AS NULL ,
[Photo] [image] NULL ,
[Notes] [ntext] COLLATE Cyrillic_General_CI_AS NULL ,
[ReportsTo] [int] NULL ,
[PhotoPath] [nvarchar] (255) COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
(
[EmployeeID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Employees_Employees] FOREIGN KEY
(
[ReportsTo]
) REFERENCES [Employees] (
[EmployeeID]
),
CONSTRAINT [CK_Birthdate] CHECK ([BirthDate] < getdate())
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Employees on table dbo.Employees
Properties
Index Columns
|
EmployeeID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Employees] ON [dbo].[Employees]([EmployeeID]) ON [PRIMARY]
GO
List of indexes
Index: LastName on table dbo.Employees
Properties
Index Columns
|
LastName |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
18,22222 |
0 |
9 |
9 |
9 |
SQL
CREATE INDEX [LastName] ON [dbo].[Employees]([LastName]) ON [PRIMARY]
GO
List of indexes
Index: PostalCode on table dbo.Employees
Properties
Index Columns
|
PostalCode |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
15,77778 |
0 |
9 |
9 |
9 |
SQL
CREATE INDEX [PostalCode] ON [dbo].[Employees]([PostalCode]) ON [PRIMARY]
GO
List of indexes
Relationships
Relationship: [FK_Employees_Employees] on [Employees]
Properties
dbo |
Employees |
PK_Employees |
|
|
Relationship Columns
|
ReportsTo |
EmployeeID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [FK_Employees_Employees] FOREIGN KEY
(
[ReportsTo]
) REFERENCES [Employees] (
[EmployeeID]
)
GO
Table [Employees]
Table [Employees]
Table: EmployeeTerritories
Properties
dbo |
08.06.2000 |
917578307 |
PRIMARY |
49 |
8 |
24 |
|
Columns
|
|
|
EmployeeID |
int |
4 |
|
|
|
|
|
|
|
TerritoryID |
nvarchar |
40 |
|
|
|
|
Total: 2 column(s)
Indexes
Total: 2 indexes(s)
Referenced Tables
Objects that [dbo].[EmployeeTerritories] depends on
Total: 3 objects
SQL
CREATE TABLE [EmployeeTerritories] (
[EmployeeID] [int] NOT NULL ,
[TerritoryID] [nvarchar] (20) COLLATE Cyrillic_General_CI_AS NOT NULL ,
CONSTRAINT [PK_EmployeeTerritories] PRIMARY KEY NONCLUSTERED
(
[EmployeeID],
[TerritoryID]
) ON [PRIMARY] ,
CONSTRAINT [FK_EmployeeTerritories_Employees] FOREIGN KEY
(
[EmployeeID]
) REFERENCES [Employees] (
[EmployeeID]
),
CONSTRAINT [FK_EmployeeTerritories_Territories] FOREIGN KEY
(
[TerritoryID]
) REFERENCES [Territories] (
[TerritoryID]
)
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_EmployeeTerritories on table dbo.EmployeeTerritories
Properties
Index Columns
|
EmployeeID |
0 |
|
TerritoryID |
0 |
Total: 2 column(s)
Statistics
Oct 21 2006 5:45PM |
14 |
0 |
49 |
49 |
9 |
SQL
CREATE UNIQUE INDEX [PK_EmployeeTerritories] ON [dbo].[EmployeeTerritories]([EmployeeID], [TerritoryID]) ON [PRIMARY]
GO
List of indexes
Index: _WA_Sys_TerritoryID_36B12243 on table dbo.EmployeeTerritories
Properties
Index Columns
|
TerritoryID |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
10 |
0 |
49 |
49 |
49 |
SQL
List of indexes
Relationships
Relationship: [FK_EmployeeTerritories_Employees] on [EmployeeTerritories]
Properties
dbo |
Employees |
PK_Employees |
|
|
Relationship Columns
|
EmployeeID |
EmployeeID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[EmployeeTerritories] ADD CONSTRAINT [FK_EmployeeTerritories_Employees] FOREIGN KEY
(
[EmployeeID]
) REFERENCES [Employees] (
[EmployeeID]
)
GO
Table [Employees]
Table [EmployeeTerritories]
Relationship: [FK_EmployeeTerritories_Territories] on [EmployeeTerritories]
Properties
dbo |
Territories |
PK_Territories |
|
|
Relationship Columns
|
TerritoryID |
TerritoryID |
nvarchar |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[EmployeeTerritories] ADD CONSTRAINT [FK_EmployeeTerritories_Territories] FOREIGN KEY
(
[TerritoryID]
) REFERENCES [Territories] (
[TerritoryID]
)
GO
Table [Territories]
Table [EmployeeTerritories]
Table: Order Details
Properties
dbo |
08.06.2000 |
325576198 |
PRIMARY |
2155 |
72 |
208 |
|
Columns
|
|
|
OrderID |
int |
4 |
|
|
|
|
|
|
|
ProductID |
int |
4 |
|
|
|
|
|
|
|
UnitPrice |
money |
8 |
|
([UnitPrice] >= 0) |
|
|
|
|
|
Quantity |
smallint |
2 |
|
([Quantity] > 0) |
|
|
|
|
|
Discount |
real |
4 |
|
([Discount] >= 0 and [Discount] <= 1) |
|
|
Total: 5 column(s)
Indexes
Total: 5 indexes(s)
Check Constraints
|
CK_Discount |
([Discount] >= 0 and [Discount] <= 1) |
|
CK_Quantity |
([Quantity] > 0) |
|
CK_UnitPrice |
([UnitPrice] >= 0) |
Total: 3 constraints
Referenced Tables
Objects that [dbo].[Order Details] depends on
Total: 7 objects
Objects that depend on [dbo].[Order Details]
Total: 14 objects
SQL
CREATE TABLE [Order Details] (
[OrderID] [int] NOT NULL ,
[ProductID] [int] NOT NULL ,
[UnitPrice] [money] NOT NULL CONSTRAINT [DF_Order_Details_UnitPrice] DEFAULT (0),
[Quantity] [smallint] NOT NULL CONSTRAINT [DF_Order_Details_Quantity] DEFAULT (1),
[Discount] [real] NOT NULL CONSTRAINT [DF_Order_Details_Discount] DEFAULT (0),
CONSTRAINT [PK_Order_Details] PRIMARY KEY CLUSTERED
(
[OrderID],
[ProductID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Order_Details_Orders] FOREIGN KEY
(
[OrderID]
) REFERENCES [Orders] (
[OrderID]
),
CONSTRAINT [FK_Order_Details_Products] FOREIGN KEY
(
[ProductID]
) REFERENCES [Products] (
[ProductID]
),
CONSTRAINT [CK_Discount] CHECK ([Discount] >= 0 and [Discount] <= 1),
CONSTRAINT [CK_Quantity] CHECK ([Quantity] > 0),
CONSTRAINT [CK_UnitPrice] CHECK ([UnitPrice] >= 0)
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Order_Details on table dbo.Order Details
Properties
Index Columns
|
OrderID |
0 |
|
ProductID |
0 |
Total: 2 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Order_Details] ON [dbo].[Order Details]([OrderID], [ProductID]) ON [PRIMARY]
GO
List of indexes
Index: OrderID on table dbo.Order Details
Properties
Index Columns
|
OrderID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [OrderID] ON [dbo].[Order Details]([OrderID]) ON [PRIMARY]
GO
List of indexes
Index: OrdersOrder_Details on table dbo.Order Details
Properties
Index Columns
|
OrderID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [OrdersOrder_Details] ON [dbo].[Order Details]([OrderID]) ON [PRIMARY]
GO
List of indexes
Index: ProductID on table dbo.Order Details
Properties
Index Columns
|
ProductID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [ProductID] ON [dbo].[Order Details]([ProductID]) ON [PRIMARY]
GO
List of indexes
Index: ProductsOrder_Details on table dbo.Order Details
Properties
Index Columns
|
ProductID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [ProductsOrder_Details] ON [dbo].[Order Details]([ProductID]) ON [PRIMARY]
GO
List of indexes
Relationships
Relationship: [FK_Order_Details_Orders] on [Order Details]
Properties
dbo |
Orders |
PK_Orders |
|
|
Relationship Columns
|
OrderID |
OrderID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Order Details] ADD CONSTRAINT [FK_Order_Details_Orders] FOREIGN KEY
(
[OrderID]
) REFERENCES [Orders] (
[OrderID]
)
GO
Table [Orders]
Table [Order Details]
Relationship: [FK_Order_Details_Products] on [Order Details]
Properties
dbo |
Products |
PK_Products |
|
|
Relationship Columns
|
ProductID |
ProductID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Order Details] ADD CONSTRAINT [FK_Order_Details_Products] FOREIGN KEY
(
[ProductID]
) REFERENCES [Products] (
[ProductID]
)
GO
Table [Products]
Table [Order Details]
Table: Orders
Properties
dbo |
08.06.2000 |
21575115 |
PRIMARY |
830 |
160 |
312 |
|
Columns
|
|
|
OrderID |
int |
4 |
|
|
|
|
|
|
|
CustomerID |
nchar |
10 |
|
|
|
|
|
|
|
EmployeeID |
int |
4 |
|
|
|
|
|
|
|
OrderDate |
datetime |
8 |
|
|
|
|
|
|
|
RequiredDate |
datetime |
8 |
|
|
|
|
|
|
|
ShippedDate |
datetime |
8 |
|
|
|
|
|
|
|
ShipVia |
int |
4 |
|
|
|
|
|
|
|
Freight |
money |
8 |
|
|
|
|
|
|
|
ShipName |
nvarchar |
80 |
|
|
|
|
|
|
|
ShipAddress |
nvarchar |
120 |
|
|
|
|
|
|
|
ShipCity |
nvarchar |
30 |
|
|
|
|
|
|
|
ShipRegion |
nvarchar |
30 |
|
|
|
|
|
|
|
ShipPostalCode |
nvarchar |
20 |
|
|
|
|
|
|
|
ShipCountry |
nvarchar |
30 |
|
|
|
|
Total: 14 column(s)
Indexes
Total: 9 indexes(s)
Identity column
|
OrderID |
1 |
1 |
|
Referencing Tables
Referenced Tables
Objects that [dbo].[Orders] depends on
Total: 3 objects
Objects that depend on [dbo].[Orders]
Total: 18 objects
SQL
CREATE TABLE [Orders] (
[OrderID] [int] IDENTITY (1, 1) NOT NULL ,
[CustomerID] [nchar] (5) COLLATE Cyrillic_General_CI_AS NULL ,
[EmployeeID] [int] NULL ,
[OrderDate] [datetime] NULL ,
[RequiredDate] [datetime] NULL ,
[ShippedDate] [datetime] NULL ,
[ShipVia] [int] NULL ,
[Freight] [money] NULL CONSTRAINT [DF_Orders_Freight] DEFAULT (0),
[ShipName] [nvarchar] (40) COLLATE Cyrillic_General_CI_AS NULL ,
[ShipAddress] [nvarchar] (60) COLLATE Cyrillic_General_CI_AS NULL ,
[ShipCity] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[ShipRegion] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[ShipPostalCode] [nvarchar] (10) COLLATE Cyrillic_General_CI_AS NULL ,
[ShipCountry] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_Orders] PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Orders_Customers] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customers] (
[CustomerID]
),
CONSTRAINT [FK_Orders_Employees] FOREIGN KEY
(
[EmployeeID]
) REFERENCES [Employees] (
[EmployeeID]
),
CONSTRAINT [FK_Orders_Shippers] FOREIGN KEY
(
[ShipVia]
) REFERENCES [Shippers] (
[ShipperID]
)
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Orders on table dbo.Orders
Properties
Index Columns
|
OrderID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Orders] ON [dbo].[Orders]([OrderID]) ON [PRIMARY]
GO
List of indexes
Index: CustomerID on table dbo.Orders
Properties
Index Columns
|
CustomerID |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
14 |
0 |
830 |
830 |
89 |
SQL
CREATE INDEX [CustomerID] ON [dbo].[Orders]([CustomerID]) ON [PRIMARY]
GO
List of indexes
Index: CustomersOrders on table dbo.Orders
Properties
Index Columns
|
CustomerID |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
14 |
0 |
830 |
830 |
89 |
SQL
CREATE INDEX [CustomersOrders] ON [dbo].[Orders]([CustomerID]) ON [PRIMARY]
GO
List of indexes
Index: EmployeeID on table dbo.Orders
Properties
Index Columns
|
EmployeeID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [EmployeeID] ON [dbo].[Orders]([EmployeeID]) ON [PRIMARY]
GO
List of indexes
Index: EmployeesOrders on table dbo.Orders
Properties
Index Columns
|
EmployeeID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [EmployeesOrders] ON [dbo].[Orders]([EmployeeID]) ON [PRIMARY]
GO
List of indexes
Index: OrderDate on table dbo.Orders
Properties
Index Columns
|
OrderDate |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [OrderDate] ON [dbo].[Orders]([OrderDate]) ON [PRIMARY]
GO
List of indexes
Index: ShippedDate on table dbo.Orders
Properties
Index Columns
|
ShippedDate |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [ShippedDate] ON [dbo].[Orders]([ShippedDate]) ON [PRIMARY]
GO
List of indexes
Index: ShippersOrders on table dbo.Orders
Properties
Index Columns
|
ShipVia |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [ShippersOrders] ON [dbo].[Orders]([ShipVia]) ON [PRIMARY]
GO
List of indexes
Index: ShipPostalCode on table dbo.Orders
Properties
Index Columns
|
ShipPostalCode |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
14,97108 |
0 |
830 |
830 |
84 |
SQL
CREATE INDEX [ShipPostalCode] ON [dbo].[Orders]([ShipPostalCode]) ON [PRIMARY]
GO
List of indexes
Relationships
Relationship: [FK_Orders_Customers] on [Orders]
Properties
dbo |
Customers |
PK_Customers |
|
|
Relationship Columns
|
CustomerID |
CustomerID |
nchar |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Customers] FOREIGN KEY
(
[CustomerID]
) REFERENCES [Customers] (
[CustomerID]
)
GO
Table [Customers]
Table [Orders]
Relationship: [FK_Orders_Employees] on [Orders]
Properties
dbo |
Employees |
PK_Employees |
|
|
Relationship Columns
|
EmployeeID |
EmployeeID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Employees] FOREIGN KEY
(
[EmployeeID]
) REFERENCES [Employees] (
[EmployeeID]
)
GO
Table [Employees]
Table [Orders]
Relationship: [FK_Orders_Shippers] on [Orders]
Properties
dbo |
Shippers |
PK_Shippers |
|
|
Relationship Columns
|
ShipVia |
ShipperID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Shippers] FOREIGN KEY
(
[ShipVia]
) REFERENCES [Shippers] (
[ShipperID]
)
GO
Table [Shippers]
Table [Orders]
Table: Products
Properties
dbo |
08.06.2000 |
117575457 |
PRIMARY |
77 |
8 |
96 |
|
Columns
|
|
|
ProductID |
int |
4 |
|
|
|
|
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
|
|
|
|
SupplierID |
int |
4 |
|
|
|
|
|
|
|
CategoryID |
int |
4 |
|
|
|
|
|
|
|
QuantityPerUnit |
nvarchar |
40 |
|
|
|
|
|
|
|
UnitPrice |
money |
8 |
|
([UnitPrice] >= 0) |
|
|
|
|
|
UnitsInStock |
smallint |
2 |
|
([UnitsInStock] >= 0) |
|
|
|
|
|
UnitsOnOrder |
smallint |
2 |
|
([UnitsOnOrder] >= 0) |
|
|
|
|
|
ReorderLevel |
smallint |
2 |
|
([ReorderLevel] >= 0) |
|
|
|
|
|
Discontinued |
bit |
1 |
|
|
|
|
Total: 10 column(s)
Indexes
Total: 6 indexes(s)
Check Constraints
|
CK_Products_UnitPrice |
([UnitPrice] >= 0) |
|
CK_ReorderLevel |
([ReorderLevel] >= 0) |
|
CK_UnitsInStock |
([UnitsInStock] >= 0) |
|
CK_UnitsOnOrder |
([UnitsOnOrder] >= 0) |
Total: 4 constraints
Identity column
|
ProductID |
1 |
1 |
|
Referencing Tables
Referenced Tables
Objects that [dbo].[Products] depends on
Total: 2 objects
Objects that depend on [dbo].[Products]
Total: 20 objects
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
List of tables
Indexes
Index: PK_Products on table dbo.Products
Properties
Index Columns
|
ProductID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Products] ON [dbo].[Products]([ProductID]) ON [PRIMARY]
GO
List of indexes
Index: CategoriesProducts on table dbo.Products
Properties
Index Columns
|
CategoryID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [CategoriesProducts] ON [dbo].[Products]([CategoryID]) ON [PRIMARY]
GO
List of indexes
Index: CategoryID on table dbo.Products
Properties
Index Columns
|
CategoryID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [CategoryID] ON [dbo].[Products]([CategoryID]) ON [PRIMARY]
GO
List of indexes
Index: ProductName on table dbo.Products
Properties
Index Columns
|
ProductName |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
36,75325 |
0 |
77 |
77 |
77 |
SQL
CREATE INDEX [ProductName] ON [dbo].[Products]([ProductName]) ON [PRIMARY]
GO
List of indexes
Index: SupplierID on table dbo.Products
Properties
Index Columns
|
SupplierID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [SupplierID] ON [dbo].[Products]([SupplierID]) ON [PRIMARY]
GO
List of indexes
Index: SuppliersProducts on table dbo.Products
Properties
Index Columns
|
SupplierID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE INDEX [SuppliersProducts] ON [dbo].[Products]([SupplierID]) ON [PRIMARY]
GO
List of indexes
Relationships
Relationship: [FK_Products_Categories] on [Products]
Properties
dbo |
Categories |
PK_Categories |
|
|
Relationship Columns
|
CategoryID |
CategoryID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Products] ADD CONSTRAINT [FK_Products_Categories] FOREIGN KEY
(
[CategoryID]
) REFERENCES [Categories] (
[CategoryID]
)
GO
Table [Categories]
Table [Products]
Relationship: [FK_Products_Suppliers] on [Products]
Properties
dbo |
Suppliers |
PK_Suppliers |
|
|
Relationship Columns
|
SupplierID |
SupplierID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Products] ADD CONSTRAINT [FK_Products_Suppliers] FOREIGN KEY
(
[SupplierID]
) REFERENCES [Suppliers] (
[SupplierID]
)
GO
Table [Suppliers]
Table [Products]
Table: Region
Properties
dbo |
08.06.2000 |
885578193 |
PRIMARY |
4 |
8 |
24 |
|
Columns
|
|
|
RegionID |
int |
4 |
|
|
|
|
|
|
|
RegionDescription |
nchar |
100 |
|
|
|
|
Total: 2 column(s)
Indexes
Total: 1 indexes(s)
Referencing Tables
Objects that depend on [dbo].[Region]
Total: 2 objects
SQL
CREATE TABLE [Region] (
[RegionID] [int] NOT NULL ,
[RegionDescription] [nchar] (50) COLLATE Cyrillic_General_CI_AS NOT NULL ,
CONSTRAINT [PK_Region] PRIMARY KEY NONCLUSTERED
(
[RegionID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Region on table dbo.Region
Properties
Index Columns
|
RegionID |
0 |
Total: 1 column(s)
Statistics
Aug 6 2000 1:34AM |
4 |
0,25 |
4 |
4 |
3 |
SQL
CREATE UNIQUE INDEX [PK_Region] ON [dbo].[Region]([RegionID]) ON [PRIMARY]
GO
List of indexes
Table: Shippers
Properties
dbo |
08.06.2000 |
2105058535 |
PRIMARY |
3 |
8 |
16 |
|
Columns
|
|
|
ShipperID |
int |
4 |
|
|
|
|
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
|
|
|
|
Phone |
nvarchar |
48 |
|
|
|
|
Total: 3 column(s)
Indexes
Total: 1 indexes(s)
Identity column
|
ShipperID |
1 |
1 |
|
Referencing Tables
Objects that depend on [dbo].[Shippers]
Total: 19 objects
SQL
CREATE TABLE [Shippers] (
[ShipperID] [int] IDENTITY (1, 1) NOT NULL ,
[CompanyName] [nvarchar] (40) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[Phone] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_Shippers] PRIMARY KEY CLUSTERED
(
[ShipperID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Shippers on table dbo.Shippers
Properties
Index Columns
|
ShipperID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Shippers] ON [dbo].[Shippers]([ShipperID]) ON [PRIMARY]
GO
List of indexes
Table: Suppliers
Properties
dbo |
08.06.2000 |
2137058649 |
PRIMARY |
29 |
24 |
48 |
|
Columns
|
|
|
SupplierID |
int |
4 |
|
|
|
|
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
|
|
|
|
ContactName |
nvarchar |
60 |
|
|
|
|
|
|
|
ContactTitle |
nvarchar |
60 |
|
|
|
|
|
|
|
Address |
nvarchar |
120 |
|
|
|
|
|
|
|
City |
nvarchar |
30 |
|
|
|
|
|
|
|
Region |
nvarchar |
30 |
|
|
|
|
|
|
|
PostalCode |
nvarchar |
20 |
|
|
|
|
|
|
|
Country |
nvarchar |
30 |
|
|
|
|
|
|
|
Phone |
nvarchar |
48 |
|
|
|
|
|
|
|
Fax |
nvarchar |
48 |
|
|
|
|
|
|
|
HomePage |
ntext |
16 |
|
|
|
|
Total: 12 column(s)
Indexes
Total: 3 indexes(s)
Identity column
|
SupplierID |
1 |
1 |
|
Referencing Tables
Objects that depend on [dbo].[Suppliers]
Total: 22 objects
SQL
CREATE TABLE [Suppliers] (
[SupplierID] [int] IDENTITY (1, 1) NOT NULL ,
[CompanyName] [nvarchar] (40) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[ContactName] [nvarchar] (30) COLLATE Cyrillic_General_CI_AS NULL ,
[ContactTitle] [nvarchar] (30) COLLATE Cyrillic_General_CI_AS NULL ,
[Address] [nvarchar] (60) COLLATE Cyrillic_General_CI_AS NULL ,
[City] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[Region] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[PostalCode] [nvarchar] (10) COLLATE Cyrillic_General_CI_AS NULL ,
[Country] [nvarchar] (15) COLLATE Cyrillic_General_CI_AS NULL ,
[Phone] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
[Fax] [nvarchar] (24) COLLATE Cyrillic_General_CI_AS NULL ,
[HomePage] [ntext] COLLATE Cyrillic_General_CI_AS NULL ,
CONSTRAINT [PK_Suppliers] PRIMARY KEY CLUSTERED
(
[SupplierID]
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Suppliers on table dbo.Suppliers
Properties
Index Columns
|
SupplierID |
0 |
Total: 1 column(s)
Statistics
SQL
CREATE UNIQUE CLUSTERED INDEX [PK_Suppliers] ON [dbo].[Suppliers]([SupplierID]) ON [PRIMARY]
GO
List of indexes
Index: CompanyName on table dbo.Suppliers
Properties
Index Columns
|
CompanyName |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
42,41379 |
0 |
29 |
29 |
29 |
SQL
CREATE INDEX [CompanyName] ON [dbo].[Suppliers]([CompanyName]) ON [PRIMARY]
GO
List of indexes
Index: PostalCode on table dbo.Suppliers
Properties
Index Columns
|
PostalCode |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
14,41379 |
0 |
29 |
29 |
29 |
SQL
CREATE INDEX [PostalCode] ON [dbo].[Suppliers]([PostalCode]) ON [PRIMARY]
GO
List of indexes
Table: Territories
Properties
dbo |
08.06.2000 |
901578250 |
PRIMARY |
53 |
8 |
24 |
|
Columns
|
|
|
TerritoryID |
nvarchar |
40 |
|
|
|
|
|
|
|
TerritoryDescription |
nchar |
100 |
|
|
|
|
|
|
|
RegionID |
int |
4 |
|
|
|
|
Total: 3 column(s)
Indexes
Total: 2 indexes(s)
Referencing Tables
Referenced Tables
Objects that [dbo].[Territories] depends on
Total: 1 objects
Objects that depend on [dbo].[Territories]
Total: 1 objects
SQL
CREATE TABLE [Territories] (
[TerritoryID] [nvarchar] (20) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[TerritoryDescription] [nchar] (50) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[RegionID] [int] NOT NULL ,
CONSTRAINT [PK_Territories] PRIMARY KEY NONCLUSTERED
(
[TerritoryID]
) ON [PRIMARY] ,
CONSTRAINT [FK_Territories_Region] FOREIGN KEY
(
[RegionID]
) REFERENCES [Region] (
[RegionID]
)
) ON [PRIMARY]
GO
List of tables
Indexes
Index: PK_Territories on table dbo.Territories
Properties
Index Columns
|
TerritoryID |
0 |
Total: 1 column(s)
Statistics
Oct 21 2006 5:45PM |
10 |
1,886792E-02 |
53 |
53 |
53 |
SQL
CREATE UNIQUE INDEX [PK_Territories] ON [dbo].[Territories]([TerritoryID]) ON [PRIMARY]
GO
List of indexes
Index: _WA_Sys_RegionID_35BCFE0A on table dbo.Territories
Properties
Index Columns
|
RegionID |
0 |
Total: 1 column(s)
Statistics
Aug 6 2000 1:34AM |
4 |
0 |
53 |
53 |
4 |
SQL
List of indexes
Relationships
Relationship: [FK_Territories_Region] on [Territories]
Properties
dbo |
Region |
PK_Region |
|
|
Relationship Columns
|
RegionID |
RegionID |
int |
Total: 1 trigger(s)
SQL
ALTER TABLE [dbo].[Territories] ADD CONSTRAINT [FK_Territories_Region] FOREIGN KEY
(
[RegionID]
) REFERENCES [Region] (
[RegionID]
)
GO
Table [Region]
Table [Territories]
Views
View: Alphabetical list of products
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ProductID |
int |
4 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
SupplierID |
int |
4 |
|
|
|
CategoryID |
int |
4 |
|
|
|
QuantityPerUnit |
nvarchar |
40 |
|
|
|
UnitPrice |
money |
8 |
|
|
|
UnitsInStock |
smallint |
2 |
|
|
|
UnitsOnOrder |
smallint |
2 |
|
|
|
ReorderLevel |
smallint |
2 |
|
|
|
Discontinued |
bit |
1 |
|
|
|
CategoryName |
nvarchar |
30 |
|
|
Total: 11 column(s)
Objects that [dbo].[Alphabetical list of products] depends on
Total: 3 objects
SQL
create view "Alphabetical list of products" AS
SELECT Products.*, Categories.CategoryName
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE (((Products.Discontinued)=0))
List of views
View: Category Sales for 1997
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
CategoryName |
nvarchar |
30 |
|
|
|
CategorySales |
money |
8 |
|
|
Total: 2 column(s)
Objects that [dbo].[Category Sales for 1997] depends on
Total: 9 objects
SQL
create view "Category Sales for 1997" AS
SELECT "Product Sales for 1997".CategoryName, Sum("Product Sales for 1997".ProductSales) AS CategorySales
FROM "Product Sales for 1997"
GROUP BY "Product Sales for 1997".CategoryName
List of views
View: Current Product List
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ProductID |
int |
4 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
Total: 2 column(s)
Objects that [dbo].[Current Product List] depends on
Total: 3 objects
SQL
create view "Current Product List" AS
SELECT Product_List.ProductID, Product_List.ProductName
FROM Products AS Product_List
WHERE (((Product_List.Discontinued)=0))
--ORDER BY Product_List.ProductName
List of views
View: Customer and Suppliers by City
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
City |
nvarchar |
30 |
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
ContactName |
nvarchar |
60 |
|
|
|
Relationship |
varchar |
9 |
|
|
Total: 4 column(s)
Objects that [dbo].[Customer and Suppliers by City] depends on
Total: 2 objects
SQL
create view "Customer and Suppliers by City" AS
SELECT City, CompanyName, ContactName, 'Customers' AS Relationship
FROM Customers
UNION SELECT City, CompanyName, ContactName, 'Suppliers'
FROM Suppliers
--ORDER BY City, CompanyName
List of views
View: Invoices
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ShipName |
nvarchar |
80 |
|
|
|
ShipAddress |
nvarchar |
120 |
|
|
|
ShipCity |
nvarchar |
30 |
|
|
|
ShipRegion |
nvarchar |
30 |
|
|
|
ShipPostalCode |
nvarchar |
20 |
|
|
|
ShipCountry |
nvarchar |
30 |
|
|
|
CustomerID |
nchar |
10 |
|
|
|
CustomerName |
nvarchar |
80 |
|
|
|
Address |
nvarchar |
120 |
|
|
|
City |
nvarchar |
30 |
|
|
|
Region |
nvarchar |
30 |
|
|
|
PostalCode |
nvarchar |
20 |
|
|
|
Country |
nvarchar |
30 |
|
|
|
Salesperson |
nvarchar |
62 |
|
|
|
OrderID |
int |
4 |
|
|
|
OrderDate |
datetime |
8 |
|
|
|
RequiredDate |
datetime |
8 |
|
|
|
ShippedDate |
datetime |
8 |
|
|
|
ShipperName |
nvarchar |
80 |
|
|
|
ProductID |
int |
4 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
UnitPrice |
money |
8 |
|
|
|
Quantity |
smallint |
2 |
|
|
|
Discount |
real |
4 |
|
|
|
ExtendedPrice |
money |
8 |
|
|
|
Freight |
money |
8 |
|
|
Total: 26 column(s)
Objects that [dbo].[Invoices] depends on
Total: 8 objects
SQL
create view Invoices AS
SELECT Orders.ShipName, Orders.ShipAddress, Orders.ShipCity, Orders.ShipRegion, Orders.ShipPostalCode,
Orders.ShipCountry, Orders.CustomerID, Customers.CompanyName AS CustomerName, Customers.Address, Customers.City,
Customers.Region, Customers.PostalCode, Customers.Country,
(FirstName + ' ' + LastName) AS Salesperson,
Orders.OrderID, Orders.OrderDate, Orders.RequiredDate, Orders.ShippedDate, Shippers.CompanyName As ShipperName,
"Order Details".ProductID, Products.ProductName, "Order Details".UnitPrice, "Order Details".Quantity,
"Order Details".Discount,
(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice, Orders.Freight
FROM Shippers INNER JOIN
(Products INNER JOIN
(
(Employees INNER JOIN
(Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID)
ON Employees.EmployeeID = Orders.EmployeeID)
INNER JOIN "Order Details" ON Orders.OrderID = "Order Details".OrderID)
ON Products.ProductID = "Order Details".ProductID)
ON Shippers.ShipperID = Orders.ShipVia
List of views
View: Order Details Extended
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
OrderID |
int |
4 |
|
|
|
ProductID |
int |
4 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
UnitPrice |
money |
8 |
|
|
|
Quantity |
smallint |
2 |
|
|
|
Discount |
real |
4 |
|
|
|
ExtendedPrice |
money |
8 |
|
|
Total: 7 column(s)
Objects that [dbo].[Order Details Extended] depends on
Total: 8 objects
Objects that depend on [dbo].[Order Details Extended]
Total: 1 objects
SQL
create view "Order Details Extended" AS
SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName,
"Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount,
(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
--ORDER BY "Order Details".OrderID
List of views
View: Order Subtotals
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
OrderID |
int |
4 |
|
|
|
Subtotal |
money |
8 |
|
|
Total: 2 column(s)
Objects that [dbo].[Order Subtotals] depends on
Total: 8 objects
Objects that depend on [dbo].[Order Subtotals]
Total: 5 objects
SQL
create view "Order Subtotals" AS
SELECT "Order Details".OrderID, Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS Subtotal
FROM "Order Details"
GROUP BY "Order Details".OrderID
List of views
View: Orders Qry
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
OrderID |
int |
4 |
|
|
|
CustomerID |
nchar |
10 |
|
|
|
EmployeeID |
int |
4 |
|
|
|
OrderDate |
datetime |
8 |
|
|
|
RequiredDate |
datetime |
8 |
|
|
|
ShippedDate |
datetime |
8 |
|
|
|
ShipVia |
int |
4 |
|
|
|
Freight |
money |
8 |
|
|
|
ShipName |
nvarchar |
80 |
|
|
|
ShipAddress |
nvarchar |
120 |
|
|
|
ShipCity |
nvarchar |
30 |
|
|
|
ShipRegion |
nvarchar |
30 |
|
|
|
ShipPostalCode |
nvarchar |
20 |
|
|
|
ShipCountry |
nvarchar |
30 |
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
Address |
nvarchar |
120 |
|
|
|
City |
nvarchar |
30 |
|
|
|
Region |
nvarchar |
30 |
|
|
|
PostalCode |
nvarchar |
20 |
|
|
|
Country |
nvarchar |
30 |
|
|
Total: 20 column(s)
Objects that [dbo].[Orders Qry] depends on
Total: 4 objects
SQL
create view "Orders Qry" AS
SELECT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID, Orders.OrderDate, Orders.RequiredDate,
Orders.ShippedDate, Orders.ShipVia, Orders.Freight, Orders.ShipName, Orders.ShipAddress, Orders.ShipCity,
Orders.ShipRegion, Orders.ShipPostalCode, Orders.ShipCountry,
Customers.CompanyName, Customers.Address, Customers.City, Customers.Region, Customers.PostalCode, Customers.Country
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
List of views
View: Product Sales for 1997
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
CategoryName |
nvarchar |
30 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
ProductSales |
money |
8 |
|
|
Total: 3 column(s)
Objects that [dbo].[Product Sales for 1997] depends on
Total: 8 objects
Objects that depend on [dbo].[Product Sales for 1997]
Total: 1 objects
SQL
create view "Product Sales for 1997" AS
SELECT Categories.CategoryName, Products.ProductName,
Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ProductSales
FROM (Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID)
INNER JOIN (Orders
INNER JOIN "Order Details" ON Orders.OrderID = "Order Details".OrderID)
ON Products.ProductID = "Order Details".ProductID
WHERE (((Orders.ShippedDate) Between '19970101' And '19971231'))
GROUP BY Categories.CategoryName, Products.ProductName
List of views
View: Products Above Average Price
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ProductName |
nvarchar |
80 |
|
|
|
UnitPrice |
money |
8 |
|
|
Total: 2 column(s)
Objects that [dbo].[Products Above Average Price] depends on
Total: 3 objects
SQL
create view "Products Above Average Price" AS
SELECT Products.ProductName, Products.UnitPrice
FROM Products
WHERE Products.UnitPrice>(SELECT AVG(UnitPrice) From Products)
--ORDER BY Products.UnitPrice DESC
List of views
View: Products by Category
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
CategoryName |
nvarchar |
30 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
QuantityPerUnit |
nvarchar |
40 |
|
|
|
UnitsInStock |
smallint |
2 |
|
|
|
Discontinued |
bit |
1 |
|
|
Total: 5 column(s)
Objects that [dbo].[Products by Category] depends on
Total: 3 objects
SQL
create view "Products by Category" AS
SELECT Categories.CategoryName, Products.ProductName, Products.QuantityPerUnit, Products.UnitsInStock, Products.Discontinued
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE Products.Discontinued <> 1
--ORDER BY Categories.CategoryName, Products.ProductName
List of views
View: Quarterly Orders
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
CustomerID |
nchar |
10 |
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
City |
nvarchar |
30 |
|
|
|
Country |
nvarchar |
30 |
|
|
Total: 4 column(s)
Objects that [dbo].[Quarterly Orders] depends on
Total: 4 objects
SQL
create view "Quarterly Orders" AS
SELECT DISTINCT Customers.CustomerID, Customers.CompanyName, Customers.City, Customers.Country
FROM Customers RIGHT JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE Orders.OrderDate BETWEEN '19970101' And '19971231'
List of views
View: Sales by Category
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
CategoryID |
int |
4 |
|
|
|
CategoryName |
nvarchar |
30 |
|
|
|
ProductName |
nvarchar |
80 |
|
|
|
ProductSales |
money |
8 |
|
|
Total: 4 column(s)
Objects that [dbo].[Sales by Category] depends on
Total: 9 objects
SQL
create view "Sales by Category" AS
SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName,
Sum("Order Details Extended".ExtendedPrice) AS ProductSales
FROM Categories INNER JOIN
(Products INNER JOIN
(Orders INNER JOIN "Order Details Extended" ON Orders.OrderID = "Order Details Extended".OrderID)
ON Products.ProductID = "Order Details Extended".ProductID)
ON Categories.CategoryID = Products.CategoryID
WHERE Orders.OrderDate BETWEEN '19970101' And '19971231'
GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName
--ORDER BY Products.ProductName
List of views
View: Sales Totals by Amount
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
SaleAmount |
money |
8 |
|
|
|
OrderID |
int |
4 |
|
|
|
CompanyName |
nvarchar |
80 |
|
|
|
ShippedDate |
datetime |
8 |
|
|
Total: 4 column(s)
Objects that [dbo].[Sales Totals by Amount] depends on
Total: 9 objects
SQL
create view "Sales Totals by Amount" AS
SELECT "Order Subtotals".Subtotal AS SaleAmount, Orders.OrderID, Customers.CompanyName, Orders.ShippedDate
FROM Customers INNER JOIN
(Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID)
ON Customers.CustomerID = Orders.CustomerID
WHERE ("Order Subtotals".Subtotal >2500) AND (Orders.ShippedDate BETWEEN '19970101' And '19971231')
List of views
View: Summary of Sales by Quarter
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ShippedDate |
datetime |
8 |
|
|
|
OrderID |
int |
4 |
|
|
|
Subtotal |
money |
8 |
|
|
Total: 3 column(s)
Objects that [dbo].[Summary of Sales by Quarter] depends on
Total: 9 objects
SQL
create view "Summary of Sales by Quarter" AS
SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal
FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID
WHERE Orders.ShippedDate IS NOT NULL
--ORDER BY Orders.ShippedDate
List of views
View: Summary of Sales by Year
Properties
dbo |
|
|
08.06.2000 |
|
Columns
|
ShippedDate |
datetime |
8 |
|
|
|
OrderID |
int |
4 |
|
|
|
Subtotal |
money |
8 |
|
|
Total: 3 column(s)
Objects that [dbo].[Summary of Sales by Year] depends on
Total: 9 objects
SQL
create view "Summary of Sales by Year" AS
SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal
FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID
WHERE Orders.ShippedDate IS NOT NULL
--ORDER BY Orders.ShippedDate
List of views
Stored Procedures
Stored Procedure: CustOrderHist
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@CustomerID |
INPUT |
nchar |
10 |
Total: 1 parameter(s)
Objects that [dbo].[CustOrderHist] depends on
Total: 8 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE CustOrderHist @CustomerID nchar(5)
AS
SELECT ProductName, Total=SUM(Quantity)
FROM Products P, [Order Details] OD, Orders O, Customers C
WHERE C.CustomerID = @CustomerID
AND C.CustomerID = O.CustomerID AND O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID
GROUP BY ProductName
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: CustOrdersDetail
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@OrderID |
INPUT |
int |
4 |
Total: 1 parameter(s)
Objects that [dbo].[CustOrdersDetail] depends on
Total: 8 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE CustOrdersDetail @OrderID int
AS
SELECT ProductName,
UnitPrice=ROUND(Od.UnitPrice, 2),
Quantity,
Discount=CONVERT(int, Discount * 100),
ExtendedPrice=ROUND(CONVERT(money, Quantity * (1 - Discount) * Od.UnitPrice), 2)
FROM Products P, [Order Details] Od
WHERE Od.ProductID = P.ProductID and Od.OrderID = @OrderID
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: CustOrdersOrders
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@CustomerID |
INPUT |
nchar |
10 |
Total: 1 parameter(s)
Objects that [dbo].[CustOrdersOrders] depends on
Total: 4 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE CustOrdersOrders @CustomerID nchar(5)
AS
SELECT OrderID,
OrderDate,
RequiredDate,
ShippedDate
FROM Orders
WHERE CustomerID = @CustomerID
ORDER BY OrderID
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: Employee Sales by Country
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@Beginning_Date |
INPUT |
datetime |
8 |
|
@Ending_Date |
INPUT |
datetime |
8 |
Total: 2 parameter(s)
Objects that [dbo].[Employee Sales by Country] depends on
Total: 9 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure "Employee Sales by Country"
@Beginning_Date DateTime, @Ending_Date DateTime AS
SELECT Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal AS SaleAmount
FROM Employees INNER JOIN
(Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID)
ON Employees.EmployeeID = Orders.EmployeeID
WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: Sales by Year
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@Beginning_Date |
INPUT |
datetime |
8 |
|
@Ending_Date |
INPUT |
datetime |
8 |
Total: 2 parameter(s)
Objects that [dbo].[Sales by Year] depends on
Total: 9 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure "Sales by Year"
@Beginning_Date DateTime, @Ending_Date DateTime AS
SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal, DATENAME(yy,ShippedDate) AS Year
FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID
WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: SalesByCategory
Properties
dbo |
|
08.06.2000 |
|
Creation options
Parameters
|
@CategoryName |
INPUT |
nvarchar |
30 |
|
@OrdYear |
INPUT |
nvarchar |
8 |
Total: 2 parameter(s)
Objects that [dbo].[SalesByCategory] depends on
Total: 8 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE SalesByCategory
@CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998'
AS
IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998'
BEGIN
SELECT @OrdYear = '1998'
END
SELECT ProductName,
TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0)
FROM [Order Details] OD, Orders O, Products P, Categories C
WHERE OD.OrderID = O.OrderID
AND OD.ProductID = P.ProductID
AND P.CategoryID = C.CategoryID
AND C.CategoryName = @CategoryName
AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear
GROUP BY ProductName
ORDER BY ProductName
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Stored Procedure: Ten Most Expensive Products
Properties
dbo |
|
08.06.2000 |
|
Creation options
Objects that [dbo].[Ten Most Expensive Products] depends on
Total: 3 object(s)
Permissions
Total: 1 permission(s)
SQL
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure "Ten Most Expensive Products" AS
SET ROWCOUNT 10
SELECT Products.ProductName AS TenMostExpensiveProducts, Products.UnitPrice
FROM Products
ORDER BY Products.UnitPrice DESC
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
List of stored procedures
Users
User: dbo
User Properties
SQL
if not exists (select * from dbo.sysusers where name = N'dbo' and uid < 16382)
EXEC sp_grantdbaccess N'sa', N'dbo'
GO
User: guest
User Properties
SQL
if not exists (select * from dbo.sysusers where name = N'guest' and uid < 16382 and hasdbaccess = 1)
EXEC sp_grantdbaccess N'guest'
GO
Roles
Role: public
Properties
SQL
if not exists (select * from dbo.sysusers where name = N'public' and uid > 16399)
EXEC sp_addrole N'public'
GO
Role: db_owner
Properties
Users
Total: 1 user(s)
SQL
Server Info
Properties
PDCN |
Cyrillic_General_CI_AS |
Version
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Databases
Total: 1 database(s)
Server Configuration
Maximum recovery interval in minutes |
0 |
Allow updates to system tables |
0 |
Number of user connections allowed |
0 |
Number of locks for all users |
0 |
Number of open database objects |
0 |
Default fill factor percentage |
0 |
Allow triggers to be invoked within triggers |
1 |
Allow remote access |
1 |
default language |
0 |
Cross DB Ownership Chaining |
0 |
Maximum worker threads |
255 |
Network packet size |
4096 |
show advanced options |
1 |
Create DTC transaction for remote procedures |
0 |
c2 audit mode |
0 |
default full-text language |
1033 |
two digit year cutoff |
2049 |
Memory for index create sorts (kBytes) |
0 |
Priority boost |
0 |
remote login timeout |
20 |
remote query timeout |
600 |
cursor threshold |
-1 |
set working set size |
0 |
user options |
0 |
affinity mask |
0 |
Maximum size of a text field in replication. |
65536 |
Tape retention period in days |
0 |
cost threshold for parallelism |
5 |
maximum degree of parallelism |
0 |
minimum memory per query (kBytes) |
1024 |
maximum time to wait for query memory (s) |
-1 |
Minimum size of server memory (MB) |
0 |
Maximum size of server memory (MB) |
2147483647 |
Maximum estimated cost allowed by query governor |
0 |
User mode scheduler uses lightweight pooling |
0 |
scan for startup stored procedures |
0 |
AWE enabled in the server |
0 |
affinity64 mask |
0 |
Logins
Login: sa
Properties
sa |
English |
|
master |
|
SQL Server standard |
|
Users with this login
|
master |
dbo |
|
tempdb |
dbo |
|
model |
dbo |
|
msdb |
dbo |
|
pubs |
dbo |
|
Northwind |
dbo |
|
aanf |
dbo |
|
almirante |
dbo |
|
antinucciIT |
dbo |
|
aspnetstore |
dbo |
|
B_INDA |
dbo |
|
BIC |
dbo |
|
cast |
dbo |
|
ciak |
dbo |
|
CompulsionAsset |
dbo |
|
distmodel |
dbo |
|
farmacia |
dbo |
|
immobiliare |
dbo |
|
isvema |
dbo |
|
ivd |
dbo |
|
juli |
dbo |
|
lportal |
dbo |
|
mb_pg |
dbo |
|
metamedica |
dbo |
|
mGiove |
dbo |
|
MTC |
dbo |
|
ofbiz_ap |
dbo |
|
ofbiz |
dbo |
|
ofbiz_mnet |
dbo |
|
ofbiz2 |
dbo |
|
OLAP_REPOSOTORY_SPAIN |
dbo |
|
privacy |
dbo |
|
QM |
dbo |
|
regina |
dbo |
|
RIO_WEB |
dbo |
|
romesweethome |
dbo |
|
SICVE_TEST |
dbo |
|
student |
dbo |
|
sun_marte |
dbo |
|
sun_terra |
dbo |
|
sun_terra_door |
dbo |
|
sun_terra_terminal |
dbo |
|
sun_venus |
dbo |
|
sun2_marte |
dbo |
|
sun2_marte2 |
dbo |
|
sun2_terra |
dbo |
|
SUSDB |
dbo |
|
Terra |
dbo |
|
Terra_copy |
dbo |
|
TERRA_DOOR |
dbo |
|
terra_v2 |
dbo |
|
Test |
dbo |
|
UIPState |
dbo |
|
UIPstore |
dbo |
|
uVersion |
dbo |
|
WH_TEST |
dbo |
Roles with this Login
|
sysadmin |
SQL
if not exists (select * from master.dbo.syslogins where loginname = N'sa')
BEGIN
declare @logindb nvarchar(132), @loginlang nvarchar(132) select @logindb = N'master', @loginlang = N'us_english'
if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
select @logindb = N'master'
if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
select @loginlang = @@language
exec sp_addlogin N'sa', null, @logindb, @loginlang
END
GO
Server overview
Logins list
Login: BUILTIN\Administrators
Properties
BUILTIN\Administrators |
English |
|
master |
|
Windows security group |
|
Roles with this Login
|
sysadmin |
SQL
if not exists (select * from master.dbo.syslogins where loginname = N'BUILTIN\Administrators')
exec sp_grantlogin N'BUILTIN\Administrators'
exec sp_defaultdb N'BUILTIN\Administrators', N'master'
exec sp_defaultlanguage N'BUILTIN\Administrators', N'us_english'
GO
Server overview
Logins list
About
Documentation details
|
Northwind project |
02.19.2007 |