It has to be a varchar rather than a simple integer given that it is possible for ISBNs to contain the character X. Old style ISBNs are 10 characters, not including hyphens, but new style ones are 13 characters.

The as_string attribute is optional, and if set to 1 then values will be stored in the database with hyphens in the appopriate places. In this case, an extra 3 characters will be required.