[Top] [Prev] [Next]

4.2 The Vdata Model

The HDF Vdata model provides a framework for storing customized tables, or vdatas, in HDF files. The term "vdata" is an abbreviation of "vertex data", alluding to the fact that the object was first implemented in HDF to store the vertex and edge information of polygon sets. The vdata design has since been generalized to apply to a broader variety of applications.

A vdata is like a table that consists of a collection of records whose values are stored in fixed-length fields. All records have the same structure and all values in each field have the same data type. Vdatas are uniquely identified by a name, a class, and a series of individual field names. (See Figure 4a.)

FIGURE 4a - Vdata Table Structure

A vdata name is a label typically assigned to describe the contents of a vdata. It often serves as a search key to locate a vdata in a file. A vdata class further distinguishes a particular vdata by identifying the purpose or the use of its data. Finally, vdata field names are labels assigned to the fields in the vdata.

4.2.1 Records and Fields

Each record in a vdata is composed of one or more fixed-length fields. Vdata records and fields are identified by an index. The record and field indexes are zero-based and are separately incremented by one for each additional record and field in the vdata.

Every field in a vdata is assigned a data type when the vdata is created. The data type of a field may be any basic HDF data type: character, 8-bit, 16-bit, and 32-bit signed and unsigned integers, and 32-bit and 64-bit floating point numbers. The maximum length of a vdata record is 32,767 bytes.

The Vdata model allows multiple entries per field as long as they have the same data type. The number of entries or components in a field is called the order of the field.

The organizational structure of a vdata is often determined by the data types of its data set or sets. For example, given a data set describing the location ("X,Y") and temperature ("Temp") of points in a plane, there are several ways to organize the data. (See Figure 4b.) If the "X", "Y" and "Temp" values are of the same data type, they could be stored as three single-component fields, as a two-component "X,Y" field and a single-component "Temp" field, or as a three-component "X,Y,Temp" field. Generally the "X,Y" data is stored in a single field, but HDF places no restrictions on the organization of field data and there are no significant HDF performance issues involved in choosing one organizational regime over another.

FIGURE 4b - Three Different Vdata Structures for Data of the Same Number Type



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 05/19/99, NCSA HDF Development Group.