I read a lot of science-fiction anthologies and odd issues of various SF magazines (particularly Interzone), plus an increasing amount of stuff online.

Every now and then I read a story by someone and I think that was great. I wonder if I own anything else by them? Unfortunately, that's a hard question to answer.

The Internet Speculative Fiction Database is an online database of many books and magazines, likely including most of the ones I own.

An application that would let me input the media I owned (ranges of interzones, particular anthologies) and tell me if I own anything else containing a story by a particular writer would be very useful.

About the ISFDB

contributing

There's a (seemingly hand maintained) list of Interzone issues at http://www.isfdb.org/wiki/index.php/Magazine:Interzone_Science_Fiction_and_Fantasy. At the time of writing, this shows that issues 217+ are not present. Searching for them via http://www.isfdb.org/cgi-bin/search.cgi (the second form, interzone in one box, title/AND/title number in the other) doesn't show them up, but it doesn't show up 216 either.

I decided to fill in the data for 217 and 218. There is one editor box and a button to "Add Author". Presuming that is how you add further editors, I click it a few times. I assume "Pub Format" means "Binding". "Artist", cover artist.

There's no combo-box entry for "Interview", despite it being present in e.g. http://www.isfdb.org/cgi-bin/pl.cgi?NTRZNSPTMB2006: this turns out to be because interviews and book reviews are handled separately below.

The form is enormous and I felt very uncomfortable after a while having all this unsubmitted data sitting around in my browser window.

On submission I get a page which gives me a raw XML 'record' encoding my form submission and reporting that it is 'Submitting the following record'.

My record does not (yet) turn up in search results. It now occurs to me in the search results that I should have perhaps made up a tag during my submission e.g. 'INTZFEB2008'.

Approach 1: API

ISFDB have a REST API.

Example web API call for a book, via ISBN-10. Note that this is an anthology and there are no authors listed. (Human readable book page). Do any anthology pages have author info?

What about magazines, do they have ISBNs? example interzone issue, human readable; URL equivalent (returns 0) (is it equivalent?)

Approach 2: DB dump

ISFSB provide nightly dumps of their MySQL database.

structure

  • table magazine, fields Mag_Code, Mag_Name, Mag_Desc _

  • table pubs, fields pub id (int 11) ; pub tag (such as THMMMTHBKF2000 in the human readable book example above);

  • a work and a publication are different. Work "Nightmare Blue", author Gardner Dozois, indexed by 2931 on ISFDB, has two publications; one of which is a 1977 paperback, pub tag NGHTMRBLLD1977. Publications have ISBNs, not "works".

  • interzone are in the pubs table! e.g. June 2008 is pub id 264230; pub tag INTZJUN2008: ISSN 0264-3596 (note: ISSN does not vary across issues)

    • searching the pub_content table for pub_id 264230 gives 29 rows, with
    • pubc_id and title_id and page.

      • title_id maps into the titles table. Example title_id for a short
      • story: 886974, "The Hour Is Getting Late". There is no author column.

IZ 180 has story authors

  • http://www.isfdb.org/cgi-bin/pl.cgi?INTZJUNJUL02
  • the canonical_authors table has a title_id field which gives you a ca_id and an author_id; the latter maps into the athors table which (finally) gives you author_canonical (their name); author_legalname (search order) and various other bits