Establishing a parent-child relationship among schemas

When you want to apply the referential integrity rules among multiple non-JDBC schemas, you must establish a parent-child relationship among schemas on the Schema Canvas page.

Before you begin

You must have completed the following tasks:

About this task

When you want to maintain a logical relationship among multiple schemas, then you must establish a parent-child relationship among those schemas. The parent and child schemas must be related to each other by using common item types. The item type of the parent schema is designated as the Primary key, and the same item type of child schema is designated as the Foreign key.

The referential integrity among the parent and child schemas in HCL OneTest™ Data supports the following relations:

  • One-to-one
  • One-to-many
  • Many-to-one
  • Self-reference
Notes:
  • You can establish relationships only among non-JDBC schemas.
  • The item types that relate to parent-child schemas must be of the same data type and size.

Procedure

  1. Log in to HCL OneTest Server and open the team space that contains your project.
  2. Open your project.
    The Overview page is displayed.
  3. Click Author > Data Fabrication.
    The Data Fabrication page is displayed.
  4. Click Schema Canvas.
    The Schema Canvas page is displayed.

    You can view the structural view of all the imported schemas and their relationships with each other.

    Note: You can use the scroll wheel or pinch-to-zoom option on the Schema Canvas page to view the structural view of all schemas and relationships.
  5. Identify the schemas for which you want to establish a parent-child relationship.
  6. Click the item type of the parent schema that you want to use as a Primary key.
  7. Move the mouse from the item type that acts as a Primary key of the parent schema to the item type of the child schema that must act as a Foreign key.
    A line is drawn between the parent schema and the child schema to represent the relationship among both the schemas.
  8. Repeat the steps to establish multiple relationships among the other schemas, if required.

Results

You have established a relationship among multiple non-JDBC schemas.

What to do next

You must select schemas on the Schema Canvas page to generate the test data. See Selecting schemas.

You can click the Modify canvas button to modify or remove the selection of schemas that you imported into the Schema Canvas. See Modifying the selection of imported schemas.