• Steven993 (6/30/2011)


    A table is in 1NF when every column has a fixed simple data-type that is understood by the database system, and every row has a primary key.

    This is your own definition ?

    If not, please indicate references.

    Since SQLServerCentral has a no-plagiarism rule, it has to be my own definition, doesn't it. "row" should of course have been "relation".

    For example, people may leave off the primary key requirement because they know that the base relations of relational database theory are required to have a primary key

    In fact there is no primary key in relational theory. Or at least, that expression is obsolete (Date on database: writings 2000-2006, p117).

    And there is no requierement.

    I don't accept Date as an ultimate authority. He has written some good stuff, and also some not so good stuff (all extremely able people have the odd off day). Since the elements of a candidate key are called "prime" attribiutes, there should be no objection to calling it a "primary key". Because first normal form was defined in 1970 using the term "primary key" not "candidate key", and I was attempting to define and describe first normal form, I stuck to that terminology.

    By definition a relation has at least one key (a "candidate" key); it's not possible to have duplicate tuples.

    Concerning the "A Table which is not in 1NF" part.

    I'm not sure to understand. Are you really saying that 1NF violation is somewhat related to the application using the database ?

    No. I'm saying it is related to what the database is expected to do with the data. The application, once it has obtained the data from the database, can do what it likes.

    What must not happen is that the database be required to understand some encoding which is not presented to the database as part of the type of (the domain of) an attribute.

    this is a claim made only by people who don't understand domain theory

    I'm sure a lot of people (including me) don't understand that point. It's worth explaining it clearly.

    In mathematics, a doman contains elements which can be fully defined, partly defined, undefined, or overdefined. Trivial domains contain only fully defined elements and a single undefined element (usually called BOTTOM, but sometimes NIL and sometimes NULL) and maybe a single overdefined element (usually called TOP if it exists). For example a domain of unsigned integers range 0 to 255 contains the 256 integers 0...255 which are fully defined elements and the BOTTOM element about which nothing is known except that it a member of that domain; it might or might not contain a TOP element that is what you get when you add 1 to 255 (perhaps called "Arithmetic Overflow" or something like that); it might or might not contain partly defined elements (such as an integer known to lie between 31 and 94). Dana Scott bought domain theory to his collaboration with Chris Strachey in 1970, and their subsequent work on denotational semantics made it into a fundamental part of theoretical computer science (making extensive use of partly defined values, as well as bottom and fully defined values), but of course the basic concept of a bottom value predates that by at least three decades. If you want to learn about it, maybe Joe Stoy's "Denotational semantics: the Scott-Strachey approach to programming language theory" will work for you or maybe I'm just prejudiced because I like him as a person - so try to borrow it, not buy it, in case it doesn't suit. I seem to remember that there is something much older, perhaps by Garrett Birkhoff (or maybe even by his father), and there was a section on domain theory in an old math logic textbook that I used back in 1963 (that's where I first came across mathematical domains: I can't remember who that book was by - it certainly wasn't Church, who was a far better writer than whoever it was but didn't cover domain theory in his math logic text). Or maybe you can get hold of Scott's OxPRG reports.

    Tom