Evridb: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
(Created page with "==Introduction== EVRIDB Objects provide connection and query capability for many types of databases. For MySQL, ODBC, and JavaDB databases EVRIDB objects work with no special...")
 
imported>Scott
Line 1: Line 1:
==Introduction==
==Introduction==


EVRIDB Objects provide connection and query capability for many types of databases. For MySQL, ODBC, and JavaDB databases EVRIDB objects work with no special preparations. For other databases a JDBC Driver will be necessary. The object can return a cell array of values (with a mix of datatypes) or a [[Dastaset|DataSet Object]]
EVRIDB Objects provide connection and query capability for many types of databases. For MySQL, ODBC, and JavaDB databases EVRIDB objects work with no special preparations. For other databases a JDBC Driver will be necessary. The object can return a cell array of values (with a mix of datatypes) or a [[DataSet Object|'''DataSet Object''' ]].
 
This object is not heavily maintained for all database types. For more
 
The general workflow of using a EVRIDB object:
 
* Set connection attributes.
* Test the connection.
* Run queries.
 
==Connection Properties==
 
{| border="1" cellpadding="5" cellspacing="0"  style="margin-left:3em"
|-
|valign="top" |
<tt>.type</tt>
| Type of connection (e.g., 'access' 'mysql' mssql') Determines what driver is used. When set, default values will be added to .provider, .driver, and .driver_jar_file where appropriate.
===Microsoft Windows Connection===
* access - Microsoft Access database.
* mssql - Microsoft SQL Server.
* mysql - MySQL database (Windows).
* dsn - Microsoft database (Data Source Name).
===JDBC Type Connections===
* jmysql - MySQL database(JDBC).
* oracle - Oracle database.
* derby - Derby (JavaDB) local database.
===Custom Connections===
* generic - Custom type connection.
|-
|valign="top" |
<tt>.location</tt>
| Folder containing database file (on local file system).
|-
|valign="top" |
<tt>.create</tt>
| Depending on type of database, create database is not already.
|-
|valign="top" |
<tt>.persistent</tt>
| Do not close connection object after creation or query, stored (in appdata 0). When calling multiple times this can help reduce time to return results.
|-
|valign="top" |
<tt>.driver</tt>
| Driver to be used for connection (these must be currently installed on the machine, use the ODBC Manager from Administrative Tools to view currently available drivers on a Windows machine. JDBC must have driver location in .driver_jar_file.
|-
|valign="top" |
<tt>.driver_jar_file</tt>
| JDBC driver jar file location. This is added to the dynamic class path in Matlab.
|-
|valign="top" |
<tt>.provider</tt>
| Only used by ADODB object so this will always be 'MSDASQL'.
|-
|valign="top" |
<tt>.use_authentication</tt>
| Use user authentication when making connection, must provide .username and .pw.
|-
|valign="top" |
<tt>.username</tt>
| User to connect as.
|-
|valign="top" |
<tt>.pw</tt>
| Password to connect as.
|-
|valign="top" |
<tt>.use_encryption</tt>
| Whether or not to use database encryption (derby).
|-
|valign="top" |
<tt>.encryption_hash</tt>
| Hash key for encryption.
|-
|valign="top" |
<tt>.server</tt>
| IP address for database (default location is 'localhost').
|-
|valign="top" |
<tt>.dsn</tt>
| Data Source Name (set up on local computer using ODBC Manager from Administrative Tools). If the database connection remains static, this can be a simple way to manage the connection. See the "ODBC" topic in Windows help for more information on DSN.
|-
|valign="top" |
<tt>.port</tt>
| Connection port number.
|-
|valign="top" |
<tt>.arguments.name</tt>
| Sub structure of additional arguments. This value must be a sting of exactly what is required in the database connection string.
|-
|valign="top" |
<tt>.arguments.value</tt>
| Sub structure of additional arguments. This value must be a sting of exactly what is required in the database connection string.
|}
 
 
'''type''' : type of connection (e.g., 'access' 'mysql' mssql') Determines what driver is used. When set, default values will be added to .provider, .driver, and .driver_jar_file where appropriate.

Revision as of 16:58, 13 June 2013

Introduction

EVRIDB Objects provide connection and query capability for many types of databases. For MySQL, ODBC, and JavaDB databases EVRIDB objects work with no special preparations. For other databases a JDBC Driver will be necessary. The object can return a cell array of values (with a mix of datatypes) or a DataSet Object .

This object is not heavily maintained for all database types. For more

The general workflow of using a EVRIDB object:

  • Set connection attributes.
  • Test the connection.
  • Run queries.

Connection Properties

.type

Type of connection (e.g., 'access' 'mysql' mssql') Determines what driver is used. When set, default values will be added to .provider, .driver, and .driver_jar_file where appropriate.

Microsoft Windows Connection

  • access - Microsoft Access database.
  • mssql - Microsoft SQL Server.
  • mysql - MySQL database (Windows).
  • dsn - Microsoft database (Data Source Name).

JDBC Type Connections

  • jmysql - MySQL database(JDBC).
  • oracle - Oracle database.
  • derby - Derby (JavaDB) local database.

Custom Connections

  • generic - Custom type connection.

.location

Folder containing database file (on local file system).

.create

Depending on type of database, create database is not already.

.persistent

Do not close connection object after creation or query, stored (in appdata 0). When calling multiple times this can help reduce time to return results.

.driver

Driver to be used for connection (these must be currently installed on the machine, use the ODBC Manager from Administrative Tools to view currently available drivers on a Windows machine. JDBC must have driver location in .driver_jar_file.

.driver_jar_file

JDBC driver jar file location. This is added to the dynamic class path in Matlab.

.provider

Only used by ADODB object so this will always be 'MSDASQL'.

.use_authentication

Use user authentication when making connection, must provide .username and .pw.

.username

User to connect as.

.pw

Password to connect as.

.use_encryption

Whether or not to use database encryption (derby).

.encryption_hash

Hash key for encryption.

.server

IP address for database (default location is 'localhost').

.dsn

Data Source Name (set up on local computer using ODBC Manager from Administrative Tools). If the database connection remains static, this can be a simple way to manage the connection. See the "ODBC" topic in Windows help for more information on DSN.

.port

Connection port number.

.arguments.name

Sub structure of additional arguments. This value must be a sting of exactly what is required in the database connection string.

.arguments.value

Sub structure of additional arguments. This value must be a sting of exactly what is required in the database connection string.


type : type of connection (e.g., 'access' 'mysql' mssql') Determines what driver is used. When set, default values will be added to .provider, .driver, and .driver_jar_file where appropriate.