next up previous contents
Next: Series specific tables Up: Table schemas and SQL Previous: Table schemas and SQL   Contents

Global tables

The global tables master_keyword_table, master_keyword_table, master_link_table, and master_data_table are created once by the JSOC database administrator (DBA) with the following SQL code:


create table mdc_master_series_table
(
        series      varchar(64)    not null,
        author      varchar(64)    not null,
        owners      varchar(64)    not null,
        created     timestamp      not null,
        description text,
        unitsize    integer        not null,
        archive     integer        not null,
        tapegroup   integer,
        retention   timestamp      not null,
        primary key (series)
);


create table mdc_master_keyword_table 
(
        series   varchar(64)     not null, /* Name of series. */
        keyword  varchar(64)     not null, /* Name of keyword. */
        number   integer         not null, /* Keyword number */
        linkname varchar(255),  /* should be NULL for ordinary keywords. */
        type     varchar(20)     not null, /* Data type */
        maxsize  integer         not null, /* Max size of data type */
        format   varchar(20)     not null,
        unit     varchar(16)     not null, /* Physical unit */
        comment  varchar(255)    not null,
        indexed  integer         not null,
        primary key (seriesname, keywordname)
);

create table mdc_master_link_table 
(
        series  varchar(64)     not null,  /* Name of series. */
        link    varchar(64)     not null,  /* Name of link. */
        number  integer         not null,  /* Link number */
        target_series  varchar(64)     not null,
        type    varchar(20)     not null,  /* Simple or query */
        query   varchar(255)    not null,  /* Database query */
	binding varchar(10)     not null,  /* Bind time */
        comment varchar(255)    not null,
        primary key (seriesname, linkname)
);
s
create table mdc_master_data_table 
(
        series  varchar(64)     not null, /* Name of series. */
        data    varchar(64)     not null, /* Name of data segment. */
        number  integer         not null, /* Segment number */
        type    varchar(20)     not null, /* Data type */
        unit    varchar(16)     not null, /* Physical unit */
        naxis   integer         not null, /* Rank = number of dimensions */
        axis    varchar(255)    not null, /* comma separated list of axes dimensions */
        comment varchar(255)    not null,
        primary key (seriesname, dataname)
);



Philip Scherrer 2006-06-17