Documentation

Working with Database Explorer

If you are using Database Explorer for the first time, migrate from Visual Query Builder (VQB) and set Database Explorer preferences. After performing these tasks, you are ready to configure data sources and connect to your database.

Getting Started with Database Explorer

Database Explorer is a Database Toolbox™ app for connecting to a database and interacting with database data. You can configure ODBC and JDBC data sources, modify database connections, and work with multiple databases. You can also display data from a database table, explore data from multiple database tables, and import data to the MATLAB® workspace for analysis. Once you create queries using Database Explorer, you can generate code. For details, see:

Migrate from VQB to Database Explorer

Database Explorer replaces VQB as an app for exploring the data in your database. If you are using VQB, to help migrate from VQB to Database Explorer, refer to these points:

  • If you use VQB (querybuilder) to access a JDBC data source, before starting Database Explorer for the first time, execute this command. You cannot use the same JDBC data source with Database Explorer.

    setdbprefs('JDBCDataSourceFile','')
    Then, define your JDBC data source using Database Explorer.

  • If you use VQB to export data from MATLAB to your database, use the command-line functions datainsert or fastinsert.

  • If you use VQB to generate reports, use MATLAB reporting and plotting functionality to generate reports. You can also use MATLAB Report Generator™ to generate reports.

  • If you use VQB to display charts, use the MATLAB plotting tools to generate charts and graphics.

  • If you generate MATLAB files using VQB, open Database Explorer and recreate your SQL query. Use Database Explorer to generate a script (.m file) that includes your SQL query, preference settings, and connection.

  • If you save your SQL queries using VQB, open Database Explorer and recreate your SQL query. Use Database Explorer to generate a script with just your SQL query. Save the SQL script file with a .sql extension in MATLAB.

Set Database Explorer Preferences

  1. On the Database Explorer Toolstrip, select Preferences to open the Database Explorer Preferences dialog box. These preference settings apply only to Database Explorer.

  2. Specify the Preferences settings that apply to Database Explorer as described in the following table.

    PreferenceAllowable ValuesDescription

    Data Preview size

    510,000 rows

    The number of rows that you see in the Data Preview pane of Database Explorer.

    Import batch size

    1,0001,000,000 rows

    The number of rows fetched at one time from a database. When importing large amounts of data using Database Explorer, tune this value for optimum performance. For details, see Preference Settings for Large Data Import.

    Select Database Toolbox to manage additional preferences for Database Toolbox. For details, see Working with Preferences. Alternatively, use setdbprefs to specify preferences for the retrieved data.

  3. Click OK.

See Also

|

More About

Was this topic helpful?