This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Schema and Catalogs

Database schema and catalogs can be used to hold collections of database components and objects suitable for particular users. They can be particularly useful when working with large databases. The functions SQLSchemaNames and SQLCatalogNames can be used to learn the names of the schema and catalogs in the database. These can be used with the "Schema" and "Catalog" options to SQLTableNames, SQLTableInformation, SQLTables, SQLColumnNames, SQLColumnInformation, and SQLColumns to focus attention on particular parts of the database.
SQLCatalogNames[conn]list all the catalogs used in a data source
SQLSchemaNames[conn]list all the schema used in a data source
SQLSchemaInformation[conn]returns information about the schema used in a data source

Listing catalogs and schema.

If you find that the examples in this tutorial do not work as shown, you may need to install or restore the example database with the DatabaseExamples` package, as described in "Using the Example Databases".
First, the DatabaseLink package is loaded and a connection is made to the publisher example database.
In[1]:=
Click for copyable input
This returns the schema names for the connection.
In[3]:=
Click for copyable input
Out[3]=
SQLSchemaInformation returns more information about the database schema.
In[4]:=
Click for copyable input
Out[4]=
This returns the catalog names; for this database there are not catalogs.
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input