Designing the Database

The database for this application consists of two tables—tblUsers and tblUserStocks. The tblUsers table contains the usernames, passwords, and ZIP codes of the registered users of the system. The tblUserStocks table contains one row for each stock that any user wants to track. Because the application will be getting stock data for each stock individually, this table structure works out nicely for quickly looping through the table data. In the sample code, the database is named WSCh15 and was built in SQL Server 2000. When you've created your database, you can use the script shown in Listing 15.1 to create the tables.

Listing 15.1. Tables.sql—Tables for the Web Portal
 if exists (select * from dbo.sysobjects where id = ...

Get Creating and Consuming Web Services in Visual Basic® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.