A query of a database allows the user to extract a record (or records) of a data using logical statements on a field (or fields) stored within a specific database.  With InfoWater, the user is able to select network components and related data by creating logical query statements through the user-friendly DB Query feature.

Using Queries in InfoWater

DB Queries are a time-saving tool that can be used for:

  • Activating a portion of the network for simulation, typically as a facility set associated with a custom scenario (see Facility Manager).

  • Creating a domain to highlight a subset of network components (see Domain Manager.)

  • Restricting the database records that are available for editing using the Database Editor.

  • Customizing the map display by color-coding network components (see Query Sets).

  • Creating Selection Sets (see Selection Sets)

  • Output Relates (stored output result data) can also be associated with DB Queries which are important when creating Query Reports.

  • Restricting model results to identify network components whose modeled performance (pressures, flows, etc.) meet or do not meet user specified criteria (e.g., nodes where pressure drops below 20 psi) using the Output Report Manager.

You may develop your own query statements or use one of the pre-defined InfoWater special queries to select portions of your distribution system model.


Methodology

To build a query statement, do the following:

  • From the InfoWater Browser -> Operation tab click on DB Query.

  • Right click and choose the New command, and specify an ID and description (ID no more than 20 characters, no spaces and Description no more than 60 character, may contain spaces) and click on OK.

  • Choose the Element Type that you want to create a query for ( Choose from Junctions, Pumps, Tanks, Reservoirs, Valves and Pipes) then Click on OK.

  • Click on the Query Builder icon to launch the Query Builder dialog box.

  • Choose the appropriate data tab from among the three tabs at the top of the Query Builder dialog box.

  • Click on the column for the data type you want to query on.

  • Choose the operator from the functions and operator section.

  • Enter the value that you want as your second operand in the Value Box.

  • Click on Add to add the query in the Statement section of the Query Builder.

  • Click on Validate to validate your query.

  • Click on OK to save your query and exit from the query builder dialog box.


DB Query Dialog Box

To create a database query, from the Operation tab of the InfoWater Browser, select DB Query and right click and choose the New command.  


Query ID & Description - The query ID and description is displayed here.

    • Tip 1: In InfoWater an element ID is up to 32 characters long, no spaces and some symbols are restricted such as #, % etc. (dash "-" and underscore "_" characters are OK)

    • Tip 2: Description is up to 60 characters with spaces and symbol characters.

    • Tip 3: A good description always helps identify the DB Query.

Element Type - Select the InfoWater data element for which a query statement is to be made on the elements database. Choose from among the following different elements.

Note- Make sure to choose the right element type to create the query.


Disable Output Relates Lookup - Check this box to prevent output relates from being associated with a database query. For more information on Output Relates.

Query Statement Tab - Shows the current query statement associated with the highlighted database query. In case you want to create a new query, click on the query builder button to open the Query Builder dialog box.

Output Relate Tab - See DB Query-Output Relate Tab

Query Builder  - Click on the DB query icon to launch the Query Builder dialog box.