Schema Validator

    Introduction

    The Schema Validator is a tool designed to ensure the integrity and correctness of database schemas. This tool helps to identify and resolve issues within the schema, ensuring that it functions correctly and efficiently. In order for the validation to proceed, the schema does not have to be connected.

    There are two options to access the schema validation wizard:

    • Navigate to Tools > Validate Schema. Using this path, IJS file of the schema to be validated has to be provided. For Derby databases, the IJS file must be located in the same project folder as the local database. For non-Derby databases, the IJS file can be located anywhere.

      images/instantjchem/schema-validator/validator-1.png/
    • The right-click on the schema in Projects tab and choose Validate Schema... This option automatically loads the corresponding IJS file.

      images/instantjchem/schema-validator/validator-2.png/

    Monitoring Validation

    The validation process can be observed through two progress bars: the top bar represents the total progress of the validation, while the bottom bar shows the progress of individual steps. The process is logged, and the output can be copied to the clipboard or accessed via View > Instant JChem Log File > Schema Validation.

    Schema validation can run in the background, allowing Instant JChem to remain fully operable. Multiple validation processes can run simultaneously.

    images/instantjchem/schema-validator/validator-4.png/

    Schema Validation Process

    When the schema validation is initiated, the following are being validated, among others:

    • IJS File Validation: Ensures the XML structure is valid and free of duplicate keys.
    • Schema Tables Validation: Confirms required tables and columns exist with correct types, including primary and foreign keys.
    • XMLs in Schema Validation: Validates the XML files and their required structures.
    • Field Validation: Identifies issues with missing, renamed, or mismatched columns and checks numeric precision and parent IDs.
    • Entity Validation: Confirms the existence of necessary tables.
    • Datatree Validation: Ensures root entities and relationships exist and are correctly referenced.
    • Relationship Validation: Verifies entities, fields, relationship types, and identifies duplicates or cyclic definitions.
    • Script Validation: Checks scripts for compatibility and necessary parent items.
    • Query & List Validation: Ensures required fields, datatrees, and parent items are present.
    • View Validation: Verifies binding entities, fields, and widget bindings are correct.
    • Sharing Validation: Detects inconsistencies in shared and user-owned calculated fields.

    Schema Validator in Plexus Connect

    The schema validator can be also run during deployment of Plexus Connect web app. For more information navigate here.