Searching for a Data Set

Existing data sets can be stored into the database with the Data->Save menu. Later, the stored data sets can be retrieved with the Search for data dialog box.File->Search for data menu.

If you press the Search button, without having filled up the search field, all the available data sets will be displayed. Otherwise, only data sets whose name contained the provided indicating characters will appear.

There is even a smarter way for data sets seraching. Thie dialog box allows you to enter partial SQL requests, i.e. the conditions after the WHERE statement. Select the By SQL statement button.

Here are a few examples:

  • Data.Name LIKE 'John\%'

    (All the people whose name begins with John)

    .

  • Data.Name ~* 'john' AND Data.Gender ='M'

    (All the guys whose name contains 'John' or 'john')

    .

  • Data.Name ~* 'anna' AND Data.Gender = 'F' AND EXTRACT(YEAR FROM Data.Birthday) >= 1900 AND EXTRACT(YEAR FROM Data.Birthday) <= 1980

    (All the ladies whose name contains 'anna' and born between 1900 and 1980)

    .

  • Data.Gender ='N' AND Data.ChartType = 2 AND Data.Comment ~* 'accident'

    (All the deadly accidents)

    .

  • Data.Keywords LIKE '\%Prof=Doctor\%'

    (All the doctors)

Searching by Values

The Search for Data dialog box also allows the user to search by values, thank to the VDV view. Clicking on the by VDV button, and a column of predefined operators and arguments button become active. (See below).

The VDV (Values Data View) manages a list of data sets associated with a table containing additional info which permits the relationship with 2 extra tables : Obj and Asp.

Obj contains a list of planetary positions for each VDV row, whereas Asp contains a list of aspects for each VDV row.

The Asp, Obj and VDV rows are filled when, for a given subchart, the Extract & Save icon is dropped onto the regarded chart. Since additional data is saved, the corresponding data set is automatically saved too. Don't forget to save the current restriction set if not already done; otherwise the extract & save won't start.

After having saved the data, Extract & Save adds - if needed - an icon to the Data sets icons list. When the subchart has been modified during an animation or an incremental time shift, a new data set and icon is created, with a suggestive name, such as Direction xx for yy, where xx is an arbitrary number and yy the parent data set.

Within the database, all those relationships are protected by PostgreSQL triggers, e.g. you can't delete a saved subchart data set when its parent still exists. Moreover, when a restrictions set is deleted, its references are discarded into the VDV.

In order to help you, 4 Database functions have been introduced : TObj(), TAsp(), TRetr() and THouse().

  • Bool TObj(<DataIdx>, <Object>, <Sign Number>)

    Returns TRUE if, for the Data set <DataIdx>, <Object> exists and is in sign <Sign Number>. Where <Object> is the object short name .e.g. 'Mar' for Mars, and <Sign Number>, the sign number e.g. 1 for Aries and 12 for Pisces. Example:

      TObj(DataIdx, 'Plu', 6)

    (if Pluto in Virgo)

    .

  • Bool TAsp(<DataIdx>, <Aspect>, <Object 1>, <Object 2 or empty>)

    Returns TRUE if, for the Data set <DataIdx>, the objects <Object 1> and <Object 2> < are linked with the aspect <Aspect>. Example:

      TAsp(DataIdx, 'Con', 'Mar', 'Sat')

    (if conjunction Mars-Saturn)

      TAsp(DataIdx, 'Tri', 'Ura', '  ')

    (if trine Uranus-anything)

    .

  • Bool TRetr(<DataIdx>, <Object>)

    Returns TRUE if, for the Data set <DataIdx> <Object> exists and is retrograde. Example:

      TRetr(DataIdx, 'Mer')

    (if Mercury retrograde)

    .

  • Bool THouse(<DataIdx>, <Object>, <House Number>)

    Returns TRUE if, for the Data set <DataIdx> <Object> exists and is in house <House Number> Example:

      THouse(DataIdx, 'Moo', 11)

    (if moon in 11th house)

    .

Those functions can be chained between classical logical operators like AND, OR, NOT. Examples:

TObj(DataIdx, 'Ven', 1) AND TAsp(DataIdx, 'Squ', 'Ven', 'Jup')

(Venus in aries square Jupiter)

(TObj(DataIdx, 'Sun', 4) OR TObj(DataIdx, 'Sun', 10)) AND THouse(DataIdx, 'Sun', 2)

(Sun in Cancer or Capricornus and in house 2)

.

The standard SQL syntax is obviously available, and classical WHERE statements are possible, such as:

DataIdx IN (SELECT DataIdx FROM Obj WHERE Id = 'Mer' AND Lat < 0.0)

(all the data sets where Mercury below the ecliptic)

DataIdx IN (SELECT DataIdx FROM Asp WHERE AspId = 'Con' AND Objs = 'Moo-Nep' AND Pos = 'S')

(all the Data sets having a separating conjunction Moon-Neptune)