Skip navigation links

Package com.apple.foundationdb.record.metadata

Record meta-data structures.

See: Description

Package com.apple.foundationdb.record.metadata Description

Record meta-data structures.

Record Layer Meta-Data

All operations on records are mediated by a RecordMetaData. It describes the format of persistent records, their fields and secondary indexes. There is a rough correspondence between the terminology used within the Record Layer and those used by relational databases:

relational correspondences
Record LayerRelational
meta-dataschema
record typetable
fieldcolumn

Note that this correspondence is not exact. In particular, note that a record type and a table differ in that records of various types are included within the same extent. There are more details about the differences between tables and record types within the Record Layer FAQ.

The core of the meta-data is a Protobuf Descriptors.FileDescriptor. Every RecordType corresponds to a message Descriptors.Descriptor in the file descriptor. The possible fields of the record are the fields of the message.

A RecordMetaDataBuilder is used to construct meta-data from a file descriptor or to restore serialized meta-data from the database. A RecordTypeBuilder is used to specify options for a record type. In particular, a record type has a primary key and any number of secondary Indexes. The fields of the primary key and of an index are specified by a KeyExpression.

Skip navigation links