Importing a Database
To use a database in an application, you first need to import it into the project. This import process gives WaveMaker Studio all the connection and authentication information it needs to connect to your database. To import a database, follow these steps:- Open the project in which you want to use the database.
- Choose the Database Import option in the Create menu in the Main Menu bar.

- The Import Database dialog appears. This dialog contains fields for configuring the connection to a database. There are two sections to this dialog: one for basic options and one for advanced options.
- In the "Basic Options" section, type in a name for the Data Model in the Service Name field. You can just give it the same name as the database or you can use a different name. The name can contain only alphanumeric characters.
- Below the Service Name field, the screen shows a Username field and a Password field. This is where you type a valid username and password for this database connection.
- Next select a database system from the Database System pull-down menu. The rest of the configuration options depend on which system you choose. See Basic Settings to see the instructions for your database system.
- In most cases you will not need to worry about Advanced Settings. If you need them, see Advanced Options.
- Click the Test Connection button. You should get a "Connection Successful" message. If the test fails, go back and make sure your settings are correct.
- Click the Import button. WaveMaker Studio begins importing the database (this could take a few minutes). When the import is complete, the Data Model Editor shows you the LiveTables (LiveTables) that you have just created.
- Save the project.
Basic Settings
The "Settings" area of the Import Database screen allows you to choose what type of database you want to import and configure the basic required settings. Note: The Settings area is collapsed if the "Advanced Options" area is expanded. Click on the Settings bar to see the Settings area again. For more on advanced configuration options, see Advanced Options. When you choose your database type the Database drop-down menu, the configuration for that type of database appear. The configuration fields are different for the different database types:DB2
When you import a DB2 database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose DB2.
- Host: The network host for the DB2 database. Default value is localhost.
- Port: The port number for the DB2 database.
- Database: The name of the database.
HSQLDB
When you import an HSQLDB database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose HSQLDB.
MySQL
When you import a MySQL database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose MySQL.
- Host: The network host for the MySQL database. Default value is localhost.
- Port: The port number for the MySQL database.
Oracle
When you import an Oracle database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose Oracle.
- Host: The network host for the Oracle database. Default value is localhost.
- Port: The port number for the Oracle database.
PostgreSQL
When you import a PostgreSQL database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose PostgreSQL.
- Host: The network host for the PostgreSQL database. Default value is localhost.
- Port: The port number for the PostgreSQL database.
SQL Server
When you import a SQL Server database, you will need to type the following settings into the "Database Connection" screen:- Database System: The type of database you want to import. Choose SQLServer.
- Host: The network host for the SQL Server database. Default value is localhost.
- Port: The port number for the SQL Server database.
- Database: The name of the database.
Advanced Options
For advanced users, WaveMaker Studio provides some advanced configuration options.The following options are available:- Connection URL: When you import a database using the standard configuration options on the Import Database screen, WaveMaker Studio creates a JDBC URL for you. This URL is shown here in the Connection URL field. If you know what you are doing and want to change this JDBC URL, you can do it here.
- Java Package: WaveMaker Studio generates Java classes for you when you import a database. If you want a different Java package name than the default name we generate, type it in here.
- Table Filter: By default WaveMaker Studio imports all the tables in the database. If you want to import only a subset of the tables, type in a comma-delimited list of regular expressions here.
- Schema Filter: When you are importing a database that supports schemas, WaveMaker Studio imports only the tables for the default schema. If you want to import tables from other schemas, add the schema names in this field.
- Driver Class: JDBC driver class name. WaveMaker Studio creates a JAR file for each database that uses a sepcifed dirver. If you want to use a different JAR file for connecting, specify it here (the JAR file must be in the Application Server's class path).
on 12/02/2009 at 17:15


