aqua data studio

22
Aqua Data Studio

Upload: trynt

Post on 06-Jan-2016

42 views

Category:

Documents


0 download

DESCRIPTION

Aqua Data Studio. Find the application. We are using Aqua Data Studio v11. Enabling “;” as Statement Separator. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Aqua Data Studio

Aqua Data Studio

Page 2: 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)

Page 3: Aqua Data Studio

Enabling Semi-colon (;) as Statement Separator

Page 4: Aqua Data Studio

• 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.

Page 5: Aqua Data Studio

File → Options

• Under General subcategory, check ‘;’ Statement separator

Page 6: Aqua Data Studio

Register Database Server(PostgreSQL, MySQL, Oracle)

Page 7: Aqua Data Studio

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

Page 8: Aqua Data Studio

Steps to register PostgreSQL server6. Enter “?ssl=true” in Parameters box7. Then press OK6

7

Page 9: Aqua Data Studio

• 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

Page 10: Aqua Data Studio

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

Page 11: Aqua Data Studio

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

Page 12: Aqua Data Studio

Start writing queries

Page 13: Aqua Data Studio

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

Page 14: Aqua Data Studio

Import Data in TablesTools > Import

Page 15: Aqua Data Studio

Import Data in Tables

1. Choose Server

2. Click OK

Page 16: Aqua Data Studio

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

Page 17: Aqua Data Studio

Import Data in Tables

6. Choose the option “Import into Database”

7. Click Next

Page 18: Aqua Data Studio

Import Data in Tables

8. Click NextIf your import is successful, you should get this message.

Page 19: Aqua Data Studio

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)

Page 20: Aqua Data Studio

Export Data from Aqua Data Studio

1. Right click on the database you want to export data

2. Select “Tools → Export Data”

Page 21: Aqua Data Studio

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

Page 22: Aqua Data Studio

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