My WebLink
|
Help
|
About
|
Sign Out
Home
Browse
Search
CRDSS_Task1_05-8_LowLevelDatabaseAccessRoutines
CWCB
>
Decision Support Systems
>
DayForward
>
CRDSS_Task1_05-8_LowLevelDatabaseAccessRoutines
Metadata
Thumbnails
Annotations
Entry Properties
Last modified
9/25/2011 10:18:52 AM
Creation date
5/30/2008 2:26:07 PM
Metadata
Fields
Template:
Decision Support Systems
Title
CRDSS Task 1.05-8 - Study of System Integration Issues DMI - Low-level Database Access Routines
Description
This memorandum discusses the structure of the routines in the low-level DMI library.
Decision Support - Doc Type
Task Memorandum
Date
1/8/1995
DSS Category
DMI Utilities
DSS
Colorado River
Basin
Colorado Mainstem
Contract/PO #
C153658, C153727, C153752
Grant Type
Non-Reimbursable
Bill Number
SB92-87, HB93-1273, SB94-029, HB95-1155, SB96-153, HB97-008
Prepared By
Riverside Technology inc.
There are no annotations on this page.
Document management portal powered by Laserfiche WebLink 9 © 1998-2015
Laserfiche.
All rights reserved.
/
5
PDF
Print
Pages to print
Enter page numbers and/or page ranges separated by commas. For example, 1,3,5-12.
After downloading, print the document using a PDF reader (e.g. Adobe Reader).
Show annotations
View images
View plain text
Notes on the Use of Multiple Data Sources <br />All models are anticipated to be stand-alone, in the sense that the models will be able to take flat files <br />created by a DMI utility and run as if there were no CRDSS database. Because the CRDSS database <br />may not be populated with data on a schedule that is conducive to model development, there may be <br />a period where some of the ? CRDSS database? consists of flat files. The low-level routines will <br />evolve as these data are moved into the INFORMIX database. <br />Each of the low-level routines will have ESQL code that does the work. However, if the model <br />makes demands that cannot be easily handled with ESQL to the INFORMIX database, then the low- <br />level routines may have to seek data from a different source, e.g., flat files, ARC/INFO, etc. This <br />may be particularly important during development, when the final destination of data may not be in <br />place or may not even be known. Because models should not control the design of the entire system <br />(and all low-level routines), the way that the data source is indicated to low-level routines should be <br />clean. Several choices are available: <br />(1)Use a set of macros to define the data source, e.g.: <br />DMIGetStationLatLong ( ..., SOURCE_INFORMIX ); <br />DMIGetStationLatLong ( ..., FLAT_FILES ); <br />DMIGetStationLatLong ( ..., SOURCE_ARC_INFO ); <br />This option has the advantage that it is clean (no global/static variables to manage) and <br />provides a way to quickly change data sources. It has the disadvantage that an extra <br />argument may be needed in many calls, and a default value must be supplied. <br />(2)Use a global variable and set it with a utility routine, e.g.: <br />DMISetDataSource ( ..., SOURCE_INFORMIX ); <br />set a static (and possibly global) variable like data_source <br />to SOURCE_INFORMIX <br />DMIGetStationLatLong ( ... ); <br />data_source = DMIGetDataSource (); <br />if ( data_source == SOURCE_INFORMIX ) <br />/* get data using ESQL */ <br />else if ( data_source == SOURCE_ARC_INFO ) <br />/* get data from ARC/INFO */ <br />This option has the advantage that the data source can be changed quickly and does not <br />require that each routine specify this information. The data source would remain the same <br />between calls to the ?DMISetDataSource? routine. The other advantage is that the data <br />source variable would be hidden from the developer (one less thing to worry about). This <br />option may be desirable for development, where the developer would like to change data <br />sources as the data migrates from flat files to the INFORMIX database. <br />(3)Use a configuration file and/or environment variables, e.g.,: <br />DATASOURCE=INFORMIX <br />4 <br />A275 01.08.95 1.05-8 Malers <br />
The URL can be used to link to this page
Your browser does not support the video tag.