Database Schema

schema.png
The schema of the data base consists of the tables

  • Sequence This implements a sequence. That is, a table with only row, and a number that is incremented. This is used to make unique identifiers in the database.
  • Config This table servers as a collection of configuration information. It has a tag and coordinate field as selected by the InterCom Layer or the like. It is versioned, meaning that for a given set of tag and coordinates, there can be more that one version. It has a reference to a row in the Order table.
  • Order Specifies in which order the parameters should be pushed onto the front end electronics. It references the Parameter table.
  • Parameter Information about the parameters. This table is fairly static. Each row has a name which identifies the parameter, a flag that says whether the parameter is a RCU, BC, or ALTRO parameter, and a flag isblob indicating whether it has singular or blob value. If the isblob is true, then the values of the parameters are stored in the BlobValue table. Otherwise, the parameters values are stored in the SingleValue table.
  • Value Technically this is not a table. It is in the diagram only to show the common fields of the SingleValue and BlobValue tables. It has a reference to a particular configuration (a row in the Config table) and to a parameter (a row in the Parameter table). It is versioned, meaning that one can have many (different) values for the same configuration.
  • SingleValue This table stores singular values (a 32bit integer) of registers. The meaning of the value is left to the client to make.
  • BlobValue This table stores array values (of whatever size) of a register or memory. The meaning of the values is left to the client to make.
  • Address This table stores destination addresses for the values. If a row in the Value table does not have any rows in this table, then the value should only be written in broadcast. The strategy is to select rows in the Value table, and find corresponding addresses in this table. Then, values with no address is written first, and then values with addresses are writen next. In this way, values are only written if they differ from the default (broadcast) value.

For each of these tables, there's a corresponding class in the RcuConf namespace, with the notable exception of the Sequence table. Each class have static member function to create and drop the table from the database. They also have static member functions to query the database for rows of the table. Finally, objects of the tables can be inserted into the table via a simple member function. The Insert member function of the tables ensures that a new unique identifier is obtained from the Sequence table, and that version numbers are updated (if applicable).

Top of page Last update Fri Apr 27 01:54:16 2007
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5