JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

XML-based book library: Draft layout

01/03/2009 @ 10:39 CT: The current version of the XML Schema I came up with is available for public use at http://media.jamesrskemp.com/xsd/MyBooks.xsd

Currently I have a SQL database (converted from an Access database) of all of the books that I own, as well as when I read them, how much I paid, etcetera.

Since I'm moving a good deal of information into XML, I figured I'd attempt to move this into XML as well.

Here's my draft:

  • books
    • book id=""
      • title
      • author
      • editor
      • purchase
        • date
        • place
        • price
      • pages
      • sell
        • date
        • price
      • isbn10
      • isbn13
      • readings read=""
        • read (unbound)
          • start
          • end
      • notes 
      • keywords
        • keyword (unbound)

Items in italic are optional.

Reasoning

Currently I allow for or use the following data:

  • id
  • title
  • author
  • editor
  • bought
  • start
  • finish
  • paid
  • store
  • info
  • pages
  • story
  • read
  • sort
  • philosophy
  • sold
  • sold price 

Fortunately, I read my books multiple times, but that also causes issues with a single field for a start and end date. To work against this a delimited the field with a semi-colon.

I never really used story much, and there must be a better way to sort my books, especially since it allows one option to be selected. The philosophy field is nice, but I don't know that that's applicable to a larger audience. To fight against this I've instead added a keywords element, which allows for multiple sub-elements.

I wanted to add ISBN so that I could better track which books I have, as well as potentially join this to Amazon (Associates).

Problems

There are a couple of issues with this design.

First, I have books that I have read, but I have no start or end date. I've made the elements optional, but if I have neither then I have nothing but an empty read element.

Should ISBN-10/13 be elements, or attributes of the title?

Should the purchase elements' children be elements or attributes?

Should pages be an element or attribute?

Unfortunately, there isn't already an XML example available that covers all of this additional information. So, I'm building on virgin ground (at least as far as what others make available to the world, and what Google finds in the first part of their results).

I realize that this isn't the best place to post if I want answers soon, but, am I missing anything?

Tags:

Categories: article, StrivingLife

Comments

1/3/2009 10:43:48 AM #

James Skemp

XML Schema created and available for public consumption.

I made a number of changes, but I'm overall very happy with it.

See the schema for more details.

James Skemp United States

1/6/2009 8:41:05 AM #

James Skemp

Schema changed slightly, in that the ISBN-10 and ISBN-13 items now have restrictions on how they can be formatted. As above, see the schema for more information.

James Skemp United States

1/6/2009 9:41:52 AM #

James Skemp

And ISBN custom types corrected, to allow for different groupings and max/min lengths. ISBN-13 may still need some work, but ...

Or, should isbn10 and isbn13 be converted into a single isbn attribute?

James Skemp United States

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
Loading