ISBN
identity.commerce.isbnInternational Standard Book Number. ISBN-10 (10 digits with check digit) or ISBN-13 (13 digits with check digit). Also accepts with hyphens.
Worked samples
DuckDB 1.5.5 · finetype 0.6.64
| Value | As VARCHAR | isbn_version |
|---|---|---|
| 978-0-13-110362-7 | 978-0-13-110362-7 | ISBN-13 |
| 0-13-110362-8 | 0-13-110362-8 | ISBN-10 |
| 9780131103627 | 9780131103627 | ISBN-13 |
Shape
^(?:97[89]-)?[0-9]{1,5}-[0-9]+-[0-9]+-[0-9X]$|^[0-9]{9}[0-9X]$|^[0-9]{13}$| Value | Length | Shape |
|---|---|---|
| 978-0-13-110362-7 | 17 | matches |
| 0-13-110362-8 | 13 | matches |
| 9780131103627 | 13 | matches |
| 978-0-13-110362- | 16 | rejected: one character short |
Told apart
Going the other way, this type's own rule accepts 2 of 3 samples of EAN.
Background
Origin
The need for an international numbering system for books was first discussed at the Third International Conference on Book Market Research and Rationalisation in the Book Trade, held in November 1966 in Berlin.[1] At that time, a number of European publishers and book distributors were considering the use of computers for order processing and inventory control.[1] The ISBN system was developed out of the book numbering system introduced in the United Kingdom in 1967 by J. Whitaker & Sons, Ltd.[1] It also grew out of the book numbering system introduced in the United States in 1968 by R. R. Bowker.[1] ISO Technical Committee 46 on Information and Documentation set up a working party to investigate adapting the British system for international use.[1] The ISBN was approved as ISO standard 2108 in 1970.[1]
The original standard was revised in 1978, 1992 and 2005.[1] Over those revisions the original 10-digit ISBN was extended to 13 digits.[1] ISBNs were 10 digits in length up to the end of December 2006, and since 1 January 2007 they always consist of 13 digits.[2] The fifth and latest edition of the ISBN Standard was published in December 2017.[3] ISO has appointed the International ISBN Agency to act as the global registration authority for the ISBN Standard and system.[4]
A 13-digit ISBN has five elements: a prefix, a registration group element, a registrant element, a publication element and a check digit.[2] The prefix is a three-digit number made available by GS1, formerly EAN International.[1] Prefixes that have already been made available by GS1 are 978 and 979.[1] The registration group element identifies a country, geographical region or language area, and may comprise up to 5 digits.[1] The registrant element identifies a particular publisher or imprint, and may comprise up to 7 digits.[1] Publishers with the largest expected title outputs are assigned the shortest registrant elements.[1] The publication element identifies a specific edition of a publication by a specific publisher, and may comprise up to 6 digits.[1] The ISBN-13 check digit is calculated using a modulus 10 system with alternate weights of 1 and 3.[2] The ISBN-10 check digit ranges from 0 to 10, and the symbol X is used for 10.[5]
Use
An ISBN is a product identifier used by publishers, booksellers, libraries, internet retailers and other supply chain participants for ordering, listing, sales records and stock control.[2] Each different product form of a book, such as paperback, EPUB or .pdf, should be identified separately.[2] So an ISBN column identifies editions and formats, not works: expect several ISBNs for one title, and group on something else if you want to count books. (Meridian's view) Once assigned, an ISBN can never be reused to identify another monographic publication, even if it was assigned in error.[1] Occasionally, publishers erroneously assign an ISBN to more than one title.[5] Treat an ISBN as a strong hint about a book rather than a guaranteed unique key, and check the title alongside it when a join matters. (Meridian's view)
The use of hyphens or spaces has no lexical significance and is purely to enhance readability.[1] In MARC 21 bibliographic records, field 020 holds the ISBN, and the embedded hyphens are not carried in the record.[6] MARC 21 keeps a cancelled or invalid ISBN in a separate subfield, $z, apart from the valid ISBN in $a.[6] Strip hyphens, spaces and any leading ISBN label before comparing values, and store the bare digits as text so leading zeros and a trailing X survive. (Meridian's view)
A 10-digit ISBN is converted to a 13-digit ISBN by prepending 978 and recalculating the check digit with the ISBN-13 algorithm.[5] ISBNs beginning with a prefix other than 978, currently only 979, have no 10-digit equivalent.[5] When a file mixes both lengths, convert everything to ISBN-13 before joining, since that direction always works. (Meridian's view) The ISBN is machine-readable in the form of a 13-digit EAN-13 bar code.[1] The ISBN is now fully compatible with GTIN-13.[1] That compatibility means a 13-digit ISBN can sit in a column of retail barcode numbers looking no different from them, so look at the prefix before treating a value as a book. (Meridian's view) Verify the check digit before trusting a column of 10- or 13-digit numbers as ISBNs, since other long numeric identifiers share the same lengths. (Meridian's view)
Where you'll meet it
Open Library's ISBN API looks up a book by a path of /isbn followed by a valid ISBN 10 or 13.[7] Open Library's legacy Books API returns an identifiers object with isbn_10 and isbn_13 arrays.[7]
Sources
- [1]ISBN Users' Manualdocumentation
- [2]What is an ISBN? | International ISBN Agencyorganisation
- [3]ISBN Users' Manual | International ISBN Agencyorganisation
- [4]ISO | International ISBN Agencyorganisation
- [5]ISBN - Wikipediasecondary source
- [6]MARC 21 Format for Bibliographic Data: 020: International Standard Book Number (Network Development and MARC Standards Office, Library of Congress)documentation
- [7]Developer Center / APIs / Books API | Open Libraryorganisation
Detection notes
v1 migration: Was code.isbn. Pattern accepts ISBN-10 and ISBN-13 with or without hyphens. Decompose infers version based on length. The `checksum: isbn` directive drives the model's checksum_substance_guard, which demotes a column of same-length integers that fail the ISBN check digit (e.g. a financial figure like marketCap) off the isbn label.
Use it
$ finetype infer -i "978-0-13-110362-7" --mode column
→ identity.commerce.isbn
SELECT ft_infer('978-0-13-110362-7');
-- → 'identity.commerce.isbn'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/identity.commerce.isbn · Frictionless type string
finetype taxonomy identity.commerce.isbn -o json-schema