On Tue, Jul 14, 2015 at 03:36:12PM +0000, George Stanley Kozak wrote:
> Back in DSpace 1.8.2, I executed a bunch of SQL queries to generate reports 
> for people at my site.
> One of my reports relied on getting the name and description of a bitstream.
> The report that I generated used this SQL query:
> select bitstream_id,name,description,sequence_id,size_bytes from bitstream;
> I see now in DSpace 5.2  that "name" and "description" are no longer part of 
> the bitstream table.  Where are these values now held?

Bitstreams can now have metadata, and those fields moved to the
metadatavalue table.  You can for example:

  JOIN metadatavalue md
   WHERE resource_id = bitstream_id
    AND resource_type_id = 0
    AND metadata_field_id = (
     SELECT metadata_field_id FROM metadatafieldregistry
      WHERE metadata_schema_id = (
       SELECT metadata_schema_id FROM metadataschemaregistry
        WHERE short_id = 'dc')
       AND element = 'title'
       AND qualifier IS NULL
     )

> Also, is there a document out there that details the SQL changes in DSpace 
> 5.2?

I don't recall one, but the main idea is that metadata support moved
from Item to DSpaceObject, and then all <extends DSpaceObject> had
their interesting fields changed into metadata.  I went and looked at
Bitstream.getName() to recall that that is now stored in dc.title.
What is left in the object tables is mainly internal bookkeeping stuff
like checksums.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to