Hi Joshua,

Items can belong to several Collections, so there may not always be a 
single hierarchy.  But each Item will have an "owning collection".  If you 
are using DSpace 7, you can get this information from the REST API itself:

* Get "owning collection" for an 
Item: 
https://github.com/DSpace/RestContract/blob/dspace-7_x/items.md#owning-collection
* Get parent community for 
Collection: 
https://github.com/DSpace/RestContract/blob/dspace-7_x/collections.md#parent-community

That's the easiest way to gather this information.  It's also possible to 
use the database, but it'd be a complex query.  You'd need to look closer 
at the "collection2item" (maps collections to items) and 
"community2collection" and "community2community" tables, as those contain 
the hierarchy between these objects.

Tim

On Thursday, April 11, 2024 at 4:45:03 PM UTC-5 [email protected] wrote:

> Hello,
>
> We have a long list of items which need to show a hierarchy (under which 
> community name and collection name). How can I pull the data by using  
> Postgres DB? I am looking at the DB schema, but I am confused. Or the other 
> way? Can anyone help me out with this?
>
>
>
> [image: University of Delaware]
>
> Joshua Kim
> Library, Museums and Press
> [email protected]
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/7621d062-5ff1-4c0e-9726-f2261cafc52dn%40googlegroups.com.

Reply via email to