Thank you Claudia,

one question, perhaps a silly one: How can I access the database?

Thank you!
Stefanie

-----Ursprüngliche Nachricht-----
Von: [email protected] 
[mailto:[email protected]] Im Auftrag von Claudia Jürgen
Gesendet: Dienstag, 11. April 2017 15:03
An: [email protected]
Betreff: Re: [dspace-community] number of bitstreams

Hallo Stefanie,

you may query the database.
Here is a query which will give you all the bitstreams of the items which are 
in_archive are not of internal format. Derived bitstreams like extracted text, 
thumbnail and licenses are excluded:
select bf.mimetype, count (b.bitstream_format_id) as Anzahl, 
bf.bitstream_format_id from bitstreamformatregistry bf , bitstream b where 
b.bitstream_format_id=bf.bitstream_format_id and bf.internal=false and 
b.bitstream_id in (select bitstream_id from bundle2bitstream where 
bundle2bitstream.bundle_id in (select resource_id from metadatavalue where 
text_value='ORIGINAL' and metadata_field_id=64 and
resource_type_id=1 and resource_id in (select bundle_id from item2bundle where 
item_id in (select item_id from item where in_archive=true and 
owning_collection in (select collection_id from community2collection where 
community_id=YOUR_COMMUNITY_ID))))) group by bf.mimetype, 
bf.bitstream_format_id order by bf.mimetype;

Replace the YOUR_COMMUNITY_ID with the real one.

You'll get something like:
            mimetype            | anzahl | bitstream_format_id
-------------------------------+--------+---------------------
  application/pdf               |     50 |                   3
  application/postscript        |      2 |                  24
  application/vnd.ms-powerpoint |      4 |                   8
  video/quicktime               |      1 |                  25
(4 rows)



Hoffe das hilft

Claudia Jürgen




Am 11.04.2017 um 10:14 schrieb Stefanie Behnke:
> Dear all,
>
>
>
> what is the easiest way to get the number of all bitstreams in a community? 
> The number of items in one community is 4460, and I now want to know how many 
> bitstreams are there, if possible, ordered by mimetype.
>
>
>
> Thanking you in advance
>
> Stefanie
>

--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
[email protected]
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

Reply via email to