Add a meta-schema to the project (4dbx)

Your application will access the sample officestore database. You must create a meta-schema file based on this database.

About this task

The file for a SQLite database named officestore.db, is located in My Genero Files/samples/OfficeStoreRes/database-sqlite/. From this database, you create a .4dbx schema file. It contains the information about the tables, columns, and relations of the relational database that is needed by your application. It is used to create items in your Business Application Diagram (4ba).

  1. Select the officestore.db file located in the My Genero Mobile Files/samples/OfficeStoreRes/database-sqlite/ directory and copy it to the database directory of your project directory.
  2. Select Database > Extract Schema....
    The New Meta-schema dialog opens.
  3. Complete the Meta-schema file step.
    1. Click on the File Browser icon next to the Meta-schema file path field.
      The Save File As dialog opens.
    2. Navigate to your project directory and select the database directory. Enter officestore in the File name field. Select Genero Database Schema Files (*.4dbx) in the Save as type combobox.
      Important:

      Make sure the file created is a .4dbx file, because this is the database meta-schema file for generated applications.

      Click Save.

    3. Ensure the Insert the file in the project check box is selected, select the src/Database node, and click Next.
  4. Complete the Connection information step.
    1. Select "SQLite" as the Database type.
      The Database driver defaults to "dbmsqt".
    2. Click on the File Browser icon next to the Database file field.
      The Choose database schema file dialog opens.
    3. Select the officestore.db file located in the database directory of your project directory, and click Open.
      The database file is populated.
    4. Click Test Connection to verify that the connection is successful, then click OK to close the connection test dialog.
    5. Click Finish.
      The officestore.4dbx file is created and opened.
      Tip:

      To make the diagram more readable, right-click inside the .4dbx diagram and select Layout.

  5. Select File > Save All.