| Stonefield Query SDK |
| Database Properties |
A class in an object-oriented language serves as a template: it defines a certain interface and behavior. The object created when you instantiate the class can be thought of as the physical implementation of the class.
Stonefield Query treats databases in a similar manner. A logical database is similar to a class: it defines what tables belong to the database and the structure of those tables. This is what Stonefield Query refers to as a "database." A physical database is the actual database on disk; Stonefield Query refers to this as a "data source." The logical database doesn't concern itself with location or type of access; those are issues for the physical database. For example, you may have both SQL Server and Microsoft Access versions of the same logical database; the Northwind sample database that comes with both of these is one such set of physical databases that have the same logical database structure.
Stonefield Query uses the concept of a "main" database for an application. The main database is the one that the user can change data sources for. All other databases are assumed to be related to the main one in that selecting the data source for the main one somehow determines how the data source for the others is selected.
For example, imagine an accounting application that has two databases: a system database that contains application-specific data, and a company-specific database containing the accounting information for the company. The user may have different databases for different companies, so they can change data sources to select the appropriate database for the desired company. However, there is only one system database. In this case, the company-specific database is considered to be the main one, since that's the one the user can select different data sources for.
Here's another example: an application that has multiple instances of two databases (such as for production and test data) on different servers. When the user chooses a data source for one of those databases, Stonefield Query uses the other database from the same server as the first one. Thus, either database can be the main database, and an OpenDataSource script for the second database can set the properties for the second database to match those of the selected data source for the main database.
The properties displayed are:
The Create "open data source" script link is used to create an OpenDataSource script for the database. This script is called when the user opens a data source. Typically, the main database won't have an OpenDataSource script, since Stonefield Query handles that automatically. The other databases, however, need such a script to tell Stonefield Query what to do. This link appears as Edit "open data source" script if the script already exists; click it to jump to that script.
The Create "get data sources" script link is used to create a GetDataSources script for the database. This script is used to define which data sources are available for this database. This link appears as Edit "get data sources" script if the script already exists; click it to jump to that script.
| Last Updated: 06/10/10 |