NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Software > PlanOfRecordC42007 > AntennaPFMSchema
   Changes | Index | Contents | Search | Statistics | Go

Description of Antenna Pointing Focusing Database Schema

This is a description of the schema used by the antenna system to manage pointing correction model data. A pictorial of the schema is shown below:
Antenna PFM Schema
Active Surface Schema

The database stores five basic quantities:

A basic requirement in the schema design was that measurement data should never be replicated, simply because of the database layout itself. This means the system should allow any one of the quantities to be remeasured and updated without replicating measurements of other quantities.

Configuration data for the antenna pointing/focusing models, residual corrections, beam offsets, optical configuration data, site information and dynamic correction setup is keyed by a configuration name. A configuration name is related to a configuration id, which specifies a row in the configuration_map. The configuration_map has foreign keys into the poiting_gravity_model, focus_gravity_model, site_data, refraction_model, and residual set tables.

The dynamic_model_map, used by the antenna characterization manager, contains a foriegn key into the configuration_id table. This relates the configuration table with the dynamic_model.

I should note that the Active Surface tables (zernike_gravity_model, zernike_gravity_model_coeff) are not related by the configuration table. Active surface configurations are specified separately, but a similar pattern of named active surface correction models is used. (i.e. the zernike_gravity_model table is analogous to the configuration table, and likewise the zernike_gravity_model_coeff table is analogous to the pointing and focusing tables.)

Example Database Queries

Note: Beware this section is old, and possibly incorrect.

A user knowing only that they should type "default" for the PFM configuration, comes to observe. Starting at the configuration table, a query is run to map the name to an id; specifically configuration.name is mapped to configuration.id. In SQL:

Select configuration.id from configuration where configuration.name="default" order by configuration.version limit 1

The order by and limit 1 clauses, assure that the user gets the latest version.

The next question is what items are associated with the resulting configuration.id? Since many configurations can reference the same pointing and focusing models, and since we have more than one receiver, a many to many association exists between the configuration table and just about everything else. A complicating factor is that many to many relationships are either difficult to express and/or not supported by MySQL.

To resolve this three 'mapping' tables are used. For a given configuration, each map relates either a single quantity (e.g. pointing, focusing) or a set of quantities (e.g. receiver_beam_offsets, residuals) to a configuration.

For every single unique configuration.id, there will be a single corresponding entry in the configuration_map; approximately 27 rows in the receiver_beam_map; and optionally N rows in the residual_map.

So, back to queries: What quantities are related to a given configuration.id?

SELECT pointing_model_id,focus_model_id,site_data_id FROM configuration_map WHERE configuration_id=configuration.id LIMIT 1

The query above will return id's for pointing, focus tracking, and site data.

The query: SELECT * FROM receiver_beam_map WHERE configuration_id=configuration.id

returns all 27 receiver_beam_offsets for the given configuration id.

This query joins five tables which together define beam offset and focusing attributes of each receiver and beam, for a given configuration.

The Antenna PFM database is now online at: http://leo.gb.nrao.edu/antenna_db/displaydb.php

-- JoeBrandt - 24 May 2007

Attachment: sort Action: Size: Date: Who: Comment:
AntennaPFMSchema.png action 53549 24 May 2007 - 15:56 JoeBrandt Main PFM Schema
SurfaceSchema.png action 5406 24 May 2007 - 15:33 JoeBrandt Active Surface Schema

Topic AntennaPFMSchema . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.2 - 24 May 2007 - 17:15 GMT - JoeBrandt
Parents: PlanOfRecordC42007
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.