Current Release

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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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


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 relationships created in a transaction that have 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 created but 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)
??
  • No labels