Current Release

This documentation covers the current version of Fedora. Looking for another version? See all documentation.

Fedora uses several database tables and indexes to provide fast retrieval of some information. This page documents the various tables Fedora creates. Due to differences in databases, some datatypes might not match the implemented type in your database exactly (ie. datetime versus timestamp).

When a Fedora repository is started with an empty database it begins an indexing process to create these indexes from the content on disk. You can force the rebuilding of these internal indexes by setting the fcrepo.rebuild.on.start JVM property to true. For more information again visit the Properties page.

For the full list of database properties, please refer to the Database section of the Properties documentation.

You can find additional information on this wiki about how Fedora rebuilds these caches and configuring supported databases.

Technical Information


Containment Index

The containment index is a series of tables/indexes used to track the ldp:contains relationships of containers in Fedora.

containment

The table of committed containment relationships. Accessible to all requests.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULL, PRIMARY KEYThe internal ID of the resource 
parentvarchar(503)NOT NULLThe internal ID of the containing resource
start_timedatetimeNOT NULLThe datetime when the resource was created
end_timedatetime
The datetime when the resource was deleted (but still has a tombstone)
updateddatetime
The datetime when any contained resources were updated (used for eTags)

containment_transactions

The table of containment relationship operations that not been committed to the containment table yet. These are only accessible to the indicated transaction.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULLThe internal ID of the resource
parentvarchar(503)NOT NULLThe internal ID of the containing resource
start_timedatetime
The datetime when the resource was created
end_timedatetime
The datetime when the resource was deleted (but still has a tombstone)
transaction_idvarchar(255)NOT NULLThe transaction id this record belongs to
operationvarchar(10)NOT NULLThe type of operation this is, one of 'add', 'delete' or 'purge'

Membership Index

The membership index contains relationships generated by ldp:DirectContainer and ldp:IndirectContainer resources.

membership

The main table of membership relationships. Accessible to all requests.

FieldTypeConstraintsDescription

subject_id

varchar(503)NOT NULLThe internal ID of the resource initiating the relationship (ie. the subject)
propertyvarchar(503)NOT NULLThe predicate of the relationship
object_idvarchar(503)NOT NULLThe internal ID of the resource which is the target of the relationship (ie. the object)
source_idvarchar(503)NOT NULLThe internal ID of the direct or indirect container containing the resource that created the relationship.
proxy_idvarchar(503)NOT NULLThe internal ID of the resource that created the relationship. This is contained within the source_id
start_timedatetime
The datetime the relationship started.
end_timedatetime
The datetime the relationship ended.

membership_tx_operations

The table of membership relationships operations not yet committed to the membership table. These are only accessible to the specified transaction.

FieldTypeConstraintsDescription

subject_id

varchar(503)NOT NULLThe internal ID of the resource initiating the relationship (ie. the subject)
propertyvarchar(503)NOT NULLThe predicate of the relationship
object_idvarchar(503)NOT NULLThe internal ID of the resource which is the target of the relationship (ie. the object)
source_idvarchar(503)NOT NULLThe internal ID of the direct or indirect container containing the resource that created the relationship.
proxy_idvarchar(503)NOT NULLThe internal ID of the resource that created the relationship. This is contained within the source_id
start_timedatetime
The datetime the relationship started.
end_timedatetime
The datetime the relationship ended.
last_updateddatetime
The datetime the relationship was last updated. (used for eTags)
tx_idvarchar(36)NOT NULLThe transaction id this record belongs to
operationvarchar(10)NOT NULLThe type of operation this is, one of 'add' or 'delete'
force_flagvarchar(10)
Indicates that a 'delete' operation should purge an entry from the membership index completely, rather than assigning it and end_time. Used for on-demand versioning when the membership relation existed because of uncommitted state in a mutable head.

Inbound Reference Index

The inbound reference tables hold relationships between two resources in the repository, due to there being no single subject restriction it is possible for a 3rd resource to generate an inbound reference from a 1st resource to a 2nd resource. This relationship will persist even if the 2nd resource was deleted.

reference

The main source of inbound/outbound referenced information. Accessible to all requests.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULLThe internal ID of the resource creating the relationship
subject_idvarchar(503)NOT NULLThe internal ID of the resource which is the subject of the relationship.
propertyvarchar(503)NOT NULLThe predicate of the relationship.
object_idvarchar(503)NOT NULLThe internal ID of the resource which is the object of the relationship.

reference_transaction_operations

The reference operations being performed in a transaction. Only accessible to the same transaction.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULLThe internal ID of the resource creating the relationship
subject_idvarchar(503)NOT NULLThe internal ID of the resource which is the subject of the relationship.
propertyvarchar(503)NOT NULLThe predicate of the relationship.
object_idvarchar(503)NOT NULLThe internal ID of the resource which is the object of the relationship.
transaction_idvarchar(255)NOT NULLThe transaction ID this relationship operation is part of
operationvarchar(10)NOT NULLThe operation being performed. One of 'add' or 'delete'

OCFL Index

The OCFL index provides a mapping between a Fedora URI its base URI (which is different in the case of an Archival Group) and its OCFL ID.

ocfl_id_map

The main source of OCFL mappings. Accessible to all requests.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULL, PRIMARY KEY
The internal ID of the resource creating the relationship
fedora_root_idvarchar(503)NOT NULLThe internal ID of the archival group of the resource in fedora_id. These fields are the same for self contained resources.
ocfl_idvarchar(503)NOT NULLThe OCFL id of the resource containing this Fedora resource.

ocfl_id_map_session_operations

The OCFL ID mapping operations being persisted in a transaction.

FieldTypeConstraintsDescription
fedora_idvarchar(503)NOT NULL, PRIMARY KEY
The internal ID of the resource creating the relationship
fedora_root_idvarchar(503)NOT NULLThe internal ID of the archival group of the resource in fedora_id. These fields are the same for self contained resources.
ocfl_idvarchar(503)NOT NULLThe OCFL id of the resource containing this Fedora resource.
session_idvarchar(255)NOT NULLThe session ID this operation is from.
operationvarchar(10)NOT NULLThe type of operation to be persisted. One of 'add' or 'delete'

Simple Search Indexes

The simple search indexes provide support for the various search features now available in Fedora.

This index contains basic information about all the resources in the repository.

FieldTypeConstraintsDescription
id
bigintPRIMARY KEY, AUTO INCREMENT
A unique numeric id for this resource.
fedora_id
          varchar(503)
NOT NULL, UNIQUE KEY
The internal ID of the resource.
createddatetimeNOT NULLThe datetime the resource was created.
modifieddatetimeNOT NULLThe datetime the resource was last modified.
content_sizebigint
The size of the content.
mime_typevarchar(255)
The mime-type of the resource

search_rdf_type

This index contains rdf types that exist in the repository.

FieldTypeConstraintsDescription
id
bigintPRIMARY KEY, AUTO INCREMENT
A unique numeric id for this rdf type.
rdf_type_urivarchar(255)NOT NULL, UNIQUE KEY
The URI of the RDF type

search_resource_rdf_type

This index links resources from the simple_search table to rdf types in the search_rdf_types table.

FieldTypeConstraintsDescription
resource_id
bigintNOT NULL, FOREIGN KEY REFERENCES simple_search (id)ID from the simple_search table
rdf_type_idbigintNOT NULL, FOREIGN KEY REFERENCES rdf_type_uri (id)ID from the search_rdf_type table
  • No labels