Skip to content
Stefan Dombek edited this page Feb 22, 2024 · 55 revisions

DBS - Deutsche Bibliotheksstatistik (German library statistics)

This page is still under construction!

The German Library Statistics (DBS) contains all important data on public and academic libraries. It documents the work of libraries on a national level.

The German library statistics (DBS) follows the uniform definitions of the international library statistics (ISO standard 2789). They enable a comparison of performance based on statistical data in the areas of equipment, inventory, loans, expenses, finance and staff.

In this cookbook, we would like to explain the different statistical points for academic libraries and how they can be queried.

Table of Contents

DBS 1 - 10 | General information
DBS 11 - 17 | Building, facility
DBS 18 - 34 | Books, dissertations, magazines and newspapers
DBS 38 - 58 | Other printed works
DBS 62 - 74 | Other non-electronic materials
DBS 78 - 98 | Manuscripts and autographs
DBS 102 | Literary remains
DBS 110 - 121 | Digital Library Holdings
DBS 122 - 130 | Journals and newspapers in non-electronic form
DBS 131 - 138 | Journals and newspapers in electronic form
DBS 141 - 148 | Receiving (Accession)
DBS 149 - 166 | Expenses, financing
DBS 167 - 184 | Offers and Use of Services
DBS 185 - 208 | Interlibrary loan, document delivery

Types of orders

Type of order (German) Explanation (German) Type of order (English) Explanation (English)
Gebende Fernleihe (aktive Fernleihe, AFL) Bücher aus der eigenen Bibliothek an fremde Bibliotheken ausleihen Interlibrary loan (active interlibrary loan, AFL) Borrow books from your own library to other libraries
Nehmende Fernleihe (passive Fernleihe, PFL) Bücher aus fremden Bibliotheken für die eigenen Benutzer:innen bestellen und ausleihen Interlibrary loan (passive interlibrary loan, PFL) Order and borrow books from other libraries for your own users

DBS statistics

DBS 210 - 214 | Descriptive and subject cataloging
DBS 215 - 223 | Staff, education level and training
DBS 224 - 234 | Further libraries in the library system
DBS 235 - 409 | Subject Statistics

DBS 1 - 10 | General information

[top]

DBS 1 - Library locations

[top]

DBS 2 - Students

[top]

DBS 3 - Scientific staff

[top]

DBS 4 - Borrower

[top]

DBS 5 - Registrations

DBS 5.1 - Registered users

[top]

DBS 5.2 - Registered users: students

[top]

DBS 5.3 - Registered users: scientific staff

[top]

DBS 5.4 - Registered users: external

[top]

DBS 6 - Opening days per year

[top]

DBS 7 - Opening hours during the week (regular opening hours)

[top]

DBS 8 - Percentage of closed stacks

[top]

DBS 9 - Exhibitions in the reporting year

[top]

DBS 10 - Other cultural events

[top]

DBS 11 - 17 | Building, facility

[top]

DBS 18 - 34 | Books, dissertations, magazines and newspapers

DBS 30 - Books in inventory: Incunabula

Incunabula (incunable, lat.) are printed matters (not manuscripts) printed in Europe before the year 1501, printed with movable types.

[top]

DBS 38 - 58 | Other printed works

[top]

DBS 62 - 74 | Other non-electronic materials

[top]

DBS 78 - 98 | Manuscripts and autographs

[top]

DBS 102 | Literary remains

[top]

DBS 110 - 121 | Digital Library Holdings

[top]

DBS 122 - 130 | Journals and newspapers in non-electronic form

[top]

DBS 131 - 138 | Journals and newspapers in electronic form

[top]

DBS 141 - 148 | Receiving

[top]

DBS 149 - 166 | Expenses, financing

[top]

DBS 151.1 - Acquisition: Purchase, Expenses for Open Access publications (related to number 149)

The expenses for open access publications. That includes all costs for Open Access (APCs, BPCs, Open Access memberships, pledging (e.g. Knowledge Unlatched)).

