Primary keys…

One UPC, one EAN and one ISBN-10

The idea of primary key is older than computer science itself: libraries have had indexes for ages, and defining a canonical numbering system for referencing things is pretty natural, this is why we have the alphabetical order, or musical notes can be referenced by position in the alphabetical order. Of course this idea works better when there is a single system used, or at least once system was without ambiguity the primary one.

One such key system was ISBN, which assigned a unique, 10 character code to each book. In parallel the UPC system assigned a 12 digit code to things you could buy in a grocery store, this system was US-only, but got extended to work worldwide by making it longer (13 digits). The extended system was called EAN in Europe, JAN in Japan, even though it is the same system.

In parallel, work was done to unify the EAN and ISBN systems, and thus was born ISBN-13, which maps all ISBN codes into the EAN space, making it a single, unified system. This means a single barcode system that works both in book shops and grocery stores. This made it easier to sell books in supermarkets and sweets in book-shops.

While this worked out in Europe, it did not in the US, which is still stuck with the 12 digit UPC code. Officially the US should have migrated, but like with other foreign technologies, inertia won, this means foreign products need to be re-labelled when sold in the US and also that books, even when they use ISBN-13 barcodes, cannot be handled by regular barcode scanning systems (the scanner themselves are probably OK, the rest of the system is the problem).

So you end up with the weirdness presented in the image: a book with three identifiers: an ISBN-10 (0-8048-1905-X), an ISBN-13 (978-0-8048-1905-3) and an UPC (6-76251-81905-2). There are also three barcodes, one for the UPC, one for the ISBN-13, and one for the price. As you can convert a UPC into an EAN just by adding a zero in front, this book has two EAN codes: 0-676251-819052 and 9-780804-819053.

The interesting thing is that the number of the book is the same in all three systems: 1905. All systems use the same logic: a prefix is assigned to given entity (company or publisher) who assigns numbers with that prefix, the code of the item and a check symbol. The conversion from ISBN-10 to ISBN-13 is just done by changing the prefix (typically adding 978) and recomputing the check digit.

Here The ISBN block 0-8048 is allocated to Charles E. Tuttle Company, and the UPC prefix 676251 is also assigned to Tuttle Publishing. So the publisher is exporting the same book code (1905) into three systems for the sake of compatibility…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: