Optimized creation of statistical reports for items and circulation transactions in Aleph500...

Post on 06-Jun-2015

93 views 1 download

Tags:

description

Presentation made in Sept. 2012 at the IGeLU Conference in Zurich, Switzerland. Before the 2000's, PUCRS libraries generated different statistical on-demand reports by running several separate queries which consumed much time to be composed and executed, one at a time, through SQL clients. To optimize this work, the library developed a method to run a batch of SQL queries during the night (simply using Linux shell scripts and native sqlplus) that feeds a large array of results in a MS-Excel file which contains different spreadsheets. Each spreadsheet sums and gathers statistical data according to the information needs of University academic departments and government agencies. Thus, two statistical reports are monthly generated based on the information recorded in the Aleph database: (1) General Collection Data (687 SQL queries) and (2) General Circulation Data (106 SQL queries). Both reports can generate: (a) numerical tables and also (b) charts (pie, line...). It is an economical and optimized solution which uses only Linux shell scripts, sqlplus and MS-Office Excel.

Transcript of Optimized creation of statistical reports for items and circulation transactions in Aleph500...

1

Michelângelo Mazzardo Marques VianaPontifical Catholic University of Rio Grande do Sul

Porto Alegre - Rio Grande do Sul - Brazil

Optimized creation of statistical reports for items and circulation transactions in Aleph500 (version 20)

2

Roberto Bertolo Moura Senior System Librarian at PUCRS

Main author of this development

3Source: Google Maps

4Source: Google Maps

5Source: Google Maps

6Source: Google Maps

7Source: Google Maps

8PUCRS Main Campus is located in the capital city of Porto Alegre, Brazil. Source: Google Maps

The Pontifical Catholic University of Rio Grande do Sul (1948)

9

Research areas

Accounting Aeronautical Sciences Applied Social Sciences Architecture and Urbanism Bioethics Biomedical Research Biosciences Brain Studies Chemistry Computer Science Dentistry Earth Sciences Economics

Education Energy Engineering Environment Geriatrics and Gerontology Human Sciences Law Letters Management Mathematics Medicine Natural Sciences Nursing

Nutrition Pharmacy Philosophy Physical Education and

Sports Science Physics Physioterapy Psychology Social Communication Social Services Theology Toxicology

10

Information needs

Brazil’s Ministry of Education

Library Administration

University’s Higher

Administration

Collection Data

Circulation Data

Accesses Data

Analytical Data

11

Information need #1 Parameters SQL

queries Output Format Deliver

Before: different flows

Information need #2 Parameters SQL

queries Output Format Deliver

Information need #3 Parameters SQL

queries Output Format Deliver

Information need #n Parameters SQL

queries Output Format Deliver

Initial and permanent settings.Modified only when there are changes.

On a desired frequency.

Today: integrated flow for all reports

Specify all information

needsDefine global

parametersDefine which primary data

to collect

Group, Link and

Combine primary

dataDefine SQL statements

Schedule SQL

automatic execution Get collect

data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

12

13

Specify all information

needs

Define global parameters

Define which primary data to

collect

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Step by step execution…

14

Specify all information

needs

Define global parameters

Define which primary data to

collect

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Specify all information needs

Collection Circulation Accesses Simultaneous access and so on

15

Specify all information

needs

Define which primary data to

collect

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Define global parameters

Item status codes Collections codes User status codes MARC contents for filter Item material codes What data must be grouped

Define global parameters

16

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Define which primary data to collect

About collection: Number of current foreign printed periodicals Number of licensed e-books of Human Sciences Number of audiovisual documents added into the

collection in the last month Number of books acquired by purchase for

Biological Sciences

Define global parameters

Define which primary data to

collect

17

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Define which primary data to collect

About circulation: Number of book loans made by each selfcheck-out

machine Number of book returns made by each selfcheck-in

machine Number of notebook loans by floor Simultaneous use of notebook on each floor Simultaneous use of study rooms on each floor

Define global parameters

Define which primary data to

collect

18

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

Define which primary data to collect

About accesses: Access made by visitors Access made by PUCRS users on study floor Median of Number of daily accesses to the Library Median of simultaneous users inside the Library at

same time by time range Average number of hours that user stays in the

Library

Define global parameters

Define which primary data to

collect

19

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

20

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

21

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

22

Specify all information

needs

Group, Link and Combine primary data

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Design the Excel Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

23

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Group: Join similar data in different TABs:

24

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Link: Associate each cells with its

respective cell of the MATRIX tab:

25

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Link: Associate each cells with its

respective cell of the MATRIX tab:

26

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

27

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

28

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Specify all information

needs

Define SQL statements

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Group, Link and Combine primary data

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Combine: Use SUM functions to calculate the totals:

29

30

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define SQL statements

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

SQL statements for collection: 687 queries

SQL statements for circulation and accesses: 105 queries

Define SQL statements

31

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define SQL statements

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

32

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define SQL statements

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

33

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define SQL statements

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

34

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define SQL statements

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

35

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Define the schedule in JOB DAEMON

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Create a SHELL SCRIPT to execute the SQL

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

.SQL file location36

37

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them

into the Spreadsheets

Store all queries inside a .SQL file

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

38

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

Select * fromPUCRS.RESULTS

order byDADO1, DADO2, DADO3

39

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

40

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

41

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

42

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

43

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

44

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

45

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

46

Specify all information

needs

Schedule SQL automatic execution

Get collect data and paste them into the Spreadsheets

Define global parameters

Define which primary data to

collect

Design the Excel

Spreadsheets

Group, Link and Combine primary data

Define SQL statements

Get collect data and paste them

into the Spreadsheets

when the data is collected and organized in the spreadsheet, you can create all graphics

needed.

47

Before Different reports = different SQL queries Too much work and too much time Manual work

Today Only one step to collect all data Only one step to create all reports Automated and fast work

Before and Today

Initial and permanent settings.Modified only when there are changes.

On a desired frequency.

Today: integrated flow for all reports

Specify all information

needsDefine global

parametersDefine which primary data

to collect

Group, Link and

Combine primary

dataDefine SQL statements

Schedule SQL

automatic execution Get collect

data and paste them

into the Spreadsheets

Design the Excel

Spreadsheets

48

Michelângelo Mazzardo Marques Vianamviana@pucrs.br

Thank you!