home -> developer -> SQL -> tutorial -> weekly sales

back next

A primitive record: weekly sales

An SQL query can be used to fetch information that comprises a logical record. The record aggregates information on a particular topic. Using the WaterkenTM RDB Webizer, you can create a resource that represents the authority to fetch a particular record from your database. In this section of the tutorial, we will create a resource that fetches the weekly sales from the Coffeebreak database.


A <http://waterken.com/sql/record/Record> resource is used to fetch a record from a relational database. The <Record> uses an SQL query resource to fetch and format the data from the database.

Different types of SQL query resources can be used, depending on how you want to format the result table:

The weekly sales is a mapping of coffee names to a number of sales, and so uses a: <http://waterken.com/sql/map/Statement>.

Wrapping an SQL query resource with a <Record> creates a resource of the same type as the return from the SQL query resource. For example, performing an HTTP GET on the weekly sales resource returns a <http://waterken.com/adt/hashed/Map>. The client is not aware that the resource is implemented using a <Record>.

To build a record fetcher resource, first build the SQL query resource and then wrap it in a <Record>. The next section describes building the SQL query resource.


Copyright 2002 - 2003 Waterken Inc. All rights reserved.

Powered by Waterken Server! Valid XHTML 1.0! Valid CSS!