In FOLIO there are different ways to record the costs for open access. You can use the FOLIO app "Open Access" and use it to manage costs, or you can configure special budgets, funds or cost types for Open Access expenses in the FOLIO app "Finance". This cookbook describes the database query options for both variants. Additional costs must be added if necessary.

FOLIO app "Open Access"

Example:


FOLIO app "Finance"

You can set up budgets, funds or cost types specifically for Open Access in the FOLIO “Finance” app and query them via the database. Since you only need the actual expenses, you should start from the actual transactions made. This means that you look for all invoice transactions for the relevant period and filter out the corresponding budgets, funds or cost types for open access. Another advantage is that the transactions are in the system currency. This means that you receive calculable amounts through the transactions.

Example:

WITH parameters AS (
    SELECT 
        'APC' :: VARCHAR AS expense_class_name,
        '' :: VARCHAR AS expense_class_code,
        '' :: VARCHAR AS fund_name,
        '' :: VARCHAR AS budget_name,        
        '' :: VARCHAR AS ledger_name,
        '' :: VARCHAR AS fiscal_year_name,
        '' :: VARCHAR AS vendor_code,
        '' :: VARCHAR AS vendor_name
),
finance_funds AS (
    SELECT
        fiscal_year.id AS fiscal_year_id,
        jsonb_extract_path_text(fiscal_year.jsonb, 'code') AS fiscal_year,
        jsonb_extract_path_text(budget.jsonb, 'name') AS budget_name,
        fund.id AS fund_id,
        jsonb_extract_path_text(fund.jsonb, 'code') AS fund_code,
        ledger.id AS ledger_id,
        jsonb_extract_path_text(ledger.jsonb, 'code') AS ledger_code
    FROM
        folio_finance.fiscal_year
        LEFT JOIN folio_finance.budget    ON budget.fiscalyearid = fiscal_year.id
        LEFT JOIN folio_finance.fund      ON fund.id             = budget.fundid
        LEFT JOIN folio_finance.fund_type ON fund_type.id        = fund.fundtypeid
        LEFT JOIN folio_finance.ledger    ON ledger.id           = fund.ledgerid
),
transactions AS (
    SELECT 
        transaction.id AS transaction_id,
        CASE 
            WHEN jsonb_extract_path_text(transaction.jsonb, 'transactionType') = 'Credit'
                THEN 
                    jsonb_extract_path_text(transaction.jsonb, 'amount') :: NUMERIC(19,2) * -1
                ELSE 
                    jsonb_extract_path_text(transaction.jsonb, 'amount') :: NUMERIC(19,2)
        END AS transaction_amount,
        jsonb_extract_path_text(transaction.jsonb, 'currency') AS transaction_currency,
        jsonb_extract_path_text(transaction.jsonb, 'sourceInvoiceId')::UUID AS source_invoice_id,
        jsonb_extract_path_text(transaction.jsonb, 'sourceInvoiceLineId')::UUID AS source_invoice_line_id,
        jsonb_extract_path_text(transaction.jsonb, 'fromFundId')::UUID as from_fund_id,
        jsonb_extract_path_text(transaction.jsonb, 'fiscalYearId')::UUID AS fiscal_year_id,
        jsonb_extract_path_text(transaction.jsonb, 'transactionType') AS transaction_type,
        transaction.expenseclassid AS transaction_expense_class_id,
        jsonb_extract_path_text(expense_class.jsonb, 'name') AS transaction_expense_class_name,
        jsonb_extract_path_text(expense_class.jsonb, 'code') AS transaction_expense_class_code,
        CASE
            WHEN jsonb_extract_path_text(transaction.jsonb, 'transactionType') = 'Credit'
                THEN 
                    transaction.tofundid
                ELSE
                    transaction.fromfundid
        END AS transaction_fund_id
    FROM 
        folio_finance.transaction
        LEFT JOIN folio_finance.expense_class ON expense_class.id = transaction.expenseclassid
    WHERE 
    (
           jsonb_extract_path_text(transaction.jsonb, 'transactionType') = 'Pending payment'
        OR jsonb_extract_path_text(transaction.jsonb, 'transactionType') = 'Payment'
        OR jsonb_extract_path_text(transaction.jsonb, 'transactionType') = 'Credit'
    )
),
invoice_lines__fund_distributions AS (
    SELECT 
        invoice_lines.id,
        jsonb_extract_path_text(fundDistributions.jsonb, 'code') AS code,
        jsonb_extract_path_text(fundDistributions.jsonb, 'value') :: NUMERIC(19,2) AS value,
        jsonb_extract_path_text(fundDistributions.jsonb, 'fundId') :: UUID AS fund_id,
        jsonb_extract_path_text(fundDistributions.jsonb, 'expenseClassId') :: UUID AS expense_class_id,
        jsonb_extract_path_text(fundDistributions.jsonb, 'distributionType') AS distribution_type
    FROM 
        folio_invoice.invoice_lines
        CROSS JOIN LATERAL jsonb_array_elements(jsonb_extract_path(invoice_lines.jsonb, 'fundDistributions')) WITH ORDINALITY AS fundDistributions (jsonb)
),
all_transactions AS (
    SELECT
        *
    FROM
        transactions
        LEFT JOIN finance_funds                      ON finance_funds.fund_id                              = transactions.transaction_fund_id
                                                    AND finance_funds.fiscal_year_id                       = transactions.fiscal_year_id             
        LEFT JOIN invoice_lines__fund_distributions  ON invoice_lines__fund_distributions.id               = transactions.source_invoice_line_id
                                                    AND invoice_lines__fund_distributions.expense_class_id = transactions.transaction_expense_class_id
        LEFT JOIN folio_invoice.invoices             ON invoices.id                                        = invoice_lines__fund_distributions.id
        LEFT JOIN folio_organizations.organizations  ON organizations.id                                   = jsonb_extract_path_text(invoices.jsonb, 'vendorId')::uuid 
    WHERE
        invoice_lines__fund_distributions.expense_class_id IS NOT NULL 
        AND 
        ((finance_funds.fiscal_year = (SELECT fiscal_year_name FROM parameters)) OR ((SELECT fiscal_year_name FROM parameters) = ''))
        AND 
        ((finance_funds.ledger_code = (SELECT ledger_name FROM parameters)) OR ((SELECT ledger_name FROM parameters) = ''))
        AND 
        ((finance_funds.budget_name = (SELECT budget_name FROM parameters)) OR ((SELECT budget_name FROM parameters) = ''))
        AND 
        ((finance_funds.fund_code = (SELECT fund_name FROM parameters)) OR ((SELECT fund_name FROM parameters) = ''))
        AND 
        ((transactions.transaction_expense_class_name = (SELECT expense_class_name FROM parameters)) OR ((SELECT expense_class_name FROM parameters) = ''))
        AND 
        ((transactions.transaction_expense_class_code = (SELECT expense_class_code FROM parameters)) OR ((SELECT expense_class_code FROM parameters) = ''))
        AND 
        ((jsonb_extract_path_text(organizations.jsonb, 'code')  = (SELECT vendor_code FROM parameters)) OR ((SELECT vendor_code FROM parameters) = ''))
        AND 
        ((jsonb_extract_path_text(organizations.jsonb, 'name')  = (SELECT vendor_name FROM parameters)) OR ((SELECT vendor_name FROM parameters) = ''))
    --
    UNION 
    --
    SELECT
        *
    FROM
        transactions
        LEFT JOIN finance_funds                      ON finance_funds.fund_id                              = transactions.transaction_fund_id
                                                    AND finance_funds.fiscal_year_id                       = transactions.fiscal_year_id             
        LEFT JOIN invoice_lines__fund_distributions  ON invoice_lines__fund_distributions.id               = transactions.source_invoice_line_id
                                                    AND invoice_lines__fund_distributions.expense_class_id = transactions.transaction_expense_class_id
        LEFT JOIN folio_invoice.invoices             ON invoices.id                                        = invoice_lines__fund_distributions.id
        LEFT JOIN folio_organizations.organizations  ON organizations.id                                   = jsonb_extract_path_text(invoices.jsonb, 'vendorId')::uuid 
    WHERE
        invoice_lines__fund_distributions.expense_class_id IS NULL 
        AND 
        ((finance_funds.fiscal_year = (SELECT fiscal_year_name FROM parameters)) OR ((SELECT fiscal_year_name FROM parameters) = ''))
        AND 
        ((finance_funds.ledger_code = (SELECT ledger_name FROM parameters)) OR ((SELECT ledger_name FROM parameters) = ''))
        AND 
        ((finance_funds.budget_name = (SELECT budget_name FROM parameters)) OR ((SELECT budget_name FROM parameters) = ''))
        AND 
        ((finance_funds.fund_code = (SELECT fund_name FROM parameters)) OR ((SELECT fund_name FROM parameters) = ''))
        AND 
        ((transactions.transaction_expense_class_name = (SELECT expense_class_name FROM parameters)) OR ((SELECT expense_class_name FROM parameters) = ''))
        AND 
        ((transactions.transaction_expense_class_code = (SELECT expense_class_code FROM parameters)) OR ((SELECT expense_class_code FROM parameters) = ''))
        AND 
        ((jsonb_extract_path_text(organizations.jsonb, 'code')  = (SELECT vendor_code FROM parameters)) OR ((SELECT vendor_code FROM parameters) = ''))
        AND 
        ((jsonb_extract_path_text(organizations.jsonb, 'name')  = (SELECT vendor_name FROM parameters)) OR ((SELECT vendor_name FROM parameters) = ''))
)
SELECT
    SUM(all_transactions.transaction_amount) AS expenses,
    all_transactions.transaction_currency AS currency,
    COUNT(all_transactions.transaction_id) AS count_transactions,
    all_transactions.fiscal_year
