Books - My library and the technology behind the scenes
Originally written in circa 2003...
The idea seemed simple - get a bar code scanner to make keeping track of my books easy! I learned far more than I wanted to during this Labor Day weekend project in 2001.
Step 1 - Get a barcode scanner
This was an easy step. I found a great scanner at Custom Sensors Inc. (www.csensors.com) I got the CCD8000 handheld scanner. It works great! It has the key features you need:
- Able to train for different bar code types
- Easy to scan
- Supports "keyboard wedge"
The keyboard wedge is very important. This lets the scanner input information anyplace you can type! No software is needed since your computer thinks it's getting information from your keyboard.
When you train it, you need to set it up so that it can scan EAN-13/UPC-A codes.
Step 2 - Find some library software
At the time I did this project this seemed impossible, or at least impractical. All I wanted was software that would:
- Let me scan the barcode (EAN-13) into a package
- Have the software package look up the information about the book (author, title, publisher, date, etc.) based on that code
- Add that book to my "library" - hopefully a database in the software package.
Guess what! It appears that only libraries do this! No one in their right mind would do this at home! All the packages were priced quite high (typically starting at more than $1000).
I could not even find an affordable database with all the book information so that I could design a program to look up the information.
I did find one program that almost did what I wanted but there were serious problems with the workflow - It expected the ISBN number (which is what I'm sure you'd expect too), however, the barcode doesn't have the ISBN number. The second problem was that the hit rate (books it knew about) was very poor. I tried about 50 books and it only found about 5.
Step 3 - Write some software
Since step 2 failed, I had to resort to writing some software.
In writing the software first I put a simple database together containing information about the book.
I then had to write code to convert from EAN-13 to ISBN. You have the right information in the EAN-13 code to get the ISBN number but you need to know how to compute the check-digit for the ISBN number. It's also a good idea to have the code verify the check digit on the EAN-13 number so that you know you scanned the number properly although I've never had a "bad" scan.
Step 4 - Scan every book in my office and input the information for each book
Since the hit rate was too low I had to type in the information about all the books in my office. I only did the books in my office and we've not yet done the books in the rest of the house. We may actually get around to it some day since my "Library Software" is maturing somewhat (thanks to .NET).
Putting the Library together in .NET was actually pretty fun.
If you visit the "Docs" at the top of the page you can see how some of this is done - at least in design. After going to the link, select the "zachrys" project. Then expand the "zachrys.BusinessRules" and select "Book". This documentation will explain all the details of EAN-13 numbers and ISBN number.
You can also select Library under the BusinessRules to see how that's set up.
The End Result
I was actually able to research EAN-13/ISBN numbers, write some web pages that would let me input the book information (and write it to a Microsoft SQL Server Database), and then input the information for over 300 books during that weekend. Now I have a web page that allows me to look for books, check them out to people, and input new books as I get them. Today it's still the case that every book in my office is in the database.
I originally did the work with VBScript and Microsoft SQL Server. Since then I ported it to C# in .NET (much nicer programing environment) and then ported "back" to Microsoft Access for the database (since the licensing for SQL Server is far too costly for doing personal things like a library that others can view from a web site).