How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Reload this page Northwind Sample Database

This article analyzes the Northwind sample database first offered with Microsoft SQL Server 2000.

Related Topics:

 

Site Map List all pages on this site 
About this site About this site 
Go to first topic Go to Bottom of this page


Screen: Max1024800

Set this at top of window. Northwind and Pubs Samples

    Many books and tutorials on SQL Server refer to the NorthWind (and its PUBS) sample database.

    There are several versions of Northwind.

    477KB Download Micorosoft's Access 2000 Northwind.mdb The extracts file Nwind.exe which extracts to 1,510 KB Nwind.mdb, which is convert to Nwind2002.mdb when opened using MS-Access 2003 or 2007.

    Download from Microsoft SQL2000SampleDb.msi for SQL Server 2000 (1.5MB file dated 4/8/2004). This is not available from CodePlex. Running this results only in the creation of folder
    "C:\SQL Server 2000 Sample Databases" containing

      instnwnd.sql which loads NORTHWND.MDF and NORTHWND.LDF
      instpubs.sql which loads PUBS.MDF and PUBS_LOG.LDF

    The Access .MDB version has a smaller number of tables than the SQL Server version, but the same number rows for the same tables.


Go to Top of this page.
Next topic this page

Set this at top of window. Loading Northwind Into SQL 2008

    To load the data in SQL 2005 and 2008 (instead of the osql command in SQL 2000), open a command windows and run this against the default SQL server instance:

      cd C:\SQL Server 2000 Sample Databases
      sqlcmd -i instnwnd.sql
      Changed database context to 'master'.
      Changed database context to 'Northwind'.
      sqlcmd -i instpubs.sql
      Changed database context to 'master'.
      Beginning InstPubs.SQL at 03 Jan 200X 19:03:21:470 ....
      Creating pubs database....
      Changed database context to 'pubs'.
      Now at the create table section ....
      Now at the create trigger section ...
      Now at the inserts to authors ....
      Now at the inserts to publishers ....
      Now at the inserts to pub_info ....
      Now at the inserts to titles ....
      Now at the inserts to titleauthor ....
      Now at the inserts to stores ....
      Now at the inserts to sales ....
      Now at the inserts to roysched ....
      Now at the inserts to discounts ....
      Now at the inserts to jobs ....
      Now at the inserts to employee ....
      Now at the create index section ....
      Now at the create view section ....
      Now at the create procedure section ....
      Changed database context to 'master'.
      Ending InstPubs.SQL at 03 Jan 200X 19:03:30:217 ....

    Pinal Dava offers other ways to install Northwind on SQL 2005, which a reader said also works for 2008.

    To interactively make SQL Server a file using Enterprise Manager, copy the mdf and ldf file into a folder like:
    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

    In EM 2005, Database and choose all task and select Attach DB

    In the Enterprise Manager 2008 Object Explorer, right Click on Databases, then Attach... If you have a .ldf file with the .mdf file, rather than use sp_attach_db procedure (especially from unknown or untrusted sources), use T-SQL command

    If you don't have an .ldf file, this article describes use of
    sp_attach_single_file_db @dbname= 'databasename', @physname= 'C:\...\PetShop.mdf'


Go to Top of this page.
Next topic this page

Set this at top of window. Northwind Physical Schema


Go to Top of this page.
Next topic this page

Set this at top of window. NWind MDB Views

    This matrix organizes the different views:

    Slant Customers Suppliers Products Orders Shippers Employees
    list Customer List - Current Product List Order Details Extended - -
    Top 5 - - - - - -
    by Year - - - Sales by Year - -
    Current Year - - Product Sales for 1995 Category Sales for 1995 - -
    by Quarter - - Quarterly Orders by Product Quarterly Orders - -
    by Category - - - Sales by Category - -
    by Country - - - - - Employee Sales by Country
    by City Customers and Suppliers by City - - - -
    by money - - Most Expensive Products
    Products Above Average Price
    - - -
    summary Invoices - Product Sales for 1995 Order Subtotals - -


Go to Top of this page.
Next topic this page

Set this at top of window. Pubs Schema


Go to Top of this page.
Next topic this page

Set this at top of window. Application Generation

Set screen Share This


Go to Top of this page.
Previous topic this page
Next topic this page

Set screen Next


Go to Top of this page.
Previous topic this page
Next topic this page
Performance Engineer Life Role Site Map Performance and Capacity Management... Syndicate this list of links:

Feed Validity Checked RSS 2.0 XML feed
Feed Validity Checked Atom 1.0 XML feed

 

How I may help

Send a message with your email client program


Your rating of this page:
Low High




Your first name:

Your family name:

Your location (city, country):

Your Email address: 

  Top of Page Go to top of page
Previous topic this page

Human verify:
 
Please retype: