Extract a meta-schema information from a database

The New Meta-schema dialog assists in extracting schema information from a database.

To extract a database meta-schema file from a database, you must have access and permissions for the database. If you have trouble connecting to a database, make sure the database and the corresponding database client software are installed and configured properly.

When you extract the meta-schema information from the database, you overwrite the existing schema. Any user changes that had been made to the schema are lost when using the extract schema option. If you wish to keep user changes, you must update the schema. See Update a meta-schema from database.

Note:

When the schema is extracted from a database, function-based indexes are ignored.

  1. Select Database>>Extract Schema. The first step is specifying the name and location of the meta-schema file.
    Figure: New Schema dialog

    This figure is a screenshot of the New Meta-schema dialog - Step 1.
    Meta-schema file path
    Enter the name and path for the new database meta-schema file. Specify a .4db file extension for standard projects, or a .4dbx file extension if you are working with a Business Application Modeling managed project.

    You can either click on the browse button to browse for a location on disk, or you can enter the full path and filename directly in the Meta-schema file path field. If you browse for the location, you select the file type in the Save as type combobox when saving the file. If you enter the filename directly, you must ensure that you specify the correct file extension (.4db or .4dbx) .

    Insert the file in the project
    Check this box to add the meta-schema file in the project. Select the node where the file should be added.
  2. Click the Next button to continue to Connection information. This connection information is only used to extract the information for the database meta-schema file from the referenced database.
    Figure: Connection information

    This figure is a screenshot of the New Meta-schema dialog - Step 2.
    1. In the Database Connection Information section, select either Use explicit settings or Use external settings.
      Use explicit settings, previous connection
      You can use a previous connection that was created for the same database. The drop down list provides a list of the existing connections.
      Use explicit settings, database type
      You can enter the Database Type by selecting the desired type from the drop down list, and the corresponding information for that type. The Database driver for the database type is automatically entered. If other drivers exist, they are available in the drop down list.
      Use external settings
      Information in the FGLPROFILE configuration file is used to extract the corresponding connection information for the specified database. Genero Studio will use the schema name that you entered to check for any related entry in the FGLPROFILE configuration file, and will use those values to define the connection. See information on the FGLPROFILE file in the Genero Business Development Language User Guide.
    2. In the Database User Information section, provide the necessary database user details. The required information varies based on the database type selected. See Provide database connection and user information.
    3. Click Test Connection to verify that the information is correct and that you are able to access the database.
  3. Click the Next button to continue to Extraction Options. Select the options for the meta-schema file.
    Figure: Extraction options

    This figure is a screenshot of the New Meta-schema dialog - Step 3.
    Case sensitivity
    Specify how case in database object names should be handled.Case sensitive: case won't be changed on database objects, Lower case: database object names will be converted to lower case, Upper case : database object names will be converted to upper case.
    Import system tables
    Check this box to include system tables in the schema.
    Ignore errors
    Specify that conversion errors should be ignored. If this option is unchecked, the extraction will stop as soon as an error occurs (for example, if a table column has an unsupported type.)
    Conversion method
    Select the type of conversion you wish for the specific data types; the default choice is Type A.
  4. Click Finish to begin the extraction process.
    If you didn't already do so, save the database meta-schema file in a node in the project; the database meta-schema will be added to the DB Schemas tab and made available to other modules.

    Any application that uses the meta-schema file must have a dependency to the node where the meta-schema file was added. See Add a meta-schema to a project.