# Tutorial A: Creating Schemas with a Wizard

Microsoft dbWeb features a Schema Wizard to help you create schemas quickly. Following the steps in this section, you create a schema with the Schema Wizard and use the schema in your browser to view the Web pages the schema specifies. The schema you create uses the dbPubs database and the authors table. If there are any terms you do not understand, see the Glossary#appa in Appendix A.

# Using the dbWeb Schema Wizard

You can give Microsoft dbWeb a quick test by building your first Microsoft dbWeb schema using the Schema Wizard. The schema you will build uses the dbpubs data source.

To start the Schema Wizard

1. In the Start Programs menu, click dbWeb Administrator.

2. From the Data Sources window, select dbpubs and click New Schema.

3. In the New Schema dialog box, click Schema Wizard.

Note: If the Open dialog box appears, you need to verify that databases are specified for the system DSNs. Cancel and use the procedure in the introduction to use the ODBC Administrator.

4. In the Choose a table step, select Authors and click Next.

Figure 1. Schema Wizard: Choosing a table

5. In the Choose the data columns to query step, click >> to add all the available data columns from the list box on the left to the list box on the right, and then click Next.

The columns you select will be available in a Query By Example form.

Figure 2. Schema Wizard: Choosing QBE data columns

6. In the Choose tabular form data columns page, click >> to add all data columns to the tabular data column list and then click Next.

These columns will be available in the tabular version of the query results.

Figure 3. Schema Wizard: Choosing tabular data columns

7. In the Specify a Drilldown Automatic Link page, select au_id and click Next.

This data column will then act as a hyperlink to zoom in on your data, by using the value of the item as the new criteria in your query.

Figure 4. Schema Wizard: Specifying Drilldown Automatic Link

8. In the Enter schema name step, type "Authors_All_Columns" and click Finish.

Figure 5. Schema Wizard: Naming the schema

That’s it! The Schema Wizard creates the schema for you.

# Browsing Your Data

Now you are ready to browse the database using your Web browser. To browse your data, you can either enter a URL that calls the Microsoft dbWeb executable or use a link on an HTML document to this URL. The URL syntax is:

http://[machine-IP-address]/scripts/dbweb/dbwebc.dll/[schema-name]?[method]

For your schema, replace method with getqbe. This method displays the query by example (QBE) form you designed to appear as the first form in the browsing session.

The example below shows the URL for a address of www.vectorlink.com, the executables in the directory scripts, and the schema which is authors_all_columns:

http://www.vectorlink.com/scripts/dbweb/dbwebc.dll/authors_all_columns?getqbe

Figure 6. Authors QBE form

Now you can try a few queries to test the authors_all_columns schema.

To test the schema

1. In the State field, type "CA" for California.

2. Click Submit Query.

A tabular form similar to the following appears.

Figure 7. Authors: Tabular form

Use your browser’s horizontal scrollbar to see more of the tabular form. Notice how the values listed in the Au_id column are hyperlinks. These are the drilldown Automatic Links you created with the Schema Wizard.

3. Click the first row (where Au_id=172-32-1176). You should now see the following form.

Figure 8. Authors: Freeform