skip to main content
Database DMI Overview
The Database DMI allows RiverWare to import and export data directly from and to the database. In this document, a database refers to a specific database implementation, for example a DSS file or Excel workbook. Figure 4.1 shows the interaction between RiverWare and the database. The user sets up the Name Maps, configures the Datasets, and identifies slots and time intervals at which to import/export data in the Database DMI.
Figure 4.1  Databased DMI Interaction between RiverWare and Databases
When the Database DMI is invoked, the Dataset and Name Maps are read specifying the database to use, the units and what slots/objects are named in the database. Any wildcarded slot selections are then fully specified and then any Name Maps are applied. Then commands are passed to the database: for an input DMI, the commands locate the data in the database and imports data into RiverWare slots; for an output DMI, the database DMI takes the RiverWare slot data and inserts it into the appropriate place in the database.
Figure 4.2 shows in more detail the three pieces of a database DMI and how they work together to define a DMI.
Note:  With the DMI Database Editor you can configure an entire Database DMI in one dialog but these three components still exist and interact with one another. See Creating a Database DMI for details.
Figure 4.2  Diagram showing the pieces of a Database DMI
The three pieces (slot selections, datasets, and name maps) were designed to be very flexible. In the simple case of importing or exporting 1 slot, the user needs 1 slot selection, 1 dataset, and optionally 1 name map. It is possible to configure the system with more functionality which leads to more complexity.
For example, in Figure 4.3, slot selections 1 and 2 share dataset 1 which is an HDB dataset; no Name Map is required. In this DMI, Slot selection1 is an input from HDB for the full run and then slot selection 2 is an input from HDB for the full run. Slot selection 3 is used to input initial conditions and uses Dataset 2 which points to a separate DSS file in Dataset 2. Slot selection 4 inputs from a DSS file referenced in Dataset 3 for the full run. Both Dataset 2 and 3 are DSS datasets and share Name Map 1.
Figure 4.3   
We will now look at each component starting with creating a Database DMI, then look at Datasets followed by Name Maps.
Revised: 06/04/2022