Creating a Data Set from a Database

From Rave Documentation
Revision as of 01:03, 21 November 2012 by Matt (Talk | contribs) (Introduction)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NOTE: This page contains information about a future version of Rave. Your version can't do this yet.

Introduction

If you have the MATLAB Database Toolbox, Rave can pull data from a compatible database to use as a Rave data set. This page describes the steps you need to take to link Rave to a database and describes how Rave behaves differently when your data is stored in a database.

Preparing a Database for use with MATLAB

To link Rave to a database, you must have the Database Toolbox installed. If you do not have the database toolbox, you cannot use Rave with your databases.

To connect to a database, you must first set up a connection in MATLAB. This only needs to be done once, ever, for each data source. (Not every time you start Rave or MATLAB, or even if you install a new version of Rave or MATLAB)

  1. Type "querybuilder" to open the Visual Query Builder dialog box.
    1. If you get an error, it means you don't have the Database Toolbox installed.
  2. Select "Define ODBC Data Source" from the Query Menu.
  3. Follow the prompts to create a new data source (see MATLAB help for more information).
  4. Note the name that you give your data source. This is what you will type into Rave to link to this database.
  5. When you are done, close the Visual Query Builder

Tip: If you forget what you named the data source, you can see a list of all data sources you have defined by typing "getdatasources" at the MATLAB prompt.


Creating a Rave Data Set from a Database

To work with data from a database in Rave, first complete the steps above. Then:

  1. Open Rave. On the Manage Tab, click Manage Data Sets
  2. Enter the data source name that you defined in step 3 above in the "Choose source file" text box. Enter any text in the "Name this data set" text box. (Rave will not use this information, but it won't let you click the Create this Data Set button while if this box is empty.)
  3. Click "Create this Data Set"
  4. You will be prompted for a user name and password. If your database does not require a login, leave these blank and hit Ok.
  5. Next you will see a list of the Tables contained in your database. Highlight the tables that contain data that you wish to use in Rave. Rave will create one data set for each Table you select. Press Next when you are done.