September 28, 2002 - Installing IBuySpy's Sample DB | WebReference

September 28, 2002 - Installing IBuySpy's Sample DB

Yehuda Shiran September 28, 2002
Installing IBuySpy's Sample DB
Tips: September 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

IBuySpy Store comes with a sample database. Actually, it comes with a SQL script that can generate the database. The SQL script StoreDB.sql resides in the top level StoreDOCJS folder. The script will create a new database named StoreDOCJS, and will populate its tables with sample products, customers, and orders. To do this, invoke SQL Server Enterprise Manager, and choose Tools->SQL Query Analyzer. A new window will pop up. Load the SQL script by clicking on File->Open and browsing to the SQL script. If you follow our example above, the full path name should be C:\StoreDOCJS\StoreDB.sql. Once loaded, click on the Play button (right arrow) on the top menu bar. The StoreDOCJS database should be ready now.

To give you a taste of the SQL script, here is the code section that creates the Customers table:

  CREATE TABLE [dbo].[Customers] (
      [CustomerID] [int] IDENTITY (1, 1) NOT NULL ,
      [FullName] [nvarchar] (50) ,
      [EmailAddress] [nvarchar] (50) ,
      [Password] [nvarchar] (50) 
  ) ON [PRIMARY]
  GO