Creating a Connection
Overview
The first step to getting started accessing and analyzing data in Andi is to create a connection to your database(s). A connection provides the JDBC (Java Database Connectivity) communications link between the Andi application and your database. To create a connection, you must locate a JDBC driver for your database. The driver will consist of one or more jar or zip files, which contain the necessary files to access your database.
Built-In Sample Database
Andi provides users with a sample database (complete with test data related to Universities) which makes it easy to start exploring different features of the product without the worry of impacting your database. Users can install the sample database at any time by selecting the Help menu, then selecting Getting Started.
Creating a Connection
Andi provides two ways to connect to a database: the Connection Creation Wizard (great for new users to walk through the process of creating a connection) and the Connection Manager (for users who are more familiar with creating connections in Andi).
Using The Connection Creation Wizard
The Connection Creation Wizard will walk users through the process of creating a connection. To access the Connection Creation Wizard use the File Menu and select New Connection. The Connection Creation Wizard will appear:
A JDBC driver must be located / selected for your database. Drivers that are already available (such as the Derby Driver which is provided for the Andi Sample Database) will appear in the Database Driver selections.
Note: You can check out the article Driver Support in the Technical Reference section of the Andi Help Center to learn more about JDBC Database Driver Files as well as additional driver support.
If the Database Driver does not exist that is needed, the New Driver option can be used to add new Database Driver information:
Once a Driver has been selected or added select Next to create a unique URL and custom Alias for the connection (user can choose any Alias name). URL Samples are provided for assistance with the correct format, and you can view section Database URLs for additional examples:
Note: If you are unsure what your Host Name, Port, and Database Name are for the URL you can contact your Database Administrator for help.
The next page for creating a connection will prompt users to enter Logon Information (Userid and Password). Both the Userid and Password should be provided by an appropriate internal Technical resource (like a Database Administrator).
The option to Test the connection or Finish and complete the connection are available:
Using The Connection Manager
The Connection Manager can be used to add multiple database connections, view or edit existing connections, delete connections, or add new connections. To connect to a database with Andi, select an existing connection from the list of connections available and enter the Userid and Password for that database:
To edit connection information, select the desired database connection and then select Edit:
To delete a connection, select the desired database connection and then select Delete.
To add a new connection, select the Add button which will display the Connection Creation Wizard. The same steps as listed in the Using the Connection Creation Wizard section from this article can be used to add a new connection.
Connection Options
Once you are connected successfully to a database, Andi provides many Connection Options that allow users to specify preferences when running Queries. The Connection Options can be accessed from the Connection Options tab of the currently open Query Panel:
Auto Commit
Selecting the Auto Commit indicator will prompt users with a message to commit or rollback the statement prior to running. A commit will automatically be performed after all statements are successfully executed. This option protects users from an accidental “delete from <table>” statement, in which as an example you may accidentally delete thousands of rows instead of only the handful of desired rows.
Override Preferences
Selecting the Override preferences indicator will ensure that any preferences set from the Connection Options tab will override Connection Options that are set at the global level from the Application Preferences.
Single Statement Row Limit
Entering a number into the Single Statement Row Limits will limit the number of rows a single statement can retrieve. This helps users avoid having to add a "fetch first n rows" clause to a SQL statement.
The default value is to retrieve a maximum of 1,000 rows. A value of zero can be entered which will disable the feature completely, and will allow the retrieval of an unlimited number of rows (although the aggregate row limit still applies).
Aggregate Row Limit
Entering a number into the Aggregate Row Limit will limit the total number of rows that can be retrieved when multiple statements are executed. A value of zero can be entered which will disable the feature completely.
Transaction Isolation
The Transaction Isolation menu defines how / when the changes made by others will become visible to you. The default value, Read Uncommitted, allows you to read data updated by another user whose changes have not yet been committed to the database, which will minimize database lock contention when running your SQL statements: