words what do you read, m'lord?

 

archive for january 2008

Work – Expression – Manifestation

What follows is an exact textual reproduction of slide 9 (with notes) from the Powerpoint Presentation Relationships in FRBR, by Dr. Barbara B. Tillett (FRBR Workshop, Dublin, Ohio, May 2, 2005). Here’s a link to the entire PPT file. Tillett is (or at least was, in 2004 when she wrote this booklet [PDF]) Chief of the Library of Congress’s Cataloging Policy & Support Office, Chair of the IFLA Cataloguing Section, a member of the Joint Steering Committee for Revision of the AACR, and more!

Relationships – Work/Expression/Manifestation

w1 J.S. Bach’s Goldberg variations

e1 performance by Glen Gould in 1981

m1 recording released on 331/3 rpm sound disc in 1982 by CBS Records

m2 recording re-released on compact disc in 1993 by Sony

m3 digitization of the Sony re-release as MP3 in 2000
An expression then “is embodied in” a manifestation. Notice that we are showing here a musical performance. Music can be performed, but only when it is recorded do we have a manifestation.

Work 1 – J.S. Bach’s Goldberg variations. . . is realized by the expression – that is, the performance by Glen Gould, which in turn “is embodied in” at least these 3 manifestations:

m1 – the recording on a phonograph record
m2 – a re-release on a compact disc and
m3 – a digitization on an MP3 file.

Implicitly the manifestations of the same expression have a sibling relationship to each other – that may be an equivalent content.

Posted by pzed on January 31, 2008 at 2.35pm

frbr and music recordings

I’ve been reading skimming Bryant’s Music Librarianship: A Practical Guide, specifically the chapters on cataloguing and classification. This is in connection with a larger project that I’ve only mentioned here in passing. Perhaps one day I’ll articulate it fully, although my sense of what I’d like to do is still evolving to an extent.

At any rate, there’s not a lot in Bryant yet that I feel want specifically to make notes on. He has a separate chapter on recordings, which is my area of interest, and so doesn’t discuss them in detail in the chapters I’ve skimmed. He makes the case, I think convincingly, that music materials are different from normal monographs and serials, presenting their own set of challenges. And although Bryant’s book is getting a little old (the second edition I’m reading was 1985; the first, 1959), I find myself anticipating FRBR.

For the most part, library cataloguing practices are based on use. That’s to say that historically we have developed our catalogues based on direct experience, describing actual items in hand. You might say this is a bottom-up approach, building rich bibliographic resources one concrete entry at a time.

FRBR recognizes that, thanks to the historic development of our catalogues, we have learned and can apply a fairly sophisticated conceptual framework to the bibliographic universe. Sophisticated, but also relatively simple. From OCLC:

FRBR conceptualizes three groups of entities:

  • Group 1 consists of the products of intellectual or artistic endeavor (e.g., publications).
  • Group 2 comprises those entities responsible for intellectual or artistic content (a person or corporate body).
  • Group 3 includes the entities that serve as subjects of intellectual or artistic endeavor (concept, object, event, and place).

The internal subdivision of Group One entities is important as well. FRBR specifies that intellectual or artistic products include the following types of entities:

  • the work, a distinct intellectual or artistic creation
  • the expression, the intellectual or artistic realization of a work
  • the manifestation, the physical embodiment of an expression of a work
  • the item, a single exemplar of a manifestation.

FRBR also specifies particular relationships between classes of Group One entities:

  • a work is realized through one or more expressions
  • — each of which is embodied in one or more manifestations
  • — — each of which is exemplified by one or more items.

It’s at the end here, with the work – expression – manifestation – item relationships, that things get a little weird. In part, this is because for most “group one entities” the distinction between expression and manifestation is unclear. Shakespeare is often used as an example. Let’s do it bottom-up: we have in our library a number of items called “A Midsummer Night’s Dream” for whom an entity named “Shakespeare” is responsible. These items represent various editions by various publishers, and we would say that these editions are equivalent to manifestations. Now here’s where it gets tricky: if the edition is a manifestation, what would be considered an expression? Well, in this case, all these various print editions are most likely to be considered manifestations of a single expression, which might be called “Midsummer Night’s Dream as a play”. Seems redundant, I agree, but of course I chose this play for a reason: “Midsummer Night’s Dream” is also an opera, and this opera (based on the play) can be considered a different expression of the same work. So to reiterate from the top, down: Midsummer Night’s Dream is a work that has (at least) two expressions, “play” and “opera”. The expression “play” finds its embodiment in numerous manifestations in the various editions compiled and published over the years, and each of these manifestations is exemplified by any number of copies, or items.

Now it seems to me music materials lend themselves quite nicely to FRBR. Adaptations and alternate arrangements are common, and Bryant spends considerable energy discussing the challenges of cataloguing them. FRBR seems an elegant and simple solution, where each adaptation is viewed as an expression.

But the other thing that makes music materials fit nicely with FRBR is the work (pardon the pun) that has been done establishing authoritatively the identity of the works of the major composers. Take, for example, the works of Bach by BWV number, or Mozart by Koechel (or Köchel; you see how quickly things get tricky with music description). It’s almost as though the FRBR notion of “work” was borrowed from music.

Now if only there were a universal authority database for musical works. Then, when, cataloguing a music item, you could simply point to the work and get on with your day. For now, I guess we have the {deep breath} Indexes to the established titles, variant titles, obsolete uniform titles, and work numbers in the Library of Congress Name-Authority File for the works of Bach, Beethoven, Brahms, Haydn, Mozart, Schubert, Tchaikovsky, Telemann.

Posted by pzed on January 31, 2008 at 11.58am

MySQL and PHP

I learned some SQL a few years ago, and with a refresher find that it’s fairly straightforward. And of course the nice thing about scripting your queries is that you can test them until they’re correct, and then forget about them.

Integrating this into PHP is still a bit of a challenge for me after, what, a day-and-a-half of trying? Things to remember:

  • Five basic steps to querying
    1. Open the database connection
    2. Select the database (it seems to me these first two have been combined in PHP’s mysqli functions, but I’m using a slightly older text)
    3. Run the query
    4. Fetch the query results into an array
    5. Format and print the results
  • Steps one through three require error handling
  • The array that’s created in step three is an associative array in which the field name given in the query corresponds to the data returned. The array is processed one row at a time. There’s no need to include the table name, because the array corresponds to the query structure, rather than the table structure. This is easy to visualize if you think of the table that is displayed when a query is run from the mysql command prompt.

So it’s fairly simple to generate a flat html table from data that exist across multiple database tables. I’d like to figure out how to generate not-so-flat data; for example, suppose (just suppose) I had a database in which a number of books are stored in one table, and their chapters are stored in another. I’d like an output that would list the book, then the contents, for each book. The simple approach described above won’t do it. Maybe in another day-and-a-half this too will seem simple, but right now I just can’t quite figure it out.

Williams, Hugh E. and David Lane. Web Database Applications with PHP and MySQL. Sebastapol, CA: O’Reilly, 2004.

Posted by pzed on January 30, 2008 at 1.49pm

a quick note

-> means “is being passed to.”

I’m sure I whipped right past this yesterday, but it makes sense to me now. The books I’m working through are both read to go to MySQL, but I don’t think I am. For most of the last two days I haven’t had access to the internet, so I put aside my music library reading to focus on the basics of PHP. These are, of course, related, and I soon have to get back the the music stuff. I want to keep at the PHP, though. It’s straightforward enough, but there are some conceptual aspects that I’m struggling with a bit, and I think another day’s immersion will do the trick.

Posted by pzed on January 25, 2008 at 10.28am

Vanillied

Main Entry: Vanilli
Function: transitive verb
Inflected Form(s): Vanilli·ed; Vanilli·ing
Date: 2008

1 : to mouth the words of others

Posted by pzed on January 24, 2008 at 6.48pm

includes and functions

includes

  • the usefulness of reusing code should be obvious to everyone!
  • require() and include() call code from a file
  • the main difference is that if something goes wrong, require() will return a fatal error, include() will only give a warning
  • data need not be passed to the include because it is inserted in the code and executed as if present all along (I think)
  • it’s a good idea to store include files outside the document tree, making them invisible to internet interlopers

functions

  • “A function is a self-contained module of code that prescribes a calling interface, performs some task, and optionally returns a result”
  • a library of user-defined functions can be stored in an include file
  • data must be passed to a function using a parameter (see “scope”, below)
  • user-defined functions must be declared, e.g.
  •   function say_hi()
      {
      echo 'hi';
      }

  • function names can only contain letters, digits, underscores; cannot begin with a digit; and cannot be the same as an existing function name

scope

  • scope controls where a variable is visible and useful
  • variables declared inside a function are in scope from the declaration until the function’s end brace; this is function scope, the variables are local variables
  • variables declared outside functions are in scope from the declaration to the end of the file, but not inside functions; this is global scope, the variables are global variables
  • if a require() or include() statement is used within a function, function scope applies; if not, global
  • the keyword global can be used to give a variable defined within a function global scope
  • to allow functions to operate on global variables, use a pass by reference; the function receives a reference to the original variable, and any modifications performed on the reference are also performed on the original
  • a pass by reference is created by prefixing an ampersand to the variable name in the function’s parameter list
  • the return keyword can be used to stop a function, usually in response to some condition; return can also be used to return a value
  • it is possible to call a function recursively, but this seems dangerous and doesn’t appear to have many benefits

Welling, Luke and Laura Thomson. PHP and MySQL Web Development. 2nd ed. Indianapolis: Sam’s, 2003.

Posted by pzed on January 24, 2008 at 4.55pm

arrays in php

  • an array is a type of variable used to store a set of values (that much I knew)
  • numerically indexed arrays are indexed numerically (!) starting at 0
  • an array can be initialized directly or an array can be created by copying from another array using the = operator
  • an array can also be created using data stored in a file, or in a database
  • loops are convenient ways to access numerically indexed arrays
  • an associative array allows the association of any key or index with each value
  • the each() function can be used to loop through an associative array
  • the list() function can be used to split an array into a number of values – I assume this corresponds to the number of associations
  • multidimensional arrays are created by nesting
  • one advantage of associative arrays is that data can be accessed by the name of the key, which makes more sense than a simple digit
  • thus it is easier to identify and access a single value in a complex array
  • however, looping is simpler with numerically indexed arrays, so these will be preferable in some situations

Welling, Luke and Laura Thomson. PHP and MySQL Web Development. 2nd ed. Indianapolis: Sam’s, 2003.

Posted by pzed on January 23, 2008 at 5.44pm

a mishmash of basic php

  • literal is the term (noun) used to describe raw data, such as text
  • variables and literals can be combined in output in two ways: variable names can be placed alongside literals within double-quoted strings, or single quoted literals can be concatenated with variables. The concatenation symbol is the period.
  • this distinction occurs because php attempts to evaluate the contents of double-quoted strings, whereas single-quoted strings are not evaluated
  • found a nice discussion of the difference between GET and POST methods here: http://www.cs.tut.fi/~jkorpela/forms/methods.html
  • identifier is a generic term for the names given to variables, functions, classes
  • php identifiers are case sensitive, and cannot begin with a digit (I haven’t quite figured out the use of $ yet)
  • php does not require variables to be declared before they are used
  • constants can be declared using the define() function
  • variables can have one of four types of scope
    1. built-in superglobal variables are visible everywhere within a script
    2. global variables declared in a script are visible throughout the script, but not inside functions
    3. variables used inside functions are local to the function
    4. variables used inside functions that are declared as global refer to the global variables of the same name

I think this last should read “variables that are declared as global inside functions refer to the global variables of the same name”.

Welling, Luke and Laura Thomson. PHP and MySQL Web Development. 2nd ed. Indianapolis: Sam’s, 2003.

Posted by pzed on January 23, 2008 at 12.40pm

I should just know this stuff

but it never hurts to review:

  • three-tier architectures: client(browser) ↔ web server ↔ database server
  • database applications are stateful, http is stateless
  • the browser is a thin client, but it is possible to pass some of the work to the browser; e.g. JavaScript can be used to validate data before sending to the web server

