Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected sql statement, as resource_type_id is only available in table handle

...

Column names like item_id or community_id have been mostly replaced with the tuple (resource_idresource_type_id) where resource_type_id is a constant specifying object type:

constantobject type
0bitstream
1bundle
2item
3collection
4community
5site
6group
7eperson

 

 

Code Block
languagesql
titleSo for example, a search to list all publication titles would be:
SELECT text_value FROM metadatavalue
JOIN handle as h ON h.resource_id = metadatavalue.dspace_object_id
WHERE metadata_field_id = (
  SELECT metadata_field_id
  FROM metadatafieldregistry mfr, metadataschemaregistry msr
  WHERE mfr.metadata_schema_id = msr.metadata_schema_id
  AND short_id = 'dc'
  AND element = 'title'
  AND qualifier IS NULL
)
AND resource_type_id=2;

...

Example eperson table in DSpace 4 (simplified to show only relevant parts):

eperson_idfirstnamelastname
1001JohnSmith
1002JaneDoe

 

Example eperson and metadatavalue tables in DSpace 5 (simplified to show only relevant parts):

eperson:

eperson_id
1001
1002

metadatavalue:

resource_type_idresource_idmetadata_field_idtext_value
71001123John
71001124Smith
71002123Jane
71002124Doe

See also

Jira
serverDuraSpace JIRA
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyDS-1582

...