BookMooch logo
 
home browse about join login
Data Feeds at BookMooch
?



  • MySQL: entire database
    • This is a MySQL database export of the entire BookMooch database, in nicely structured and related tables. It is updated every sunday night.
    • The export consists mostly of INSERT statements, which should work on all SQL servers. The CREATE TABLE statements might need slight modification to work on SQL servers besides MySQL, but care has been taken to keep this export to SQL standards.
    • Tested against MySQL 5.1.51. Older versions of MySQL may not work correctly.
    • The tables and fields correspond directly to the fields in the XML exports documented below.
    • There are three main tables: asins, userids, pending (click each table for its documention).
    • There is also an optional asins_prices asins_bm_recommends, asins_comments, asins_giver_ids, asins_moocher_ids, asins_prices, asins_topics, asins_transactions, asins_userids, asins_wishlists_on,
    • For the userids table: userids_asins_listed, userids_feedback, userids_forumdata, userids_friends, userids_history_given, userids_history_received, userids_recommended, userids_pending_give, userids_pending_receive, userids_pointslog, userids_searchlog, userids_wishlist.
  • There are several small discrepencies between the XML and MySQL formats:
    • Each MySQL table has a "primary" auto-incrementing field. This is purely to make MySQL's primary key constraint happy, and is not in the BookMooch database.
    • The "condition" field, where it appears in BookMooch, appears in MySQL as the "condition_" field, because "condition" is a reserved keyword in MySQL.
  • There are no MySQL indices included in the schema. You should add the indices you need to speed up the queries you need to perform.
  • Downloads:
  • How to load these databases:
    • First, create a "bookmooch" database, and (optional) a bookmooch user.
    • Create the schema, with the command
      mysql -u bookmooch -p moochdb bookmooch < createtables.mysql
      (you will need to replace the name and password with your details)

    • Import each table set, with the command
      mysql -u bookmooch -p mypass bookmooch < asins.mysql
      mysql -u bookmooch -p mypass bookmooch < asinprices.mysql
      mysql -u bookmooch -p mypass bookmooch < userids.mysql
      mysql -u bookmooch -p mypass bookmooch < pending.mysql
      
    • Alternatively, you can load the data feeds up interactively, with the commands:
      mysql -s --show-warnings -u root -p
      
      drop database bookmooch;
      create database bookmooch;
      use bookmooch;
      source createtables.mysql;
      source asins.mysql;
      source asinprices.mysql;
      source pending.mysql;
      source userids.mysql;
      (note that the -s option is highly recommended, otherwise mysql displays a message for every single row successfully imported.)



  • Asins: XML
    • All information about every book referred to inside BookMooch Updated weekly.
    • Documentation
    • Download: gzipped / bzipped.
    • A smaller version of this feed exists which omits all books that have no copies available for mooching. gzipped / bzipped

  • Userids: XML
    • All information every user at BookMooch, except their for email and postal addresses.
    • Updated weekly.
    • Documentation
      Download: gzipped / bzipped

  • Pending: XML

  • Asin prices: XML

  • Moochable books: Text or XML
    • Every ISBN that is on moochable at BookMooch, carriage return separated.
    • Each ISBN is followed by the number of people who have that book available.
    • An ASIN is used instead of an ISBN when no ISBN is available.
    • Updated weekly.
    • Download: text version raw, gzipped or bzipped, or the XML version raw, gzipped or bzipped.

  • Wishlisted books: Text or XML
    • Every ISBN that is on someone's wishlist, carriage return separated.
    • Each ISBN is followed by the number of people who have that book on their wishlist.
    • As ASIN is used instead of an ISBN when no ISBN is available. Updated weekly.
    • Download: text version raw, gzipped or bzipped,
    • Download: XML version raw, gzipped or bzipped.




    All data on BookMooch (except for the "asins" feed above, which is provided to us by Amazon) is under a Creative Commons Attribution-Share Alike 3.0 License.




  • Feel free to
    EMAIL JOHN >
    if you have any questions or need something that isn't available