aqua data studio
DESCRIPTION
Aqua Data Studio. Find the application. We are using Aqua Data Studio v11. Enabling “;” as Statement Separator. - PowerPoint PPT PresentationTRANSCRIPT
Aqua Data Studio
Access Aqua Data Studio
• Aqua Data Studio is available on iMac in ILS Mac Lab (LI002A)• Download the latest version from official website (14 days free trial) (
http://www.aquafold.com/aquadatastudio.html) • For MS Windows user, you can download a free version (V4.7) from IU
Ware. (http://iuware.iu.edu/Windows/Title/585)
Enabling Semi-colon (;) as Statement Separator
• Aqua Data Studio has a default setting which prefers / and GO as statement separators for SQL statements. When working on your own with ADS, you have the option to either conform with this syntax requirement, or change the options in ADS to accept a semi-colon ( ; ) as a statement separator.• For this class, we are using prewritten SQL files that use a semi-colon
as a statement separator. Different statement separators have different pros and cons; the semi-colon is the standard statement separator for command line and GUI interfaces with many SQL languages, so we have opted for the semi-colon.• In order for ADS to understand semi-colon separators , we must
change some options inside the program.
File → Options
• Under General subcategory, check ‘;’ Statement separator
Register Database Server(PostgreSQL, MySQL, Oracle)
Steps to register PostgreSQL server1. Select “PostgreSQL”2. Name your database 3. Login name: your IU username
Password: your PostgreSQL*
4. Host: db.ils.Indiana.eduPort: 5433Database: your IU username
5. (Not yet to press OK) Switch to “Driver” tab
*See the instruction about getting PostgreSQL password
PostgreSQL
1
2
3
4
5
Steps to register PostgreSQL server6. Enter “?ssl=true” in Parameters box7. Then press OK6
7
• Get your username and password• Login Canvas → Go to course• Scrolling down in the left panel to find “WebDB” section• Click “WebDB” to find your username and password
Oracle
Steps to register Oracle server1. Select “Oracle 9i/10g/11g”2. Name your database 3. Login name: your username
Password: your passwordUncheck “Save password”
4. Host: esdbd110.uits.indiana.eduPort: 1521 (default)SID: oed1prd
1
2
3
4
Oracle
Steps to register MySQL server1. Select “MySQL”2. Name your database 3. Login name: Your IU username
Password: Your PostgreSQL password*4. Host: db.ils.Indiana.edu
Port: 3306 (default)Database: Your IU username
*The password is the same as your password for PostgreSQL server
1
2
3
4
MySQL
Start writing queries
Queries1.Click on database you are interested in (in this example MySQL)
2.Click on icon Query Analyzer
3.Write statements in window4.Click on
icon Execute
Import Data in TablesTools > Import
Import Data in Tables
1. Choose Server
2. Click OK
Import Data in Tables3. Click on browse to find your Comma Separated File (.csv) – if the file extension doesn’t show up, make sure you add it at the end.
4. If your file has column names in the first line, make sure to click this option.
5. Click Next
Import Data in Tables
6. Choose the option “Import into Database”
7. Click Next
Import Data in Tables
8. Click NextIf your import is successful, you should get this message.
Tips for Importing Data into Tables
• Always back up your database before making any changes.• It is a good idea to create the table in your database
first and then import the data.• Make sure the .cvs file with the data you want to
import has exactly the same structure as your table (same columns)
Export Data from Aqua Data Studio
1. Right click on the database you want to export data
2. Select “Tools → Export Data”
Export Data from Aqua Data Studio
2. Select object to export
1. Choose the schema to export
3. Select tables to export
4. Click Next
Export Data from Aqua Data Studio
1. Select a folder to save data
2. Select the data format to export. “INSERT Statements” will export SQL query files for each table
3. Select “;” as statement separator
4. Click Next to export data