====== Database Drivers ====== The page gives an overview about the Java Database Drivers within Orbit. \\ All documentation about databases in Orbit : [[180:technology:core:databases|]]. ===== What is a Database Driver ===== To establish a java Database Connection, a database driver is required. Many databases provide a Java class to access their database using the SQL language. These are JDBC drivers. \\ \\ Orbit supports all jdbc database drivers. But it is up to the user to manage and update the jdbc drivers which are provide by the database platforms. \\ ===== Install and Define Driver ===== * For Orbit GIS Standalone or Orbit Client : [[180:desktop:preferences:database|Main Toolbar > Preferences > Database]] * For the Orbit EOS Server : [[180:server:console:resources:database|EOS Console > Resources > Database Connections]] ^ Driver configuration ^^ | Name | A Reference Name for the Driver, to be used in the Databases Connections configurations. | | Description | An optional description of this driver. | | Class | The exact name of the Java Class implementing a JDBC driver. \\ This class must be accessible by Java, and thus included in the classpath. | | URL Template| | | Use Jar | Set TRUE to use an external jar-file containing the jdbc database driver. \\ If the database jar-file is placed in the Orbit software directory an external file location does not to be specified. | | Jar Location | Browse the external jar-file in case of Use=TRUE. | | Test Driver | Complete the driver configuration and click the Test Driver button. The result should be "OK". \\ If not, check the Driver Class and Jar settings. In most cases, the given Java Class is not accessible for your JRE (Java Runtime Engine) \\ because it has not been included in the classpath specification. \\ If you're not familiar to this issue, consult your IT-manager or java.oracle.com for details about JDBC and classpath behaviour. | ^ JDBC Driver Registry ^^^ | **Database Reference** | **Download** | **Java Class** | | MS Access (32bit v6) | Default available on less recent Windows systems (*.mdb) | sun.jdbc.odbc.JdbcOdbcDriver | | MS Access (32bit v12,v14) | [[http://www.microsoft.com/en-us/download/details.aspx?id=13255]], \\ Default available on recent Windows systems (*.mdb, *.accdb) | ::: | | MS Access (64bit v12,v14) | [[http://www.microsoft.com/en-us/download/details.aspx?id=13255]] | ::: | | ODBC | Default available on Windows | ::: | | MS/SQL | [[http://msdn.microsoft.com/en-us/data/aa937724.aspx]] | com.microsoft.sqlserver.jdbc.SQLServerDriver | | MySQL | [[http://dev.mysql.com/downloads/connector/j]] | com.mysql.jdbc.Driver | | Oracle | [[http://www.oracle.com/technetwork/database/features/jdbc/index.html]] | oracle.jdbc.OracleDriver | | PostgreSQL | [[http://jdbc.postgresql.org/download.html|]] | org.postgresql.Driver | Depending on the Driver, a URL will provide the information the driver needs to establish the connection and allow the application to execute SQL-commands on the database, see [[180:technology:core:database_connection|]] \\ \\ ====== Special Remarks ====== ===== Oracle Driver ===== The drivers to connect and communicate with an Oracle database is provided by Oracle itself. These drivers need to be available for Orbit through an external jar-file or within the Orbit software directory (program/software/lib_database). See Install and Define Driver above. \\ \\ **Required Software jar-files** \\ Required Oracle database drivers, provided by Oracle : * ojdbc14.jar * sdoapi.jar By default Orbit supports an Oracle connection. Orbit-Oracle connection, provided by Orbit : * driver_oracle10spatial.jar ==== Oracle Numeric datatypes ==== ^ [[http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i16209|Oracle Datatype]] ^ [[180:desktop:dataset:contents:structure#Attribute_Datatype|Orbit Data type]] ^ | Number | **String** | | Binary_Float | Float | | Binary_Double | Double | An Oracle Number will be available as String in Orbit! **Number Datatype** \\ Stores a number as a decimal number, in a base-10 numeral system : [[http://en.wikipedia.org/wiki/Decimal|Wikipedia Decimals]]. \\ \\ Because of the binary internal structure of computers and related decoding issues, decimal numbers are peculiarly used for arithmetic calculations and are frequently available as string values. For example 123.1 is written as such in a computer program. \\ \\ **Binary_Float and Binary_Double Datatype** (Floating-Point Numbers) \\ Stores a number as a binary number, in a base-2 numeral system: [[http://en.wikipedia.org/wiki/Binary_number|Wikipedia Binary number]] \\ \\ Because of its straightforward implementation in digital electronic circuitry, the binary system is used internally by almost all modern computer hardware and software systems. They are frequently used for scientific computations. Their behavior is similar to the datatypes FLOAT and DOUBLE in Java and XMLSchema. \\ The speed of floating-point operations (FLOPS) is an important characteristic of a computer system, especially in software that performs large-scale mathematical calculations. \\ (c) wikipedia.com and docs.oracle.com ===== MS SQL Driver ===== The drivers to connect and communicate with an MS SQL database are provided by Microsoft. These drivers need to be available for Orbit via an external jar-file or within the Orbit software directory (program/software/lib_database). See Install and Define Driver above. \\ \\ **Required Software jar-files** \\ Required MSSQL database drivers, provided by Microsoft: * [[http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774|sqljdbc4.jar]] Orbit supports MSSQL connections by default ===== MS Access Driver ===== The driver to connect and communicate with MS Access databases is provided by Microsoft and needs to be installed on your Windows operating system. \\ There are different drivers for 32 and 64bit Windows and there are different version of the Office drivers (e.g. 6, 12, 14). Version 6 doesn't support *.accdb files! \\ \\ When using Microsoft Office 2007 32bit on Windows XP, Vista or 7 it is more common that the older Access driver version 6 will be installed. Even if you have a brand new computer, a newer Access driver will not be available. \\ \\ Check the installed driver (Microsoft Ace OLEDB Provider) on your system using the ODBC Data Source Administrator. Be attentive, its very confusing! * Data Source Administrator for 64bit drivers : C:\Windows\System32\odbcad32.exe * Data Source Administrator for 32bit drivers : C:\Windows\SysWOW64\odbcad32.exe | Version 6 \\ *.mdb \\ {{technologies:platforms:odbc_32bit.png?nolink&400|}} | Version 12 or 14 \\ *.mdb, *.accdb \\ {{:technologies:platforms:odbc_64bit.png?nolink&400|}} | \\ Depending the used Orbit software (64 or 32bit) the corresponding Windows drivers will be used. 64 bit software can’t use the 32 bit driver and vice verso. On a 64 bit Windows operating system, a 32bit application can be installed. This application will use the 32bit Windows drivers. \\ \\ Orbit 64-bit will use the 64bit MS Access driver to communicate with an Access database. A database connection using the 64bit Access driver reference might fail if the driver itself is missing on your operating system. \\ \\ It is possible to install a missing MS Access driver (Microsoft ACE OLEDB Provider) by installing the [[http://www.microsoft.com/downloads/en/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en|Microsoft Access Database Engine]]. \\ Unfortunately launching the 64-bit installer will fail in case the 32-bit version of Microsoft Office with Access is installed on your system. \\ \\ When using MS Office 2007 (not 2010!!) a workaround is possible by installing the AccessDatabaseEngine from the command line with argument "passive". \\ {{technologies:basic_concepts:databaseengine.jpg?nolink}} \\