Hello Kurt!

Just to expand a little on the 'whys' of ryan's post...

On 17 Nov 2001 [EMAIL PROTECTED] wrote:

> I'm creating a table, and because i'm a fan of single-table databases,
> its turning out to have many colums. (It will have over 1100).  Will
> this be possible?  Will this cause problems?  A note: 1020 of the colums
> will be a numeric value less than 10.
>
> I'm creating a database that keeps track of a group of judges scores for
> something.  20 judges...3 rounds...17 categories...1020 single digit
> entries.

You're thinking in a 'monolithic/block' format. That's not what relational
database is all about. You need to break the monolith into smaller more
easily managed pieces, and use relational links in the main event table to
point towards the smaller pieces.

The first reason is the pure size. Looking at the judge's columns, you'll
have 20 columns x maybe 30 CHARs each = 600 bytes. Over the course of 1000
events that'll me 600k -just- for the -judges-. If the judge's column is a
SMALLINT pointer of 2 bytes, the total expenditure over 1000 events is 40k
while the separate judges table is 600 bytes.

The next reason is expandability. Yes, you have the judge's name, but
where do you put their address, phone number, email address, credential
references, home page link? It makes no sense to add columns to a
monolithic database for those items because you'll need to -repeat- that
data for -every- record in the database. Better to put that info in the
'judge's table' which you can reference at will, and add new columns to as
future needs arise.

Paul Dubois _MySQL_ at http://www.newriders.com has a good 'relational
database design' tutorial chapter.

Have a :) day!

jb

-- 
jim barchuk
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to