More Database Toolbox™ functions support the native ODBC interface for exporting data and retrieving database information and metadata. For a list of supported functions, see Connecting to a Database Using the Native ODBC Interface.
|Functionality||What Happens When You Use It?||Use This Instead||Compatibility Considerations|
|Warns||Replace all instances of |
mapreduceto data contained in relational databases
work with large amounts of data in relational databases. Write custom
functions to implement
mapreduce to process large
amounts of data. To create a
must create a
DatabaseDatastore object. This object
is a type of datastore.
Determine if a
Display the first eight records in a
Read data in a
Read every record in a
Reset the cursor position in a
Fetch data sequentially or scroll up or down in the data without executing the query again. Scrolling within the data offers advantages when you are working with a large data set. An advantage of scrollable cursors is reading data in the middle of a large data set using the cursor position offset.
Support for native ODBC database connection for Windows® platforms. The native ODBC interface is available only for the command line. To use this interface, see Using the Native ODBC Database Connection. The native ODBC interface supports the following functions:
tabledata type support
You can return a
table data type rather than
a cell array. Use the
to set the database preference for the
Database Explorer, which is the Database Toolbox GUI for connecting
to a database and importing data to the MATLAB® workspace. Alternatively,
you can start Database Explorer by selecting Database Explorer from
the Database Connectivity and Reporting section
of the Apps tab in the MATLAB Toolstrip.
lets you execute SQL commands from a
on a connected database, and store the results in a
You can input the results from executing
functions that accept
cursor array inputs.
When using a JDBC driver, you can input individual connection
properties to the database constructor,
The preferences you set using the Preference dialog box or the
now persist across MATLAB sessions.
In releases before R2011b, if you changed your preferences during a MATLAB session, these preferences would not remain in the next MATLAB session.
Many warning and error IDs have changed from their previous versions. These warnings or errors typically appear during a function call.
If using warning or error IDs, you might need to change the
strings you use. For example, if you turned off a warning for a certain
ID, the warning might now appear under a different ID. If you use
try/catch statement in your code, replace the
old identifier with the new identifier. There is no definitive list
of the differences, or of the IDs that changed.
New enhanced error messages provide more information about the
error. For example, the 2009b error message
Drivers not Found/Loaded is
Drivers not Found/Loaded. Please verify that login information
and database url are valid in 2010b. This error will appear
when the driver input is valid but the database URL is invalid.
setdbprefs function now accepts a structure
as input. For example, you can run the following commands to assign
s.DataReturnFormat = 'numeric'; s.ErrorHandling = 'report';
You can also do this for other
whose values you want to change. Then set the preferences using the
s by running the command:
For more information, see the
When you run a query in the Visual Query Builder and select File > Generate M-File, the resulting M-file now includes a placeholder string
database statement. If a password is required
for the connection, such as for connections established via JDBC drivers,
substitute the password for the
If no password is required, the M-file will run as is. For more information,
The generated M-file assigns values for the preferences to the
s. For more information, see the
When you use
view the data sources for your system, ensure that you view all data
sources by specifying a temporary, writable, output directory using
the new preference,
is useful when you add data sources and do not have write access for
the MATLAB current directory, where the toolbox temporarily writes
ODBC registry settings. Without write access,
not always return data sources you added. In that event, run
specify a value for the
where the value is the full path name to a directory for which you
have write access.
The new function,
the specified SQL query and imports results into the MATLAB workspace,
given the connection handle
conn. It is provided
for convenience, to combine capabilities of the existing
In statements and code, do not specify
rather, just specify
fetch with the appropriate
objects provided as arguments; the toolbox runs
appropriate based on the arguments.
not return a cursor object on which you can run subsequent Database Toolbox functions,
but rather returns all data to a MATLAB variable. For more information
database.fetch and how it differs from
page, as well as the
The new function,
imports data into the MATLAB workspace from multiple resultsets,
which you retrieve via an
exec call to a stored
procedure that contains two or more
The new function,
executes a stored procedure using input parameters specified in a
cell array to return output parameters. This allows you to retrieve
the value of a variable into a MATLAB variable.
a limitation of
exec; when you run a stored procedures
exec, you can only retrieve resultsets.
You can now specify the catalog and schema for a data source
using the Visual Query Builder. The
none, meaning you do not need to select values for them.
instructs the Visual Query Builder to search the Microsoft Windows registry
to find any ODBC data sources not uncovered using the system
In Version 7.3 (R2006b) of the MATLAB software, a change was made to how a nonscalar structure array field is assigned to a single MATLAB variable. For more information, see Assigning Nonscalar Structure Array Fields to a Single Variable in the MATLAB Release Notes.
As a result of this change in the MATLAB software, you may need to modify your Database Toolbox M-files.
There is a new function,
that you can use instead of the
to export data about three times more quickly than
It also allows exporting for all object types, so that any data you
can retrieve from a database you now can export to the database, including
While there are no known problems with
if you receive unexpected results, return to using
insert and report
the problem with
fastinsert via Technical
Note that the Visual Query Builder insert feature uses the
You now can use the Visual Query Builder (VQB) with JDBC drivers on Windows platforms. Previously, only ODBC drivers were supported.
now displays an enhanced dialog box you use to define JDBC data sources.
With it, you save and load data source information via MATLAB MAT-files.
For details, see Setting Up JDBC Data Sources in the Database Toolbox documentation.
The Visual Query Builder now includes two new items under the Query menu:
Define ODBC Data Source—Directly access your Windows ODBC Data Source Administrator dialog box where you define ODBC data sources.
Define JDBC Data Source—Access
the Define JDBC Data Source dialog box for defining JDBC data sources
to use with the VQB. The function equivalent is
When you define a JDBC data source, the information is saved in a
MAT-file so you can use it again in a later session. Later, open the
MAT-file using the Define JDBC Data Source dialog box, or using
For details, see Configuring Your Environment in the Database Toolbox documentation.
New arguments are supported for defining the JDBC data source
MAT-file. For details, see the
You can dynamically add a JDBC drivers file to the MATLAB Java®
javaaddpath function. You can
use this method instead of adding a pointer to the JDBC drivers file
classpath.txt file. The advantage of using
that you do not have to restart the MATLAB software session after
javaaddpath statement. The disadvantage
is that this only applies to the current session and so you need to
javaaddpath statement in each new session.
For details, see Setting
Up JDBC Data Sources in the Database Toolbox documentation.
You now can retrieve 64-bit
FLOAT data using Microsoft SQL Server software.
After running a query using the Visual Query Builder, you can
generate an M-file consisting of Database Toolbox functions that
perform the query. This is useful if you know how to run queries with
the VQB and want to determine the equivalent functions, particularly
the SQL statements in
update function has been enhanced so
that you can export multiple records based on different
The number of
where clauses must equal the number
of records in the array of data you are exporting. For details, see
the reference page for
|Release||Features or Changes with Compatibility Considerations|
|R2015b||Functionality being removed or changed|
|R2006b||MATLAB Change to Assignment of Nonscalar Structure Array Fields Might Impact Database Toolbox Users|