SOCIB RAMADDA Data Repository
RAMADDA Data Model
Previous: RAMADDA Overview Next: Hierarchy Table of contents
RAMADDA User Guide
 
15.1 RAMADDA Data Model
The underlying data model follows a Composite pattern:
  • There are Entry and Group objects.
  • A Group isa Entry.
  • Groups can hold a number of children Entrys.
  • An Entry has a (single) parent Group.
An Entry can represent a number of things. It may be a file on disk, an HTTP URL, an OpenDAP URL, a weblog entry, a field project report, etc.

The only distinction between a Group and an Entry is that Groups are parents of Entrys. All other aspects of the data model are the same.

Below is the definition of the main entries database table. This represents the lowest common denominator of metadata, e.g., name, group structure, type, time range, geobounds.

id varchar(200) The entry id. A unique identifier. See below for a discussion of Group ids.
type varchar(200) The entry type (e.g., group, file, model, etc). This corresponds to the TypeHandlers
name varchar(200) Short name
description varchar(2000) Description
parent_group_id varchar(200) Parent group
top_group_id varchar(200) The group id of the second to last topmost group
user_id varchar(200) the creator
resource varchar(200) The resource path (e.g., file, url, etc)
resource_type varchar(200) The type of the resource
datatype varchar(200) allows for subtyping
createdate timestamp when it was created
fromdate timestamp From date range of the data
todate timestamp To date range of the data
south float8 Geo bounds
north float8 Geo bounds
east float8 Geo bounds
west float8 Geo bounds

Metadata

Each Entry can have any number of further Metadata elements. The Metadata table is shown below. Each Metadata element is managed by a MetadataHandler java class. This class is responsible for showing the create/edit/search forms and for adding the metadata element into other content views (e.g., THREDDDS catalogs). The MetadataHandler uses the attr(1-4) fields in the table to hold the content.

For example, the ThreddsMetadataHandler handles a variety of metadata that shows up in THREDDS catalogs, e.g., creator, link, publisher, project. For each of these types there is a metadata type in the table: thredds.creator, thredds.link, etc. The attr(1-4) is used to hold the content. For example, thredds.link type uses attr1 for the title and attr2 for the url. The thredds.keyword just uses attr1 to hold the keyword. The thredds.publisher uses all 4 attributes.

id varchar(200) The id of the metadata element
entry_id varchar(200) The entry id. Corresponds to the id in the entries table above.
type varchar(200) The metadata type. This defines the MetadataHandler for this element.
attr1 varchar(10000) content 1
attr2 varchar(10000) content 2
attr3 varchar(10000) content 3
attr4 varchar(10000)) content 4

 

Previous: RAMADDA Overview Next: Hierarchy Table of contents

Powered by Geode Systems and RAMADDA