Normalization

  • ....

    You have never read 1NF definition or even the Relation definition.

    Example of 1NF definition, from the only book I have right now :

    Database Systems - The complete Book Second Edition @2009 - Jeffrey Ullman

    Page 103:

    First normal form is simply the condition that every component of every tuple is an atomic value.

    As I said about you quoting Date:

    Steven993 (4/26/2011)


    What you are citing are the properties a TABLE must follow, how it must be read to be considered as a relation.

    Because a table is not a relation.

  • David Portas (4/27/2011)


    GSquared (4/27/2011)


    I say the rows in that table are "ordered" because there's a column that specifically determines the order of the rows. Look at the table design, it's right there in the DDL.

    Why do you say they aren't "ordered" by that?

    Because the attribute you are talking about is only an attribute just like any other attribute in a relation. Relations are always unordered sets of tuples by definition - no matter what values you put in them. That's not just what Date says, it's what a relation is, was and always has been. A relation doesn't stop being a relation just because of what values you assign to it.

    David & Steven,

    If, as you state, the DDL in question does conform to Date's 1NF as in 'There's no top-to-bottom ordering to the rows' can you post example DDL that would NOT conform, I'm interested in comparing them.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • David Burrows (4/27/2011)


    If, as you state, the DDL in question does conform to Date's 1NF as in 'There's no top-to-bottom ordering to the rows' can you post example DDL that would NOT conform, I'm interested in comparing them.

    As we said there is no order notion in 1NF.

    1NF is the definition of a relation.

    So to generate DDL that not conform to 1NF, you have to produce something that is not a relation.

    It's hard to explain, and a lot of book on database design are wrong too on 1NF.

    I'll not use a NULL example, beacause there is always some people who didn't evolved and think NULL is still allowed in relationland.

    Anyway here is an example.

    In a relation, for each attributes a tuple must take one and only one value !

    To violate 1NF, you must have multiple values, a set of values on the domain which define an attribute.

    Example:

    We have a relation SUPPLIER with attributes S# and CITY.

    S# is defined on integer domain. CITY is defined on VARCHAR(50) domain.

    S# CITY

    1 'London'

    2 'Paris'

    3 'Paris, Madrid'

    Regarding the data, the relation represented by this table does NOT violate 1NF.

    A lot of books are wrong and says that 'Paris, Madrid' is a set, a list, so 1NF is violated.

    Yes that's a terrible database design, but no, there is 1NF respect.

    That character string is one and only one value regarding the domain on which it is defined.

    To violate 1NF you must have a set of values of that particular domain.

    Now the domain of CITY is VARCHAR(6).

    S# CITY

    1 'London'

    2 'Paris'

    3 {'Paris', 'Madrid'}

    The value for the supplier 3 is a set of VARCHAR(6) values. This violate 1NF.

    That normally never happens.

    Every relation is in 1NF by definition.

    PS: There is hundreds of ways to violate 1NF, to manipulate things that are not relation in SQL.

    Create a table without any key, or generate a query that return duplicate row.

    That's not a relation. Because by definition there is no duplicates in tuples of a relation (it's a set).

  • David Burrows (4/27/2011)


    David & Steven,

    If, as you state, the DDL in question does conform to Date's 1NF as in 'There's no top-to-bottom ordering to the rows' can you post example DDL that would NOT conform, I'm interested in comparing them.

    Standard SQL doesn't allow ordering of rows within a table, only within cursors. SQL Server doesn't have any documented way of specifying the ordering of rows within table or view DDL either. SQL Server does have table expressions (queries) that define ordered arrays of rows - any query with an ORDER BY clause does that. So those queries would be examples of "tables" not in 1NF (the phrase "table expression" is the term used in the SQL standard but they aren't tables in the relational sense precisely because they are ordered).

  • David Portas (4/27/2011)


    GSquared (4/27/2011)


    I say the rows in that table are "ordered" because there's a column that specifically determines the order of the rows. Look at the table design, it's right there in the DDL.

    Why do you say they aren't "ordered" by that?

    Because the attribute you are talking about is only an attribute just like any other attribute in a relation. Relations are always unordered sets of tuples by definition - no matter what values you put in them. That's not just what Date says, it's what a relation is, was and always has been. A relation doesn't stop being a relation just because of what values you assign to it.

    So what you're saying is that the rule about rows not having a specified order was written just to take up space. Since it's physically impossible for a relation to violate 1NF, the definitions of 1NF are, thereby, redundant and meaningless. Right?

    Of course not! There's no way you'll agree with that statement, unless you're actually psychotic.

    But that's exactly what you are actually asserting. I can't read it any other way.

    You're saying "the data can't possible violate 1NF because it's impossible to do so in any relation". I'm saying, "the data isn't an orthodox relation because it has a specified order". You're not actually responding to what I wrote. Yes, a relation, by definition, has no order to the tuples within it. This particular data has an order to the tuples, and hence isn't, by orthodox definition, a relation at all. That's what violation of 1NF means in the first place.

    And again, we're arguing over interpretations of ideologies, not over anything that actually matters. I'm not sure how many times/ways I need to write that to get this point across, but I guess I'll keep trying.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Steven993 (4/27/2011)


    ....

    You have never read 1NF definition or even the Relation definition.

    Example of 1NF definition, from the only book I have right now :

    Database Systems - The complete Book Second Edition @2009 - Jeffrey Ullman

    Page 103:

    First normal form is simply the condition that every component of every tuple is an atomic value.

    As I said about you quoting Date:

    Steven993 (4/26/2011)


    What you are citing are the properties a TABLE must follow, how it must be read to be considered as a relation.

    Because a table is not a relation.

    Thank you for the continued ad hominem attacks. How about responding to what I wrote, instead of just trying to be insulting?

    I quoted and cited the exact definition I was applying, twice. It's a different ideology and orthodoxy than the one you're citing. That's my whole point.

    Get beyond ideology and orthodoxy, beyond citing authorities, and move into mathematical/scientific proof, and I'll grant your assertions some value. Till then, they are just exactly as ridiculous as mine are, the only difference being mine are intentionally ridiculous to make a point.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (4/27/2011)


    So what you're saying is that the rule about rows not having a specified order was written just to take up space. Since it's physically impossible for a relation to violate 1NF, the definitions of 1NF are, thereby, redundant and meaningless. Right?

    Of course not! There's no way you'll agree with that statement, unless you're actually psychotic.

    All relations are in 1NF and I'm happy to repeat that again. It's what I've said all along. 1NF is simply the definition of what a relation is. You really do seem incapable of discussing this without throwing pointless insults around. Please grow up.

    Of course a SQL table isn't necessarily a relation. But if you have a relation that consists of the data that Steven described then it is still a relation. To say that you "can't" or "shouldn't" do that is just your ideology or preference - it has nothing to do with Date's or anyone else's description of relations and 1NF.

  • GSquared (4/27/2011)


    This particular data has an order to the tuples

    :alien:

  • David Portas (4/27/2011)


    GSquared (4/27/2011)


    So what you're saying is that the rule about rows not having a specified order was written just to take up space. Since it's physically impossible for a relation to violate 1NF, the definitions of 1NF are, thereby, redundant and meaningless. Right?

    Of course not! There's no way you'll agree with that statement, unless you're actually psychotic.

    All relations are in 1NF and I'm happy to repeat that again. It's what I've said all along. 1NF is simply the definition of what a relation is. You really do seem incapable of discussing this without throwing pointless insults around. Please grow up.

    Of course a SQL table isn't necessarily a relation. But if you have a relation that consists of the data that Steven described then it is still a relation. To say that you "can't" or "shouldn't" do that is just your ideology or preference - it has nothing to do with Date's or anyone else's description of relations and 1NF.

    Whom have I insulted and when?

    I've been called ignorant, an idiot, and now a child. Where have I done anything like that to anyone in this discussion? I want quotes where I wrote that someone was anything insulting. If you can find any (I can't), I'll appologize. I haven't even implied that someone was anything insulting, whilst being subjected to repeated ad hominem attacks by you and Steven.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • As for "all relations are by definition in 1NF", honestly, all orthodox relations are, by definition, in at least 5NF. Otherwise, they aren't proper relations, now are they?

    It's circular reasoning.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Steven993 (4/27/2011)


    GSquared (4/27/2011)


    This particular data has an order to the tuples

    :alien:

    Would you be happy if I'd put quotes around the word "tuples", implying that, in this case, these "rows" are not actually "tuples" because they have an ordering attribute? Since that's my assertion in the first place, based on an authoritative definition of "tuples", would it help?

    Do you still not get what I'm writing? Are you still assuming that my statements about your table are in any way an attack on anything but dependence on authority and orthodoxy?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (4/27/2011)


    Whom have I insulted and when?

    You think that people aren't going to be insulted when you say they are "psychotic" if they hold a particular point of view?

    GSquared (4/27/2011)


    As for "all relations are by definition in 1NF", honestly, all orthodox relations are, by definition, in at least 5NF. Otherwise, they aren't proper relations, now are they?

    It's circular reasoning.

    I don't know what you mean by "all orthodox relations are, by definition, in at least 5NF". I don't even know what an "orthodox relation" is. It's your reasoning and you are the one saying it is circular.

  • Steven993 (4/27/2011)


    David Burrows (4/27/2011)


    If, as you state, the DDL in question does conform to Date's 1NF as in 'There's no top-to-bottom ordering to the rows' can you post example DDL that would NOT conform, I'm interested in comparing them.

    As we said there is no order notion in 1NF.

    1NF is the definition of a relation.

    Your example shows violation of Codd's 1NF and is what I understood to be 1NF.

    But I was referring to Date's 1NF and in particular to the reference

    There's no top-to-bottom ordering to the rows

    Did Date specify this?

    To what does it appertain?

    If it is to the 'engine' and data storage then SQL Server does not violate it.

    But if it is a rule that is supposed to be applied to design then I would consider any attribute, whatever the type, that indicates any ordering of the rows, a violation of that rule.

    I cannot say whether my interpretation is right or wrong, it is only my opinion and feel feel to disagree with it.

    And I would like to say that if it a design rule then I have violated on several occasions and I have no qualms about it.

    The only reason I am asking is to confirm (or improve) my understanding normalization not to get into a war of words.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • David Burrows (4/27/2011)


    Your example shows violation of Codd's 1NF and is what I understood to be 1NF.

    My example, you mean AddressLine table ? It's is not a 1NF violation..

    David Burrows (4/27/2011)


    But I was referring to Date's 1NF and in particular to the reference

    There's no top-to-bottom ordering to the rows

    Did Date specify this?

    To what does it appertain?

    There is no debate about this point...

    A relation is a set of tuples. A set dosen't have order. That's all.

    What has been referred to as "Date definition of 1NF" so far... is not a definition of 1NF !!

    I said it at least 3 times.

    David Burrows (4/27/2011)


    But if it is a rule that is supposed to be applied to design then I would consider any attribute, whatever the type, that indicates any ordering of the rows, a violation of that rule.

    There is no such rule.

    1NF or relational theory in general, except the "atomic" value of tuples, dosen't say anything about values or their meaning...

  • David Portas (4/27/2011)


    GSquared (4/27/2011)


    Whom have I insulted and when?

    You think that people aren't going to be insulted when you say they are "psychotic" if they hold a particular point of view?

    GSquared (4/27/2011)


    As for "all relations are by definition in 1NF", honestly, all orthodox relations are, by definition, in at least 5NF. Otherwise, they aren't proper relations, now are they?

    It's circular reasoning.

    I don't know what you mean by "all orthodox relations are, by definition, in at least 5NF". I don't even know what an "orthodox relation" is. It's your reasoning and you are the one saying it is circular.

    I very specifically said you were NOT psychotic, and thus would not agree with the absolutely absurd assertion I had made immediately before that.

    If you misread that, I appologize for not writing it clearly enough. It was most definitely the opposite of an assertion of you being psychotic.

    On the circular reason point, saying "all relations are in 1NF, thus this is automatically in 1NF because we say it's a relation", is circular reasoning. It's not proof of anything.

    It's not a statement of definition. E.g.: "Apples are, by definition fruit. Hence, anything which is not a fruit, is also not an apple". That's a definition, and thus not circular.

    Argument by definition in this case might go, "All relations are in 1NF, by definition. Hence, anything not in 1NF isn't a relation." What that then needs, in order to be complete, is a definition of "relation" that doesn't, in any way, circle back to "1NF". You could, obviously, define "1NF", and then state that anything in 1NF is, by definition a "relation", and that would be valid. It would also be completely redundant, since that would make 1NF and relation into two words for the exact same thing.

    What you claimed is that "all relations are in 1NF". I clarified that with the word "orthodox", which means "complying with an established set of beliefs defined by a due authority". In other words, anyone can call anything they want "relational", since that word isn't a trademark or servicemark, but "orthodox relational" would have to be in compliance with the definitions of "relational" provided by those with the authority to define the rules for it. Being "relational" isn't a state defined by natural law, like having mass or wavelength; it's an artificial definition created by the human imagination in order to structure things in a useful manner. Thus, differences of opinion are differences in orthodoxy. There is no sane argument that "lead does not have mass, because Joe said so". Lead has mass, because mass is defined as resistance to accelleration, and lead does do that. There are, however, strong disagreements, even between Date and Codd, over whether NULLs are valid in databases. That's the difference between orthodoxy (definition by authoratative decree) and natural law (definition by measurable states).

    So, here's the clarifying question on that: You asserted all relations are in 1NF (repeatedly), which, conversely, says anything not in 1NF is perforce not a "relation"; does this mean anything not in 2NF is also not a "relation", and, by extrapolation, is anything not in 5NF (or even higher) also not a "relation"? If 1NF is automatic for relations, are the higher NFs also automatic? If not, why? How can data, in tuples, in relations, be in violation of 5NF, and still be "relational"? If so, why the exception for 1NF? How do you justify the contradiction there, or do you maintain that 5NF is automatic for "relational data", and that anything not in 5NF is therefor "non-relational"? Note that I'm not asserting these things, I'm asking you to defend your claim. And, specifically, to do so by something other than "so-and-so says so". Define your terms, explain the conclusions from them, in the form of a mathematical proof or some comparable logic-construct. Heck, I'll accept an argument in legal form, with "hences" and "therebys" in it, if you prefer. If you have a reference that does that for you, provide the name, pages, etc., and I'll read it. Chapter and verse, as it were.

    Thus far, I've seen the assertion that NULLs don't belong in databases, ever, for any reason. The defense of that assertion has been "because Codd and Date said so". Another defense given was, to paraphrase a bit, "incomptent coders and DBAs have problems dealing with them". Neither is, in my opinion, a valid proof in an engineering discipline. I also maintain that database design is an engineering discipline, and not an expression of the humanities or arts. If you consider citation of authority to be a valid proof in engineering, say so, and we're done.

    To make my point, I turned it around on you guys, and stated that, per this one definition by Date, data in that address lines table was not in 1NF, and you, appropriately, asserted I was wrong about that. However, you haven't proven I was wrong, you've merely asserted it (over and over and over again). All I'm asking for here, is proof that I'm wrong. Don't say it, prove it. Please prove it. I know I'm wrong, you know I'm wrong. I can prove that I'm wrong, without resorting to authority or circular reasoning. Can you?

    If this method of debate seems odd to you, take a look at the concept of "devil's advocate" in logic and debate. That's the role I'm taking here. Also, look up "Socratic method". Both will clarify why I'm making absurd assertions and asking you to disprove them.

    If you can't disprove them, or don't care to, but only wish to continue with repeated assertions, ad hominem attacks, or citations of authority, then say so and I'll end off.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 91 through 105 (of 144 total)

You must be logged in to reply to this topic. Login to reply