Choose Between ODBC and JDBC Drivers
Defining Database Drivers
Database vendors, such as Microsoft® and Oracle®, implement their database systems using technologies that vary depending on customer needs, market demands, and other factors. Software applications written in popular programming languages, such as C, C++, and Java®, need a way to communicate with these databases. Open Database Connectivity (ODBC) and Java Database Connectivity (JDBC) are standards for drivers that enable programmers to write database-agnostic software applications. ODBC and JDBC provide a set of rules recommended for efficient communication with a database. The database vendor is responsible for implementing and providing drivers that follow these rules.
Deciding Between ODBC and JDBC Drivers
ODBC is a standard Microsoft Windows® interface that enables communication between database management systems and applications typically written in C or C++.
JDBC is a standard interface that enables communication between database management systems and applications written in Oracle Java.
Database Toolbox™ has a C++ library that connects natively to an ODBC driver. Database Toolbox has a Java library that connects directly to a pure JDBC driver.
Depending on your environment and what you want to accomplish, decide whether using an ODBC driver or a JDBC driver meets your needs.
Use native ODBC for:
Fastest performance for data imports and exports
Memory-intensive data imports and exports
All functionality except the
runstoredprocedure
function
Use JDBC for:
Platform independence, allowing you to work with any operating system (including Mac and Linux®), driver version, or bitness
Access to all Database Toolbox functions
The only limitation for these drivers is memory performance. MATLAB® memory restricts the native ODBC driver. However, both MATLAB and JVM™ heap memory restrict the JDBC driver.