I have a tendency to skim discussion of strings, variables, math, increments, expressions, operators. . . . Can’t I just look that stuff up? But I may need to think about character encoding and data entry. On to the object-oriented stuff:

  • an object is a container in which data and functions can be bound
  • a class is an object (?) that can be used to create many similar objects (it doesn’t help that the book I’m using keeps using the term package to describe the example of a class that is used†)
  • a method is a function that belongs to a class (or package); a method can be called on an object that has been created by the class
  • each specific object created by the class is an instance

† – It reads like this: An object is created by a package. A method (or member function) is called on an object. A method is provided by a package. The package in question is a class (aren’t all packages – should I just forget they ever said “package”?). An object created by a class is an instance. Now I get an example that shows me how to create a user-defined class that counts. There’s nothing like learning by doing. Back to class:

  • variables defined within a class are member variables; functions, member functions.
  • “The class definition defines how data and functionality are actually bound together—member variables and functions take their meaning from the class of which they’re a part.”
  • class definitions can be placed in include files, the benefits of which aren’t listed in my text, but I imagine must include:
    1. efficiency: the class needn’t be written out every time it’s needed, saving time and bandwidth
    2. uniformity: by having only one copy of a class that could be used by multiple programmes, we ensure that the class always functions in the same way
    3. security: the class remains on the server, and I’m guessing this might make things a little more secure in some way. Or not. I just can’t finish a list after only two items.
  • a constructor is a method that is called when an object is created, and can be used to set up the initial state of the new object
  • a destructor is a method that is called when an object is destroyed
  • destructor functions are useful for housekeeping tasks like closing the connection to a DBMS or saving user preferences to a file

PHP also has private members variables, but it’s very rare that these ever become law.

I think I’ll save inheritance for tomorrow.

Williams, Hugh E. and David Lane. Web Database Applications with PHP and MySQL. Sebastapol, CA: O’Reilly, 2004.

Posted by pzed on January 22, 2008 at 5.28pm

Smiraglia, Bibliographic Control of Music

Smiraglia, Richard P. Bibliographic Control of Music, 1897-2000. Lanham, MD: Scarecrow P, 2006.
The bulk of this book consists of a chronological bibliography of bibliographic control of music materials, prefaced by the worthwhile if rather awkwardly titled article: “From James Duff Brown (1897) to Arsen Ralph Papakian (2000): An Essay on the Literature of the Bibliographic Control of Music.” Music has always been a special case:

Sound recording catalogers would argue endlessly about whether the whole item should be cataloged or whether it should be each work separately entered into the catalog. Given the structure of catalogs based on Cutter’s objectives (1876), this is not a surprise. The famous Rules for a Dictionary Catalog assumed a one-to-one correspondence between “work” and “document.” This, of course, has never been the case in music collections, where many copies and parts and varying scores of works were held; the problem was even more exaggerated in collections of sound recordings, where each work and every part of each work was held in multiple recordings of multiple performances. (6)

Smiraglia goes on to point out that a satisfactory model for representing the relationships involved has only recently been attempted, culminating in FRBR (1998). I’ve been thinking about FRBR for my own project, or at least entity relationships and database design. My first iteration will of necessity be simple, but FRBR is something to keep in mind. Smiraglia makes another interesting point regarding sound recordings:

Academic music librarians were concerned primarily with cataloguing and classification of the musical works represented on the recordings. But public librarians were mostly concerned with the arrangement of the recordings for browsing and circulation by the public. (8)

These two points blockquoted above dovetail for me. It seems as though both questions become somewhat moot in a digital age. Even in a library catalogue with brutal keyword searching and relevance algorithms, the inclusion of table of contents data makes the retrieval of a musical work from our sound collection relatively straightforward. Classification remains important for the browsing of the physical collection, but when the collection is digital browsing amounts to scrolling through lists (of links, of headings, of photographs). Two things then become important: the quality of the data, and decisions regarding how the data is indexed for searching and browsing.

Posted by pzed on January 22, 2008 at 10.43am