next up previous
Next: MAST SDSS skyServer Interface Up: User Interfaces Previous: User Interfaces

SDSS Query Tool (sdssQT)


The sdssQT is a stand-alone application to manage and perform catalog archive server queries, and is available for download from our web sites, along with a detailed user's manual. The discussion that follows is a brief introduction to its use, to illustrate its capabilities. There are options to choose the output format (ASCII or binary), facilities to save queries, a simple text editor to create and modify queries, and communication with the Catalog Archive Server to follow the progress (and predict the time to completion) of active queries. An additional tool converts our binary output format to a FITS binary table.

The query language we developed is very similar to the Structured Query Language (SQL). The sdssQT includes several example queries, and the online user's guide provides additional explanations of the language and how to use it efficiently. The use of associations (§ 2.2.1) provides a powerful way to extract object data from many different classes simultaneously. Similarly, the inheritance properties of classes and their subclasses makes queries written for a given class run on all of its subclasses or sibling classes.

The grammar of this language is to select a set of parameters from a class that satisfy specified conditions. The SDSS Query Tool allows full access to all of the classes and parameters in the Catalog Archive Server. For example, the query:

SELECT ra,dec FROM SpecObj WHERE (z > 2)
returns the parameters ra and dec (right ascension and declination) for all spectroscopic objects (i.e., from the class SpecObj) with redshift greater than 2.

One class must appear in the WHERE clause. One or more of the parameters from the classes may be listed in the SELECT clause and used in the WHERE clause, as long as they are included in the class mentioned in the FROM clause.

The PhotoObj class, containing the detected objects in the images, has the most entries, over 13 million. To facilitate selecting from these entries, we have designated a subset of the most commonly used parameters in the PhotoObj class to be part of a special class called Tag. The final column of Table 6 indicates which parameters are in the Tag class. The database is structured in such a way that searches that select on these Tag parameters run significantly faster.

Additionally, many of the classes, like Tag, have numerous subclasses (Primary, Secondary, Galaxy, Star), described in the above mentioned tables. These subclasses all inherit the properties of the umbrella class. The same parameters are available in the subclasses as in the umbrella class, but they will be faster to query as each contains only a portion of the total objects. For example, users wanting data only on galaxies can execute queries on the Galaxy class; this avoids having to specify that objType=Galaxy if it were run on the entire Tag class, and will run faster as fewer objects are searched.

To access associated, or linked parameters, we use the ``.'' modifier. For example, spectroscopic objects from the SpecObj class all have a link back to the photometric object in the Tag class. This allows retrieval of parameters from both classes simultaneously. Use the syntax tag.r, for example, to obtain a spectroscopic target's tex2html_wrap_inline2863 magnitude. In Table 11, the parameter phototag has type OneAssoc(PhotoTag), so the query

SELECT ra,dec,phototag.r FROM SpecObj
returns the position and tex2html_wrap_inline2863 magnitude for all objects with spectra.

Some associations tie many objects in a class to one object of another class. For example, there can be many lines measured in one spectrum. The parameter measured in the SpecObj class has the type ManyAssoc(SpecLine). The following Association Query returns parameters for all of the lines of the selected spectrum:

(SELECT measured FROM SpecObj WHERE
	plate.plateID == 384 && fiberID == 284)

The online user's guide to the SDSS Query tool contains a detailed description of the language, examples to help construct advanced queries, and details about macros to perform logical and arithmetic operations within queries.

next up previous
Next: MAST SDSS skyServer Interface Up: User Interfaces Previous: User Interfaces

Michael Strauss
Thu Jan 30 11:15:34 EST 2003