To analyze your data using SQL in MATLAB® without access to a database or driver, use the MATLAB interface to SQLite. After installing Database Toolbox™, you can use the MATLAB interface to SQLite to move data between MATLAB and an SQLite database file. The SQLite connection is different from a database connection created using a JDBC driver. For background information about SQLite databases, see SQLite Home Page. To use all the Database Toolbox functionality, install the SQLite JDBC driver and connect to your SQLite database file using a URL string. For details, see Configuring Driver and Data Source.
The advantages of using the MATLAB interface to SQLite are:
Start working with data immediately after installing the Database Toolbox by creating an SQLite database file.
No installation or administration of software or drivers required.
Share data using SQLite database files.
Support for Windows®, Linux®, and Mac.
The following table describes the differences between the MATLAB interface to SQLite and connecting to an SQLite database using the JDBC driver.
SQLite Connection Using the MATLAB Interface to SQLite
SQLite Database Connection Using a JDBC Driver
Database connection function
Run stored procedures
Other complex database operations and functionality
To connect to a database quickly and import data, use the MATLAB interface to SQLite. These steps provide a high-level workflow for using the MATLAB interface to SQLite.
Create an SQLite database file using
sqlite. The SQLite database
file has a
Create tables in the SQLite database file using
Export your data into the SQLite database file using
Import data into MATLAB using
Perform data analysis in MATLAB.
Export results into the SQLite database file using
Close the SQLite connection using
Share the SQLite database file with others.
The limitations of using the MATLAB interface to SQLite are:
CHAR data types are supported.
NULL values in columns are not supported.
Database Explorer is not supported. Use the command line.