DATABASELINK TUTORIAL

Introduction to DatabaseLink
This feature is not supported on the Wolfram Cloud.

Background

Data storage, indexing, and retrieval have long been crucial tasks of many large organizations such as governments, banks, hospitals, and libraries. As human societies have grown increasingly complex, data management requirements have also increased. Some of the new challenges include the complexity of what the data represents, how the data is used, and the sheer volume of data. Since the development of modern electronic computers in the latter half of the twentieth century, tools such as relational database management systems (RDBMS) and the Structured Query Language (SQL) have become standards that are widely used for data handling in many different types of organizations.

In a typical organization, many different users need to access the data management system, and hence many database applications are server based. They can be combined with other server-based technologies, often called enterprise technologies, such as web servers, web services, and remote computing heterogeneous architectures.

At the current time, there are many different database systems. These range from largescale, expensive commercial applications that are suitable for highend uses to freely available opensource tools running on personal computers with operating systems such as Microsoft Windows or Linux.

DatabaseLink is a Wolfram Language application that provides a set of tools allowing convenient integration of the Wolfram Language with database management systems.

Wolfram Language Database Applications

There are a number of important benefits that can be gained from integrating the Wolfram Language into a database system.

The Wolfram Language contains a large collection of functions for numerical and symbolic computation that can be applied to data taken from a database. After the computations have been completed, the results can be stored in a database application, allowing the Wolfram Language to work on the results at a later time. The Wolfram Language might be used for statistical processing, modeling, or computing some optimal configuration. All of these computations typically require and produce data that can conveniently be stored in a database application.

Database applications can be integrated with many other application types, providing an important form of interoperability. Data derived from one application can be stored in the database. Then, elements of this data can be retrieved by the Wolfram Language, used for computation, and the results stored in the database. Finally, another application can extract these results and use them for some further purpose. The central database application is the hub of this computational network; its interaction with the Wolfram Language is made possible by DatabaseLink.

Features of DatabaseLink

  • Connectivityworks with most standard SQL database applications and with databases that are local and network based (including different types of computers).
  • The HSQL Database Engine (HSQLDB), SQLite, H2, and Derby lightweight databases useful for database applications if you do not have an existing database.
  • Supplied driversbuiltin support for many important databases, including MySQL, PostgreSQL, Open Database Connectivity (ODBC), Firebird, and HSQLDB.
  • SQL command interfaceyou can exploit your knowledge of SQL without learning a new system.
  • The Wolfram Language command interfaceuseful if you are familiar with Wolfram Language programming.
  • GUI interfacesthe Database Explorer and the Connection Tool provide convenient tools for opening connections and querying the database.
  • Access to data and metadatayou can inspect the names of tables and columns, as well as the data in each entry.
  • Configurablecommon tasks can be simplified and Wolfram Language applications can add their own database information.
  • Batch supportprovides efficiency when making repeated changes to a database.
  • Data type supportworks with standard SQL data types, including numbers, strings, binary data, date and time, and Wolfram Language expressions.
  • Support for advanced featuressuch as multiple connections and transactions (including rollbacks and savepoints).
  • Secure Socket Layer (SSL) supportsecurity for communications with the database.

DatabaseLink Technology

DatabaseLink is based on the commonly used Java database connectivity (JDBC) technology, java.sun.com/products/jdbc. The package makes extensive use of the Wolfram Langauge Java toolkit J/Link, (www.wolfram.com/solutions/mathlink/jlink), though no Java programming is required. The Database Explorer uses the Wolfram Language graphical user interface toolkit GUIKit, www.wolfram.com/solutions/guikit.

DatabaseLink comes with a selection of drivers for a number of databases. If it does not include a driver for your database, you can install your own driver, as described in "Database Connections: JDBC Connections".