The Exoplanet Encyclopaedia — Query language
In The Exoplanet Encyclopaedia it is possible to filter exoplanets on the catalogue 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 catalogue 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_string
Another alternative tests for presence of desired substring(s) as a separate word(s) in planet_parameter_string:
{"substring1" [, "substring2" [, ...]]} IN planet_parameter_string
which 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