The Exoplanet Encyclopaedia — Query language
In The Exoplanet Encyclopaedia it is possible to filter exoplanets on the catalog and diagrams pages using simple boolean expressions query language which mimics syntax of WHERE clause in SQL language. One can also download query result from the catalog page in machine-readable format by clicking one of the Download links on the top right after applying desired filter.
The language consists of arbitrary number of expressions combined together using AND or OR clauses. Expression usually has the following structure (square brackets mean optional clauses):
planet_parameter[:unit] operator value [AND | OR [NOT] expression] [, …]
where planet_parameter[:unit] is the name of any exoplanet property present in the database, with optional unit specification in few cases, namely:
- name (type string)
- mass (type number; units mjup and mearth are supported to express mass in masses of Jupiter and the Earth, respectively)
- radius (number; units rjup, rearth, km are supported to express radius in radii of Jupiter, the Earth and kilometers respectively)
- period (number; self-explanatory units hour, day, and year are supported)
- axis (number; units au, km, ly are supported to express semi-major axis in astronomical units, kilometers and light years respectively)
- eccentricity (number)
- angular_distance (number)
- inclination (number)
- publication_status (string)
- discovered (number)
- omega (number;units deg and rad are supported)
- tperi (number)
- tconj (number)
- detection (string)
- molecules (string)
- remarks (string)
In the absence of unit specification system does no unit conversion and compares the data with desired value in the default database units.
Operator can be any comparison operator from SQL-like languages:
- = tests equality (number)
- != tests non-equality (number)
- > greater than (number)
- < less than (number)
- >= greater or equal than (number)
- <= less or equal than (number)
- EQ : equality (string)
- IN : test presence of substring
Slightly different syntax for
expression is employed for testing substring inclusion in planet parameters of a string type:
"substring" IN planet_parameter_stringAnother alternative tests for presence of desired substring(s) as a separate word(s) in
planet_parameter_string:
{"substring1" [, "substring2" [, ...]]} IN planet_parameter_stringwhich is often equivalent of the query
"substring1" IN planet_parameter_string AND "substring2" IN planet_parameter_string, though not exactly.Please also keep in mind that you have flexibility to change places of
planet_parameter and
value in
expressions and the overall language is case-insensitive.
Query examples
- radius:rearth < 10 AND discovered >= 2010
- mass:mjup > 2.0 AND period:day < 10
- period:day <= 100 AND (mass:mjup < 2 OR axis:au < 5.0) AND mass:mjup != 10.5
- "corot" IN name AND NOT "b" IN name
- {"oxygen", "carbon"} IN remarks
- "H2O" IS_IN molecules AND "primary transit" IN detection
- NOT mass:mjup > 1
- 10 < radius:rearth
- 1 = 1
We believe that this simple query language fulfills most of quick-look needs of a user. If this is not the case, please download the complete copy of the database in a suitable format (
VOTable,
CSV,
DAT) and use any available application (one good example is
TOPCAT) to slice the data as you like. For more complex queries and advanced users we provide
TAP (Table Access Protocol) service (see details at
Virtual Observatory page).