Database Toolbox | ![]() ![]() |
Introduction
This tutorial demonstrates many of the Database Toolbox functions using simple examples.
In addition, for those who are interested in objects and methods, see About Objects and Methods for the Database Toolbox.
Examples 1 through 4 use the SampleDB
data source. Instructions for setting up this data source are in Chapter 1, Installation and Setup. Examples 5 and 6 use the dbtoolboxdemo
data source. Instructions for setting up this data source are in Chapter 1, Installation and Setup. Example 7 is not one you can run exactly as it is written since it relies on a specific JDBC connection and database, however, it serves as an illustration of what you can do. Example 8 shows some simple ways to work with cell arrays. Cell arrays are part of MATLAB's core functionality, but some users may not be familiar with them. Because the Database Toolbox makes use of cell arrays, some simple examples are included here.
If your version of Microsoft Access is different than that referred to in Installation and Setup, you might get different results than those presented here. If your results differ, check your version of Access and check the table and column names in your databases to see if they are the same as those used in this tutorial.
M-files containing functions used in examples 1 through 5 are in the
directory. As you work with the examples in this chapter, you can open the M-files to see the functions and copy them, or you can run the M-files to see the results.
matlab\toolbox\database\dbdemos
For more information on the functions used in this tutorial type doc
followed by the function name, or see the Function Reference section.
![]() | Other Features in Advanced Query Options | About Objects and Methods for the Database Toolbox | ![]() |