What is an LTPDA Repository


Introduction

An LTPDA repository has at its core a database server (in fact, a MySQL server). A single MySQL server can host multiple databases (LTPDA repositories). A single database/repository comprises a particular set of database tables. These tables hold meta-data about the objects stored in the database.

Since the core engine is a MySQL database, in principle any MySQL client can be used to interface with the repository. In order to submit and retrieve objects in the proper way (entering all expected meta-data), it is strongly suggested that you use the LTPDA Toolbox client commands submit and the "From Repository" constructors.

Any standard MySQL client can be used to query and search an LTPDA repository. For example, using a web-client or the standard MySQL command-line interface.

Database primer

A MySQL database comprises a collection of tables. Each table has a number of fields. Each field describes the type of data stored in that field (numerical, string, date, etc). When an entry is made in a table a new row is created. Interaction with MySQL databases is done using Structured Query Language (SQL) statements. For examples see MySQL Common Queries.

Database design

The database for a single repository uses the tables as shown below:

DB Tables

As you can see, each object that is submitted to a repository receives a unique ID number. This ID number is used to link together the various pieces of meta-data that are collected about each object. In addition, each object that is submitted is check-summed using the MD5 algorithm. That way, the integrity of each object can be checked upon retrieval.

In order to access a particular repository you need:

Database tables

An LTPDA repository consists of the following database tables:

objs table

The objs table stores the XML representation of the submitted object and assigns an unique identifier to each object in the database. Together with the database name and the hostname of the server this forms a unique tag for all LTPDA objects. The XML representaion can be dumped to a file and read with LTPDA Toolbox object constructrors.

Field Name Data Type Description
id INTEGER Object unique identification number used to link all database tables entries.
hash TEXT MD5 hash of the XML representation of the object.
uuid TEXT Universally Unique Identified assigned to the object at creation time.
xml LONGTEXT XML representation of the object.

objmeta table

The objmeta table stores various pieces of information associated with the object being submitted. The aim of this table is to provide useful fields on which to perform queries.

Field Name Data Type Description
obj_id INTEGER Object ID.
obj_type ENUM Objedct type.
name TEXT Object user-assigned name.
created DATETIME Object creation time.
version TEXT Version of the LTPDA Toolbox used to construct the object.
ip TEXT IP address of the machine which submitted the object.
hostname TEXT Hostname of the machine which submitted the object.
os TEXT Operating system of the machine which submitted the object.
submitted DATETIME Object submission time.
experiment_title TEXT Title for the experiment to which the object is associated.
experiment_desc TEXT Description of the experiment to which the object is associated.
analysis_desc TEXT Description of the analysis to which the object is associated.
author TEXT Username of the user which submitted the object.
quantity TEXT Physical quantity the object describes.
additional_authors TEXT Other authors involved in creating the object.
additional_comments TEXT Free-form field for additional comments regarding the object.
keywords TEXT List of keywords associated to the object.
reference_ids TEXT Other object IDs associated with the object.
validated TINYINT Object validation status.
vdate DATETIME Object validation time.

transactions table

The transactions table records all user transactions. A transaction corresponds to submitting or retrieving a single or a collection of LTPDA objects.

Field Name Data Type Description
obj_id INTEGER Object ID.
user_id INTEGER User ID who carried out the transaction.
transdate DATETIME Transaction time.
direction TEXT Direction of the transaction: "in" or "out".

users table

The users table stores information about the users allowed to access the database. This is a view collecting informations stored elsewhere in the database server which are replicated here for convenience in obtaining the user ID to populate the transactions table.

Field Name Data Type Description
id INTEGER User ID.
username TEXT Username.

collections table

The collections table stores virtual collections of objects submitted to the database. When the user submits one or more objects at the same time a collection composed of the submitted objects is created. This table serves the purpose of assigning an collection ID number. The collection ID allows the user to retrieve multiple objects at time.

Field Name Data Type Description
id INTEGER Collection ID.

collections2objs table

The collections2objs table links each collection to the objects that composes it and viceversa.

Field Name Data Type Description
id INTEGER Collection ID.
obj_id INTEGER Object ID.

ao table

The ao table stores additional meta-data specific to analysis objects.

Field Name Data Type Description
obj_id INTEGER Object ID.
data_type ENUM Object data type.
description TEXT AO description.

bobjs table

The bobjs table stores an optional Matlab bionary representation of the submitted object. This object representation can be dumped directly to a file and read with LTPDA Toolbox object constructrors much quicker that the otherwise equivalent XML format.

Field Name Data Type Description
obj_id INTEGER Object ID.
mat LONGBLOB Matlab binary representation of the object.

mfir table

The mfir table stores additional meta-data specific to MFIR filter objects.

Field Name Data Type Description
obj_id INTEGER Object ID.
in_file TEXT Input filename (if applicable) used to create the filter object.
fs INTEGER Sample rate of the data the filter is designed for.

miir table

The miir table stores additional meta-data specific to MIIR filter objects.

Field Name Data Type Description
obj_id INTEGER Object ID.
in_file TEXT Input filename (if applicable) used to create the filter object.
fs INTEGER Sample rate of the data the filter is designed for.

cdata table

The cdata table stores additional meta-data specific to cdata objects. Cdata objects are used to represent 1D data.

Field Name Data Type Description
obj_id INTEGER Object ID.
yunits TEXT Units for the contained data vector.

fsdata table

The fsdata table stores additional meta-data specific to fsdata objects. Fsdata objects are used to represent frequency-series data.

Field Names Data Type Description
obj_id INTEGER Object ID.
xunits TEXT Units for the contained frequency vector.
yunits TEXT Units for the contained data vector.
fs DOUBLE Sample rate of the contained data.

tsdata table

The tsdata table stores additional meta-data specific to tsdata objects. Tsdata objects are used to store time-series data.

Field Data Type Description
obj_id INTEGER Object ID.
xunits TEXT Units for the contained time vector.
yunits TEXT Units for the contained data vector.
fs INTEGER Sample rate of the contained data.
nsecs DOUBLE Duration of the contained time-series in seconds.
t0 DATETIME Start time of the contained time-series.
toffset BIGINT Difference between t0 and the reference time in seconds.

xydata table

The xydata table stores additional meta-data specific to xydata objects. Xydata objects are used to store 2D data.

Field Name Data Type Description
obj_id INTEGER Object ID.
xunits TEXT Units for the contained X vector.
yunits TEXT Units for the contained Y vector.



©LTP Team