| Stonefield Query SDK |
| Step 2: Fill in the Data Dictionary |
What gives Stonefield Query this knowledge about the databases is its data dictionary. The data dictionary has information about the databases themselves (where they are located and how to access them) and their tables (their names and descriptive headings), fields (names, headings, data types, formats, and so forth), and relationships (the expressions used to join pairs of tables).
Filling in the Stonefield Query data dictionary for a database would be a very tedious process if you had to do it by hand. Fortunately, the Configuration Utility has a feature to "discover" the meta data for a database. You do this by adding a database to the current project's data dictionary. This creates the meta data (information about the data structures) for the database and all of its tables, fields, and relationships. See the Adding a Database to the Data Dictionary topic for details on the discovery process.
Once the Configuration Utility has created the meta data for the database, the next task is to fill out the properties of each object in more detail. Which properties you specify depends on the type of data object:
You may also wish to define some calculated fields. A calculated field doesn't physically exist in the database, but is simply a formula that gives a value the user may want to query on. An example is the extended price of a sale item. This usually isn't stored because it's a derived value (price per item multiplied by the quantity sold), but the user may want it printed in a report or use it in a filter condition. So, you can define a calculated field in the appropriate table, specifying the caption, data type, and output expression (the formula) for the field. This field is then available for querying just like a real field -- the user can include it in a report or filter on it -- but internally, Stonefield Query uses the formula to derive the value.
| Last Updated: 02/05/2008 |