In this section: 

Viewing Data Models

Click on the Models tab and choose a repository to interact with the data sets contained in the repository.  

Data all sets within a repository are represented as diagrams in the Models tab of Test Data Assistant.

  • You can use the scroll wheel on your mouse to zoom in and out.
  • You can click and drag on an object to arrange the objects.
  • You can click on an empty area of the diagram to move all objects at once.

If your license does not include access to the data modeling functionality and features, you will be prompted to enable it on the license configuration page. See Configuring the License and Database for instructions on enabling additional features. 

Understanding Data Model Components

A model is a repository-level collection of data sets, record types, members, and keys.   

Data Sets and Record Types

Data sets are high-level organizational structures within a repository. A data set is identified by a record type. In the following image, the "getItemById" data set is a "getItemByIdResponse" type of record.

  

Keys and Members

A data set contains keys and members. Keys are unique data fields that can be called by a tool so that responses with all the data in the row can be used in a test. Members are the data value fields. In the following image, "IMDBID" is a key and "Title" and "ProductionBudget" are members. 

A list of members is represented as a stack. If the generation settings for a member has been configured, a gear icon will appear on the member label (see Working with Data Models). 

Members can also represent a record type. In the following image, the dark boxes labeled "Results" are members of the "Results" record type (circle), but they also represent other record types ("addResponse", "subtractResponse", and "divideResponse").

Relationships within a Model

Relationships between objects are represented by lines and arrows. Clicking on an object opens a sidebar the provides additional information about the data structure. In the following model, the record type "test" is highlighted and it's relationships are summarized in the sidebar.

The arrow to the record type from the "test" data set indicates that the record type is referenced by the data set.

The line between record type and the primitives "bizarre", "cn2", "cn3", "cn0", and "bizarre_2" indicate that they are members of the "test" record type.

In the following model, a line between the key "titleKeyword" and the data set "getItemByTitle" indicates that "titleKeyword" is a key in the data set. This relationship is summarized in the sidebar when the key is selected.

Additionally, the record type "getItemByTitleResponse" is referenced by the data set and appears in the sidebar under the Value Types label.

Foreign key constraints are represented by a dotted line. In the following model, the key member "IMDBID" is a foreign key of the member "Title." A foreign key is a field in one data set that uniquely identifies a field in another data set. See Inferring Data Constraints for information about foreign keys.

SQL Data Sets

A SQL data set corresponds to a JDBC URL used to record database queries with Virtualize (see Creating SQL Responders from a Database Recording). SQL data sets, as opposed to hierarchical and tabular data sets, have an additional abstraction layer in the form of SQL templates. SQL templates are one or more SQL statements that represent the recorded SQL queries.

Templates, statements, and the data set are all represented in the model. The SQL data set is represented by a database icon. The collection of SQL statements that form a template are rendered as a member of the SQL data set. SQL templates are also rendered a record type shape with an auto-generated name in an SQL# format. The member-like rendering of the template is how the set of data appears in Virtualize. The record type-like rendering provides a more human-readable way to understand the template within the context of the model. It also serves as navigation point within the model.

In the following model, the "ParabankSQL" SQL data set references the "SQL9" template by way of the "SELECT i..." member. 

The member containing the statements is truncated to fit in the icon, but you can click on the member to view details in the sidebar.

You can also click on the SQL template to view references, the parameters in the template, and results of the SQL query.

SQL data sets also have the concept of a result set. The result set is a representation of the columns returned by the SQL template. Result sets are rendered as both a member of the SQL template and as a record type-like object–similar to how templates are rendered as two objects in the model. Clicking on the ResultSet# object shows the member columns in the sidebar.  


Navigating Models

Click in the search field to look for specific members, SQL templates, and other components in the data set. Begin typing to filter search results.

Objects that represent data sets link to the data table in a new tab. Clicking on a link opens the table data view in a new tab.


  • No labels