Dynamic Queries
When discussing queries, we generally think of retrieving data results from a database. This post will look at the interactive aspect of dynamic queries for data visualisation, from a Human Computer Interaction perspective.
What are Dynamic Queries?
- A method for direct manipulation of a database.
- Generally using a GUI with options for filtering results.
Dynamic Query example
Web applications using dynamic queries will be very familiar to most. The example image below shows the Rightmove real estate property portal map search feature.
This allows the user to select different criteria to filter results, including area perimiter, price range, number of rooms, property types and more. Properties that meet the criteria are displayed on the map with a marker.
This approach to querying the database of properties for sale means the user can avoid the need to type in different search options.
What are the properties of Direct Manipulation?
- Objects are continously visualised.
- Physical interaction with buttons, sliders, checkbox instead of typing.
- Actions can be performed quickly, in incremental steps, with the ability to undo. The results are visible immediately.
- Minimal knowledge required in order to submit queries.
In the Rightmove map search example above, all of these points are met:
- Each additional filter application or parameter change updates the map instantly with matching property.
- No typing is required for filtering the different options - only dropdown selections and checkboxes.
- The interface shows the most common types of filters along the top toolbar, with no prior knowledge required to chain these parameters together.
With this straightforward interaction for the user, it can be easy to forget these steps are putting together queries behind the scenes in order to build the results.
Pros / Cons of Dynamic Queries
Pros of Dynamic Queries:
- Dynamic Queries are simpler for the user than typing out SQL statements.
- No chance of writing incorrect SQL syntax.
Cons of Dynamic Queries:
- Too many data points on the screen can reduce effective interpretation.
- The queries are limited in comparison to what SQL statements would allow.
In the example above, there are a relatively small number of properties matching the search criteria for the map size. Had there been a large number of properties for sale within a high-rise block of flats, the data visualisation for the properties would not have been as clear without further interation using the map.
Summary
This post briefly touched on dynamic queries for data visualisation from a HCI perspective and showed an example web app interface.
To summarise, dynamic queries make interating with data more accessible to users, though this may come at the cost of limiting the range of search properties.
Additional reading on the topic can be found in this reasearch paper on dynamic queries.