Overview of the Database Wizard

The Database Wizard creates blocks of database-driven content, rather than entire documents. A block can be inserted into any document, including one with existing static contentOrdinary, non-database-driven HTML content.. You can add static content to a document before and after creating a database-driven block in it.

When you save a document in which you have added a database-driven block, Namo WebEditor changes the file name extension to .asp, .php, or .jsp, depending on the dynamic document standard you have selected.

Types of blocks

The Database Wizard can create six kinds of database-driven content blocks. Four are output blocks, which present information retrieved from a database in various formats. The other two are input blocks, forms that accept data from users and then insert it into a database.

The output block types are:

  • Table blocks, which display multiple database records in a tabular format with one row per record and one column per field;
  • List blocks, which display multiple records in a serial arrangement where each records takes up multiple lines, one line per field;
  • Detail blocks, which display a single record; and
  • Chart blocks, which display quantitative data from multiple records as a chart or graph.

The input block types are:

  • Input blocks, which take user-provided data and insert it into a database as a new record; and
  • Modification blocks, which take user-provided data and update an existing database record with it.

Most types of blocks are mutually exclusive. For example, you cannot insert both a table block and an input block in the same document. Also, most block types can only have one instance in a single document, so you cannot put two list blocks (for example) in the same document. The only exceptions to these rules are detail and chart blocks. You can combine a detail or chart block with any other type of block, and any number of detail or chart blocks can exist in the same document.

Basic steps of the Database Wizard

Most of the steps in the Database Wizard are the same, regardless of block type. Below is a brief overview of the common steps.

Step 1: Choosing a dynamic document standard and database connection method

In the first step, you decide whether to use ASP, PHP, or JSP as the dynamic document standard for the current document; choose a database connection type, such as ODBC or JDBC; and specify the operating system of your Web server. The Web server OS setting is only used if you are creating a chart block; it is used to determine which version to save of the CGI program that draws the chart.

Step 2: Specifying a data source

In the second step, you select an ODBC data source (if using ODBC) or specify the location of a database (if using another connection method). If you are using a connection method other than ODBC, you also need to select an ODBC data source so that the Database Wizard can get table and field information from the database.

Step 3: Selecting database fields

In the third step, the wizard displays a list of the fields in each table of the database. You select the fields that you want to include in the block.

Step 4: Specifying a filter

In the fourth step, you specify a filter condition that filters the database records. This is optional for table, list, and chart blocks, but it is mandatory for detail and modification blocks, since these block types can only display (or modify) a single record. In this step you also specify a join condition if you selected fields from more than one table in the previous step; and an optional sort condition, which determines how the records will be sorted. This step is absent when you are creating an input block.

Step 5: Adding or removing block elements

In the fifth step, the wizard displays a list of the block elements that will be included in the block by default. Every database-driven block consists of a number of block elements, each of which performs some individual function in the block. For example, an output element displays the contents of one database field; a page link element presents a generated set of hyperlinks for navigating multiple output pages; and so forth. You can remove block elements you don’t want to include, and you can add additional elements.

In addition to these common steps, there are a few steps that only apply to certain block types. These are explained in the individual subsections covering each block type.

Related topics

Creating an output block

Creating an input block

Overview of the Database Wizard