1 what's where: using the voyager class diagrams and data dictionary with access queries elsug...

27
1 What's Where: Using the Voyager Class Diagrams and Data Dictionary With Access Queries ELSUG October 9, 2008 Cathy Salika CARLI Consortium of Academic and Research Libraries in Illinois

Upload: emmeline-alisha-fletcher

Post on 17-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

1

What's Where: Using the Voyager Class Diagrams and Data Dictionary With Access Queries

ELSUGOctober 9, 2008

Cathy SalikaCARLI Consortium of Academic and Research Libraries in Illinois

Voyager is a relational database

2

A relational database is a bunch of tables.A table looks like a spreadsheet.

Voyager has about 400 tables

3

Some are things you probably expectPATRON, ITEM, CIRC_TRANSACTION

Some are less obviousINV_LINE_ITEM_NOTES

Some are used to look up common codesLOCATION, FINE_FEE_TYPE

The _ID Fields

4

Many tables have a sequentially assigned number in a column with “_ID” in its name.

The _ID Fields

5

Sometimes the relationship is made directly.

The _ID Fields

6

Sometimes there’s an intermediary.

Starting to Write a Query

7

First you have to figure out

•what data you need•what tables the data are in•how to correctly relate those tables

This is easier if you know about Voyager because you use it regularly.

Starting to Write a Query

8

A good query

•is built a few tables at a time•is tested at each step of the way•has no extraneous tables

Starting to Write a Query

9

There are two tools to show you what’s in the tables and how the tables relate.

Voyager Class Diagramsavailable on SupportWeb

Voyager Data Dictionaryin the Voyager Technical User’s Guide

But I recommend that you use the CARLI version of these documents.

CARLI’s Class Diagrams

10

CARLI’s Data Dictionary

11

CARLI’s Data Dictionary

Lists the columns in alphabetical order (except that the _ID fields come first)

12

CARLI’s Data Dictionary

Serves as an index to the class diagrams

13

CARLI’s Data Dictionary

Tells you which fields are in UNICODE so you can format them properly

14

CARLI’s Data Dictionary

Includes comments on what’s in the fields

15

CARLI’s Data Dictionary

Provides lots of tips about where to find things.

16

CARLI’s Data Dictionary

Gives warnings about tables to avoid

17

CARLI’s Data Dictionary

Provides help with tricky links

18

Where to Get Them

19

CARLI’s Data Dictionary and the additional Class Diagrams

•Are in SupportWeb, in the KnowledgeBase. Search for “CARLI” and you’ll find it.

•Will soon be in the EL Commons

•Are on these flash drives

Views

20

Both versions of the Data Dictionary include views.

Their names end with _VW

Inside Voyager, a view is actually a query, but you can use them as if they were tables.

Some views are helpful, some are inefficient, some are WRONG.

So let’s see which are which.

Good Views Call Nos.

DEWEYCLASS_VWLCCLASS_VWNLMCLASS_VWSUDOCCLASS_VWUDCCLASS_VW

21

A call number is included in a view if the CALL_NO_TYPE in MFHD_MASTER says it should be there.

Good Views Fixed Field Data for BibsMARCBOOK_VWMARCCOMPUTER_VWMARCMAP_VWMARCMUSIC_VWMARCSERIAL_VWMARCVISUAL_VW 22

Inefficient Views CIRCCHARGES_VW CIRCRENEW_VW FUNDLEDGER_VWISSUES_VWITEM_VWSERIALS_VW

23

Why I don’t like them

•Some use a dozen tables or more, so queries that use them are slow.

•You have to know too much to understand their quirks.

(CIRCCHARGES_VW drops charge transactions if the item has been deleted.)

•It’s too hard to make your statistics consistent.

If you want to know what the views doand you have access to SQLPLUS on your serverand you don’t mind reading a bit of SQL…

here’s how.

24

SQL> set heading offSQL> set long 4500SQL> column view_name fold_a newlSQL> column text newl newl newl newlSQL> select view_name, text from all_views where owner=‘XXXDB’ order by view_name;

Bad Views AUTHBLOB_VWBIBBLOB_VWMFHDBLOB_VW

25

They don’t work correctly for long records.

When to use them: NEVER

And now, a commercial…

26

If you’re new to query writing in Voyager, consider attending 2 other sessions:

“Scary Queries Laid to Rest” by Jean Vik at 8:30am

“Idiomatic Access Reports” at 9:30am

Questions?

Thank you!

27