• CELKO (4/23/2015)


    ISBN is displayed with dashes for human convenience, but it's actually composed of elements .. again, under the rules for 1NF, each of those should be stored in separate columns.

    No. Atomic and scalar are different concepts. Does breaking the value into parts destroy the meaning of the data element? In the case of an ISBN, it sure does! I cannot find the book without all of the atomic and it is scalar ISBN. But the {longitude, latitude} pair is atomic because it locates one and only one point on the globe and a pair is not scalar.

    This is trickier than people think when they first learn 1NF.

    The whole point of the ISBN is that it its individual components identify several attributes of a book which when taken in conjunction provide identification of the book, just as the whole point of the logtitude:latitude position identifier is that its individual components identify several attributes of a position which when taken in conjunction identify the book. I can no more find the position without all of the position identifier. If I choose to assign some simple means of parsing (fixed number of places after decimal point, for example) I can store the whole thing in one column and it is just as atomic and just as scalar as an ISBN. In fact an ISBN is an ordered quintet or for older ISBNs an ordered quartet of numbers, and an ordered quartet or quintet is just as scalar and just as atomic as an ordered pair. Separators in the ISBN case are for use with the printed representation of the ISBN, and a separator is usually either white space or a short dash although in theory any non-numeric character could be used - but claiming that this presentation form is the ISBN would be somewhat perverse, to say the least.

    ISBN's and Positions can be treated as atomic if the individual components are not to be accessible in the database, which will depend on what use is being made of them.

    Calling either a scalar is outrageous: neither is "a quantity having magnitude but no direction, and representable by a single real number" since neither is a quantity and neither has magnitude (neither has direction and each can be represented by a single real number in all sorts of ways, so teh rest of the definition is stisfied); and if you are using some other definition of scalar you are completely out of line both with mathematics and with decent English dictionaries.

    Understanding data structures that are composed of several components appears to be somewhat trickier than you think.

    Tom