Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Codd's Rules


Codd's Rules

Author
Message
Frank Kalis
Frank Kalis
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5971 Visits: 289
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/fkalis/coddsrules.asp

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
Razvan Socol
Razvan Socol
Say Hey Kid
Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)

Group: General Forum Members
Points: 705 Visits: 129
Very nice article. We should all know these rules, but more importantly the database vendors should keep them in mind whenever they build something.

Here is a paper that discusses in more detail the Codd's twelve rules and how "the big three" DBMS-s are following them:
http://www.handels.gu.se/epc/archive/00002948/01/Nr18_MIB.pdf

All my respects to the late Mr. Codd; here are some things about his life and his work:
http://www.bayarea.com/mld/mercurynews/news/5676110.htm

Razvan



Frank Kalis
Frank Kalis
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5971 Visits: 289
quote:

Very nice article. We should all know these rules, but more importantly the database vendors should keep them in mind whenever they build something.


Thanks!
And yes, let's hope that the marketing and sales guys can be tamed!
quote:

Here is a paper that discusses in more detail the Codd's twelve rules and how "the big three" DBMS-s are following them:
http://www.handels.gu.se/epc/archive/00002948/01/Nr18_MIB.pdf


Many thanks for this link.
Just what I needed for some other purposes.



Frank
http://www.insidesql.de
http://www.familienzirkus.de

Edited by - Frank kalis on 12/10/2003 02:36:19 AM

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
bdevone
bdevone
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 113
Good article. However, I as a programmer have been asked to break rule #1, "Data is atomic. That means the intersection of a column and a row can only contain one single value," many times. At times I have been asked to put into one field the following values:

1. Parameter strings
2. xml
3. Delimited lists
4. Integers that are interpreted via bit-wise operators for multiple boolean values.

Are there any justifications for these practices?

Any comments?



Frank Kalis
Frank Kalis
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5971 Visits: 289
quote:

1. Parameter strings
2. xml
3. Delimited lists
4. Integers that are interpreted via bit-wise operators for multiple boolean values.


When you follow this forum or other for a while you'll notice that it seems to be common practice. There are frequently post on how to pass arrays...

Of course, you can store them in a single column. However, they will not be
interpreted like you want.

As usual, I suggest reading this http://www.algonet.se/~sommar/dynamic_sql.html
quote:

Are there any justifications for these practices?


Honestly...???

The vast majority of cases I have followed here were solved without using these practices.

Well, one might argue that there are economic needs in that your time to market should be very short. So you might implement a design that quickly yields results.
If I have the choice, I'd always would spent more time on proper database design.


Frank
http://www.insidesql.de
http://www.familienzirkus.de

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
Adam Machanic
Adam Machanic
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1141 Visits: 714
quote:

Are there any justifications for these practices?



Yes; laziness and lack of understanding of the relational model. Not that I'd suggest you tell this your boss or whoever is telling you to do this, especially in the current job market... But try to push them in the right direction and keep it in mind for the future when you're architecting databases and telling others what to put in them. And always think about the "what if" scenarios! Remember that in a year, "we won't ever need to query this data" will invariably become, "we need a report based on the fifth member of that delimited list, for all of our 10,000,000 customers, and it has to run in under a second."

Check out this site... lots of great content on this and related subjects:

http://www.dbdebunk.com

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Jonathan
Jonathan
SSC Eights!
SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)

Group: General Forum Members
Points: 941 Visits: 54
Good article, Frank.

But I think you're mistakenly mixing data atomicity into Codd's Information Rule. I didn't check your sources, but decomposition is a function of schema design (first normal form) and not something which can or should be enforced by a DBMS.

That's not to say that a DBMS can be designed to prevent an unlearned schema designer from breaking the Information Rule. I've seen several designs on these forums that unfortunately do just that by having table names convey data, e.g. otherwise identical tables named CashInvoice and CreditInvoice. This, IMHO, breaks Codd's Information Rule by storing information in the identifier rather than as values in columns, and thereby leads to kludges like UNIONs and dynamic T-SQL.

An RDBMS can be designed to support one of Codd's rules, but it doesn't necessarily prevent one from ignorantly breaking that rule; e.g. one can also create a table without a primary key in SQL Server, so the database is therefore not relational, but that cannot be blamed on SQL Server.

--Jonathan



--Jonathan
ckempste
ckempste
SSC Eights!
SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)

Group: General Forum Members
Points: 885 Visits: 1
Hi there

Ok article, not sure what I got from it though Smile Codd and co had his day, and the pioneer work done in and around this era was revolutionary, but dont see how this improves/build/differentiates me into the future, or perhaps even, provides an interest outside of Uni..

Just thinking aloud.

Cheers

Ck

Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Frank Kalis
Frank Kalis
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5971 Visits: 289
quote:

But I think you're mistakenly mixing data atomicity into Codd's Information Rule. I didn't check your sources, but decomposition is a function of schema design (first normal form) and not something which can or should be enforced by a DBMS.


Yes, you're right.

It is not mentioned in Rule #1. Looking to fix the article.
quote:

An RDBMS can be designed to support one of Codd's rules, but it doesn't necessarily prevent one from ignorantly breaking that rule; e.g. one can also create a table without a primary key in SQL Server, so the database is therefore not relational, but that cannot be blamed on SQL Server.


How do you say?
'Only a poor worksman blames his tool'?

Frank
http://www.insidesql.de
http://www.familienzirkus.de

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
Frank Kalis
Frank Kalis
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5971 Visits: 289
quote:

Ok article, not sure what I got from it though Smile Codd and co had his day, and the pioneer work done in and around this era was revolutionary, but dont see how this improves/build/differentiates me into the future, or perhaps even, provides an interest outside of Uni..


Well, okay this might not be an article for a seasoned db developer or dba like you, but there are also not so experienced people.

Surely I get flamed for this, but I can understand why Celko rants on the MS Newsgroups. And in most cases he is right on what he says.
Note, I didn't say I like the way he says his things (although I find them very entertaining).

Personally I blame it on that 'Visual..' thing that makes it easy to produce results in a very short time. Even if you have very less experience. And I think this is what happens quite often nowadays. There are many people around who develop suboptimal databases and/or software. Why?

One reason IMHO is that the don't know and don't care about the fundamental principles of this 'art'.

So there should be interest in that theory even outside the mensa crowd.
Don't take me wrong, Chris, but I think it doesn't hurt anyone to know a little bit more than one needs to accomplish his tasks.
I for myself like looking over the rim of my coffee cup.



Frank
http://www.insidesql.de
http://www.familienzirkus.de

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search