
Toolbox: scidb

Title: Database toolbox

Summary: Connect to databases, execute queries, load data to/from DB from/to Scilab environment

Version: 0.1

Author: Igor Gridchyn
 Sylvestre Ledru
 Pierre Marechal
 Allan Cornet

Maintainer: Igor Gridchyn <igridchyn@gmail.com >
 Allan Cornet <allan.cornet@scilab.org>

Category: Data Acquisition
 Data Handling

Entity: private individual

WebSite: http://forge.scilab.org/index.php/p/scidb/

URL: http://atoms.scilab.org/toolboxes/scidb/0.1

License: CeCILL

ScilabVersion: >= 5.1

Depends: 

Date: 2011-05-12 11:11:51

Description: The aim of this moculde is to add ability for database interaction to Scilab.
 
 After connecting to a database, you can execute queries against it and perform
 data exchange between Scilab environment and the database.
 
 Supported database providers: PostgreSQL, Sqlite, MySQL, MSSQL, ODBC, Firebird.
 
 To start work with db, connect to it using one of two versions of DbConnect:
 
 Connection = DbConnect(provider, connectionString)
 Connection = DbConnect(connectionStruct)
 
 provider:
   Type: String
   Possible values: “PSQL”, “SQLITE”,  “MYSQL”, “DB2”, “OCI”,
 “ODBC”, “SQLITE2”, “TDS”
 
 connectionString
   Type: String
 
 connectionStruct
   Type: Struct
   The fields of the struct are:
    –provider (mandatory)
    –host (optional)
    –port (optionnal)
    –database (optional)
    –user (optional)
    –password (optional)
 
 
 The last database, to which connection was established becomes default. This
 means, you do not have to provide a Connection object every time with further
 queries to DB.
 
 Examples:
 
 
  DbConnect(&quot;postgresql&quot;, ..
    &quot;Server=127.0.0.1;Database=myDataBase;User
 Id=myUsername;Password=myPassword;&quot;);
 
 
 connexionStruct          = struct();
 connexionStruct.provider = &quot;postgresql&quot;;
 connexionStruct.database = &quot;myDataBase&quot;; 
 connexionStruct.hostname = &quot;127.0.0.1&quot; ; 
 connexionStruct.use      = &quot;myUsername&quot;; 
 connexionStruct.password = &quot;myPassword&quot;; 
 DbConnect(connexionStruct);
 
 
 After connecting, you are able to execute queries and obtain a result handler,
 which later can be used to aquire data using functions
 DbFetch[All]{String|Real|Struct}:
 
 resultHandle = DbQuery(&quot;SELECT * FROM data_table&quot;); //default
 connection is used
 results = DbFetchReal(resulthandle); // results is a Scilab matrix
 
 You will find a detailed description in SEP file or in help of the module.

