Fedora uses several database tables and indexes to provide fast retrieval of some information. This page will document documents the various tables Fedora creates. Because of 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.
Info |
---|
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.
...
Field | Type | Constraints | Description |
---|---|---|---|
fedora_id | varchar(503) | NOT NULL, PRIMARY KEY | The internal ID of the resourceresource |
parent | varchar(503) | NOT NULL | The internal ID of the containing resource |
start_time | datetime | NOT NULL | The datetime when the resource was created |
end_time | datetime | The datetime when the resource was deleted (but still has a tombstone) | |
updated | datetime | The datetime when any contained resources were updated (used for eTags) |
...
Field | Type | Constraints | Description |
---|---|---|---|
subject_id | varchar(503) | NOT NULL | The internal ID of the resource initiating the relationship (ie. the subject) |
property | varchar(503) | NOT NULL | The predicate of the relationship |
object_id | varchar(503) | NOT NULL | The internal ID of the resource which is the target of the relationship (ie. the object) |
source_id | varchar(503) | NOT NULL | The internal ID of the direct or indirect container containing the resource that created the relationship. |
proxy_id | varchar(503) | NOT NULL | The internal ID of the resource that created the relationship. This is contained within the source_id |
start_time | datetime | The datetime the relationship started. | |
end_time | datetime | The datetime the relationship ended. | |
last_updated | datetime | The datetime the relationship was last updated. (used for eTags) | |
tx_id | varchar(36) | NOT NULL | The transaction id this record belongs to |
operation | varchar(10) | NOT NULL | The type of operation this is, one of 'add' or 'delete' |
force_flag | varchar(10)??? (seems to always be NULL) | 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.
...
This index contains basic information about all the resources in the repository.
Field | Type | Constraints | Description |
---|---|---|---|
id | bigint | PRIMARY KEY, AUTO INCREMENT | A unique numeric id for this resource. |
fedora_id | varchar(503) | NOT NULL, UNIQUE KEY | The internal ID of the resource. |
created | datetime | NOT NULL | The datetime the resource was created. |
modified | datetime | NOT NULL | The datetime the resource was last modified. |
content_size | bigint | The size of the content. | |
mime_type | varchar(255) | The mime-type of the resource |
search_rdf_type
This index contains rdf types that exist in the repository.
Field | Type | Constraints | Description |
---|---|---|---|
id | bigint | PRIMARY KEY, AUTO INCREMENT | A unique numeric id for this rdf type. |
rdf_type_uri | varchar(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.
Field | Type | Constraints | Description |
---|---|---|---|
resource_id | bigint | NOT NULL, FOREIGN KEY REFERENCES simple_search (id) | ID from the simple_search table |
rdf_type_id | bigint | NOT NULL, FOREIGN KEY REFERENCES rdf_type_uri (id) | ID from the search_rdf_type table |