# Ad Hoc Data Foraging in a Life Sciences Community Ecosystem Using SoDa +
## 3 SoDa Architecture
### Application Design
#### 3.4.2 Query Builder Interface  
As alluded to earlier, SoDa supports two types of query constructs--extract statement for deep web data extraction, and select statement for querying tables. It also supports workflow orchestration using these two query types by allowing the logical sequencing of them. It does so using a query construction toolbox similar to SQL's QBE query builders [30], called _QBuild_, as introduced in the SoDaPro component of the SoDa architecture in Figure 1. QBuild comprises two main GUI interfaces--one to construct the equivalent of the extract statements to access deep web databases, and the other to write SQL queries to interrogate the locally stored databases in SoDa. Figure 6 shows the first of the two screens of the QBuild query builder. Using this interface, users are able to retrieve data from any deep web databases. The second interface to query locally stored data is shown in Figure 7. We only briefly outline some of its features due to limited space. This interface is rich in features and powerful compared to most contemporary visual SQL query builders; it deserves a more complete discussion and is outside the scope of this article. Only a brief discussion is presented below. In both of these interfaces, the top bar above the multi-functional canvas shows function selector buttons as icons that are active one at a time (in a similar way to radio buttons). The icons are \"Run\" or \"Play\", \"Pause\", \"StepThrough\", \"Download\" or \"Save\", \"Delete\" or \"Restart\", and \"Share\". Below this bar, there are five tabs that allow an extract query, SQL query, SQL subquery, and a correlated SQL subquery to be written; a workflow can then be assembled using extract and SQL queries. The screen below, called the canvas or workspace, changes based on the selected tab as they have unique features and functions. During execution, the results are shown as a pop-up window (as shown in Figure 8), and execution trace is shown at the side panel that opens up on the right. When execution terminates or is paused, the canvas returns to Edit mode. Figure 6: QBuild interface: Using this graphical interface, users can retrieve data from deep web databases without writing a single line of code. They can use the wrapper-constructed tool CroW and stored schema matchers from the system libraries to construct a Needle query to extract data, and store it for subsequent use. Figure 7: QBuild SQL query builder interface: This interface allows users to construct queries and analytics using stored tables in ways similar to traditional relational database QBE [30] interfaces. The side panel on the left has three selectors--Tables, Queries, and Workflows. These electors list stored tables in the SoDa database as well as previously constructed and stored queries and workflows. Clicking on a table name shows two options, _See_ and _Load_. \"See\" shows the column names and a sample row of data to help understand the table. The \"Load\" option, on the other hand, pulls up the entire table and lets users inspect the table in full. However, unless the table is stored as a relational table, the queries (extract or SQL) are usually stored (not the computed tables) and when requested, the queries are executed live and the results are shown when Load option is chosen. This approach reduces the space needed to store materialized tables at the cost of time to compute it live. Both Queries and Workflow entries load the corresponding definitions into the workspace or canvas in edit mode. Users are allowed to edit and execute queries or workflows. An edited version can be stored--as a new query or workflow, or replace the existing entries. Deep Web Data Extraction  
Figure 6 shows the Extract function in Edit mode. The fillable blocks in this interface resemble the extract statement options of BioFlow.