MATLAB DATABASE TOOLBOX RELEASE NOTES Podręcznik Użytkownika Strona 376

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 684
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 375
6 Using Database Toolbox Functions
6-34
Display Database Metadata
This example shows how to display database information for database connection objects
using the command line. To view the database structure quickly, use Database Explorer
to explore the tables and column names. Here, metadata refers to the information about
the database structure and various database properties.
Create the Database Connection
Create a connection conn using the dbtoolboxdemo data source.
conn = database('dbtoolboxdemo','admin','admin');
Create the Database Metadata Object
Create a database metadata object dbmeta using conn.
dbmeta = dmd(conn)
dbmeta =
DMDHandle: [1x1 sun.jdbc.odbc.JdbcOdbcDatabaseMetaData]
Display Database Properties
Display the database properties dbprops of the database metadata object dbmeta.
dbprops = get(dbmeta)
dbprops =
AllProceduresAreCallable: 1
AllTablesAreSelectable: 1
DataDefinitionCausesTransactionCommit: 1
...
For details about the database metadata properties returned by get, see the methods of
the DatabaseMetaData object on the Oracle Java website:
http://docs.oracle.com/javase/7/docs/api/java/sql/
DatabaseMetaData.html.
Display the properties props this database supports using dbmeta.
props = supports(dbmeta)
Przeglądanie stron 375
1 2 ... 371 372 373 374 375 376 377 378 379 380 381 ... 683 684

Komentarze do niniejszej Instrukcji

Brak uwag