FROM 
    all_transactions
GROUP BY 
    currency,
    fiscal_year
ORDER BY 
    fiscal_year DESC

[top]

DBS 167 - 184 | Offers and Use of Services

[top]

DBS 185 - 208 | Interlibrary loan, document delivery

[top]

DBS 210 - 214 | Formal and subject indexing

[top]

DBS 215 - 223 | Personnel, education and training

[top]

DBS 224 - 234 | Other libraries in the library system

[top]

DBS 235 - 409 | Subject Statistics

19.1. General

[top]

19.2. Philosophy

[top]

19.3. Psychology

[top]

19.4. Religion and theology

[top]

19.5. Pedagogy, education, teaching

[top]

19.6. Sociology, society, statistics

[top]

19.7. Politics, public administration, military

[top]

19.8. Economy, work, tourism industry

[top]

19.9. Law

[top]

19.10. Nature, natural science in general

[top]

19.11. Mathematics

[top]

19.12. Informatics, cybernetics

[top]

19.13. Physics, astronomy

[top]

19.14. Chemistry

[top]

19.15. Earth Sciences, Mining

[top]

19.16. Biology

[top]

19.17. Medicine, veterinary medicine

[top]

19.18. Technology, basics

[top]

19.19. Mechanical engineering including materials science, production engineering, transport technology, microtechnology, process engineering

[top]

19.20. Electrical engineering including electronics, communication technology, energy technology

[top]

19.21. Civil engineering, mining engineering

[top]

19.22. Agricultural and forestry science, household and nutritional science, food technology

[top]

19.23. Environmental protection, spatial planning, landscape design

[top]

19.24. Architecture, fine arts, photography

[top]

19.25. Music, theater, dance, film

[top]

19.26. Sport

[top]

19.27. General and comparative linguistics and literature

[top]

19.28. English language and literature

[top]

19.29. German Linguistics and Literature

[top]

19.30. Romance Linguistics and Literature

[top]

19.31. Classical Linguistics and Literature

[top]

19.32. Slavic and Baltic Linguistics and Literature

[top]

19.33. Linguistics and literature of other languages

[top]

19.34. Archaeology, history, including social and economic history

[top]

19.35. Geography, local and regional studies, travel, atlases, folk and ethnology

[top]

Clone this wiki locally