Create a SQLite named “test” DB using the demo.vmd

In this tutorial we will create a SQLIte database called “test” and create tables that match those defined in the “example/demo.vmd” installed with Iguana. This database is used in several of our tutorials and other examples.

You can also change the database name and/or substitute your own VMD file, see the Note after the tutorial steps.

Note: The code that reads the table information from the VMD file is a bit obscure! But that is why we created it for you, so you don’t have to worry about how it works.

Tip: For all other databases you can use the VMD file to create tables in the Script Editor or from the Channel Properties.

Tutorial Instructions [top]

  1. Create a temporary channel, with the the following settings:
    • Source = LLP Listener
    • Destination = To Translator
    • Channel name = Create SQLite DB
  2. Open the Translator by clicking the Edit Script link at the bottom of the Destination tab.
  3. Download and import the project file.
  4. Confirm that the database and tables are created.
    Click on the Result Set annotation on line 18 to confirm that the tables are created:
    Screen Shot 2014-10-03 at 11.40.23
    Tables patient and kin were created (if you use a different VMD the table names may be different).
  5. Delete the temporary channel.

Note: To customize the database name and/or VMD file:

  1. After step 3 above
  2. Change the global variables for the database name and/or VMD
    1. Change SQLITE_DB to your desired database name.
    2. Change VMD_FILE to the path of your VMD file.

      For example:
  3. Then complete steps 4 and 5.

Tip: You can also use an existing channel to create a SQLite database. Just save a milestone, load and run the project file, then revert to milestone you just saved.

More Information [top]

Leave A Comment?