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.
Field | Type | Constraints | Description |
---|---|---|---|
fedora_id | varchar(503) | NOT NULL, PRIMARY KEY | the internal ID of the resource |
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) |
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.
Field | Type | Constraints | Description |
---|---|---|---|
fedora_id | varchar(503) | NOT NULL | The internal ID of the resource |
parent | varchar(503) | NOT NULL | The internal ID of the containing resource |
start_time | datetime | The datetime when the resource was created | |
end_time | datetime | The datetime when the resource was deleted (but still has a tombstone) | |
transaction_id | varchar(255) | NOT NULL | The transaction id this record belongs to |
operation | varchar(10) | NOT NULL | The 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.
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. |
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.
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) | ?? |