[thelist] Re: Database schema

Cosmin G cosming at as.ro
Thu Dec 11 12:03:33 CST 2003


Well, too many answers, but none too clear. Maybe I should have specified
that I'm using MySQL. Which doesn't support many of the features that you
mentioned such as foreign keys, one-to-many relationships (searching the
manual for one-to-many found 0 results).
>Seriously, you need to use the tools that are out there that have been
>developed to solve exactly these types of problems ("what database schema
should I use?")
Which ones would those be?
When telling someone something like
>
> However, as stated before, you're jumping the gun. You need to do some ER
> model *first*. You need to create some DFD (or similar) *first*. Once you
> have these things, the database schema will write itself.
>

You're not being helpful, especially to someone who's not very proficient.
What's an ER and what should it contain?
And what's wrong with posting my .sql file? It's not like I've posted a
virus, right?

>I think it would make sense to break up the products table a bit.  Any
>time when you find yourself with a table where you would have a large
>amount of fields that are not getting used, it's a good candidate for
>breaking into more specificized tables that get joined to the original.
>This is a clue that the table is decribing multiple entity types, which
>is usually suboptimal.  I would suggest putting the printer and scanner
>specific fields in a common table though to accomidate
>printer/scaner/fax devices.

Thanks for the tip. So basically from all the advice that I've gotten so far
what is recommended is putting product specific details in separate tables.
Could anyone show me what a query for displaying all products in the
hard-drives category would look like
in a case like this? Learning by example is the best way? A rough draft of a
query would do.


----- Original Message -----
From: <thelist-request at lists.evolt.org>
To: <thelist at lists.evolt.org>
Sent: Thursday, 11 December, 2003 04:41 AM
Subject: thelist Digest, Vol 10, Issue 22


> Send thelist mailing list submissions to
> thelist at lists.evolt.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.evolt.org/mailman/listinfo/thelist
> or, via email, send a message with subject or body 'help' to
> thelist-request at lists.evolt.org
>
> You can reach the person managing the list at
> thelist-owner at lists.evolt.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of thelist digest..."
>
>
>   25. Re: Re: Database schema (Ken Schaefer)
>
<snip>
> ------------------------------
>
> Date: Thu, 11 Dec 2003 12:39:17 +1100
> From: "Ken Schaefer" <ken at adOpenStatic.com>
> To: <thelist at lists.evolt.org>
> Subject: Re: [thelist] Re: Database schema
> Message-ID: <02d101c3bf87$9acf6880$9600a8c0 at careersAD.unsw.edu.au>
> References: <20031210031321.E425CDACB8 at freemail.as.ro>
> <001001c3bf7a$940644e0$ece1e6c1 at voltec01>
> Content-Type: text/plain;
> charset="Windows-1252"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Precedence: list
> Reply-To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
> Message: 25
>
> Personally, I don't think that posting your .sql statement is a good idea
at
> all.
>
> I'm sure that if Rudy was still actively participating he'd say the same
> thing. Your "Product" table does look messy, and I can understand why
you're
> starting to think that it's becoming unmanageable.
>
> However, as stated before, you're jumping the gun. You need to do some ER
> model *first*. You need to create some DFD (or similar) *first*. Once you
> have these things, the database schema will write itself.
>
> There are many different ways that this could be approached but without
the
> appropriate modelling of the system, all you're doing is relying on
> experience/gut feeling, and it appers that this isn't getting you the
> answers you need.
>
> Do the model first. Post it up someplace, and then we can tell you what
you
> need to do.
>
> Cheers
> Ken
>
> Microsoft MVP - Windows Server (IIS)
>
> PS One possiblity is to store the attribute as a value in a column:
>
> TABLE: PRODUCTATTRIBUTES
> ProductID    Attribute               AttributeValue
> 1                ScanResolution     300 DPI
> 1                Weight                  2 kg
> 2                CPU_FSB             333 MHz
>
> but, I can give you another dozen different ways you can organise your
data.
> Create your ER diagram please.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "Cosmin G" <cosming at as.ro>
> Subject: [thelist] Re: Database schema
>
>
> : Well, I think the best thing I can do is show everyone the .sql file, so
> : here goes:
> :
> _______________________________________________
> Help: http://lists.evolt.org/mailman/listinfo/thelist
>
> Archives: http://lists.evolt.org
>
> End of thelist Digest, Vol 10, Issue 22
> ***************************************
>




More information about the thelist mailing list