SkyServer sdssQA Help
DR7 Help
 Site News
 Cooking with Sloan
 Search Form Guide
 SQL Tutorial
 SQL in SkyServer
 Sample SQL Queries
 Query Limits
 Searching Advice
 Archive Intro
 Table Descriptions
 Schema Browser
 Web Browsers
 Data Publications
 SkyServer Sites
 Contact Help Desk
Using the sdssQA Tool

The sdssQA is a downloadable Java application which provides a GUI that allows users to directly connect to and query the SDSS databases using SQL. It runs on Unix, Linux, Windows, and Mac. It is available for download at this location. This page provides download, installation, and usage instructions.

Downloading and Installing the sdssQA

The sdssQA is a standalone Java application, which you download as a single .jar file. In order to use the sdssQA, your system must have Java (version 1.4 or higher) installed; this can be downloaded from the Sun website.
Running the sdssQA is trivial:

  • Linux or Unix: Execute java -jar sdssQA.jar
  • Windows or Macintosh: Double-click the sdssQA icon to execute.

Two directories are created in the user's home directory:

  1. QA_queries: The default location to save your .sql queries, and a subdirectory called samples , with the sample queries.
  2. QA_data: The default location to save query output.

Getting Started

When you start the sdssQA, a window with three panes will appear. A miniature is shown below, with the panes labelled by their names. When the QA is first opened, the Results Pane may not exist, but it appears as soon as the first query is executed.

The Main sdssQA Window

The three panes are:

  • The Schema Browser: The left pane provides an expandable display of the entire database contents, allowing users to see all the Tables, Views, Functions, etc., as well as the names of all the columns in the tables.
  • The Query Pane: The upper right pane is where users enter their SQL queries.
  • The Results Pane: The bottom right pane shows the results that are being returned. The portion of the results shown can be controlled.

All of these panes can be either resized or closed using the pane dividers. The latest version of the QA implements "tabbed" windows. When a window is minimized, it appears as a tab at the top of the results pane. When a new window is opened, it appears as a new window on top of the already existing windows, with its own tab. Clicking on the tab for a window will bring it to the front.

Entering, Starting, and Stopping Queries

There are three ways to enter queries into the sdssQA:

  1. Typing your query directly directing into the Query Pane.
  2. Using an Example Query. These can be loaded via the File->Open Example Query menu item. A dialog box appears, showing the available examples. Click on the query you are interested in, and a brief description will appear. Click Okay to load the query.
  3. Loading a query you have saved earlier. These can be loaded via the File->Open Query menu item on the main menubar, or via the Open icon in the Query Pane.

Once a query is loaded, you run it by pressing the green arrow button, or by selecting Query -> Execute from the main menubar. When the query is running, the bottom of the Query Pane will flash the word 'Running', and output will display in the Results Pane. The green arrow will turn into a red square , which can be used to stop (abort) the query. You can also select Query -> Cancel from the main menubar to stop query execution. When the query is done (or aborted) the bottom of the Query Pane will say 'Ready'.

Saving Queries and Query Output

You can save both the SQL Query and the query output. First, we discuss saving the output (or results) of your query.
The sdssQA allows users to save output in two formats:

  • CSV: The results appear in the Results Pane, and are saved to disk as, a csv (comma-separated variable) file.
  • XML: The results appear in the Results Pane, and are saved to disk as XML (eXtensible Markup Language).

You select the output type when you save the query results. You can save the results by either:

  • Clicking the Save Query Results button.
  • Selecting Query->Save Query Results or File->Save Query Results from the main menubar.

These will bring up a window where you can select the destination directory, the output type (csv or xml), and the output filename.
Users can also save the SQL query for future reference. This can be done using the File->Save Query and File->Save Query As menu items from the main menubar, or via the Save Query and Save Query As icons on the menubar. Save Query will overwrite the current query file (shown at the very top of the Query Pane), and Save Query As will prompt you for a filename.

Changing Servers and Databases

A variety of databases are available to QA users. You can select which server to connect to, and which database to use from that server. Using the Options->Config menu item, and clicking on the Servers tab, allows you to enter the URL of a server you wish to connect to. Just type in the URL, and click 'Add'. If it is a valid URL, the available databases from that server will appear in the right pane of the window. You can select one of those databases and make it your default database for future query windows by clicking the checkbox marked 'Default?'.

The Configuration Window

Modifying sdssQA Configuration

The Options->Config menu item brings up a window (shown above), where you can select databases and modify the behavior of the sdssQA. You can do the following:

  • Files: Allows you to set the directories where queries and query output are saved.
  • Proxy: If you connect to the internet via a proxy, you can enter the proxy's settings here. You can save multiple proxy profiles.
  • Output: Allows you to adjust the number of rows shown in the results pane, and to turn on samppling (show only every nth row in the results pane).