Re: Need advice w/ table design

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Jochen Daum (jochen.daum_at_cabletalk.co.nz)
Date: 06/08/04


Date: Tue, 08 Jun 2004 14:17:50 +1200

Hi Adam,

On Mon, 7 Jun 2004 21:04:58 -0400, "Adam Machanic"
<amachanic@hotmail._removetoemail_.com> wrote:

>Jochen,
>
>In a relational database, each table should conceptually represent one type
>of entity. Each row of each table is an instance of that entity, in the
>form of a predicate. So for a table representing computers, such as the one
>I posted:
>
>Computers
> IP
> Name
> Processor
> RAM
> VideoCard
> HardDrive
>
>... we could "read" a hypothetical row, for instance, as "Computer at IP
>192.168.2.2 is called ABC, has a Pentium 3 500 processor, 512 megs of RAM,
>an NVIDIA GeForce3 videocard, and a 40 gig Maxtor hard drive".
>
>Furthermore, each column is a specific attribute type, which implicitly
>constrains the data (in addition to other types of constraints) -- so in the
>processor column, you know you always have information about processors.
>
>In the schema you propose, the database cannot logically enforce attribute
>type or even datatype, reliably (although you could, I suppose, write
>complex CHECK constraints that take every possible attribute name into
>account). In addition, your application code will require logic for every
>attribute so that it knows what column to pull the data from.
>
>I don't expect any performance enhancement from this type of setup vs. a
>properly normalized schema, and I've already pointed out the data integrity
>issues. What benefits do you see?

I normally argue your way a well.

I have just written a synchronisation application for my company where
the client (top level) wants an automatic synchronisation, but the
actual people are not cooperative. Additionally they will also change
it now and then without telling us. I think in this case you have to
go for something more flexible.

I surely didn't mean to always use only two tables. Another example
would be an web shop system for a shop that sells computers and
clothing. I don't think creating 5 tables for the computer section and
3 for the clothing section is always appropriate. Instead you might
want to have items (with price, stock etc) and attributes of them.

HTH, Jochen

-- 
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/


Relevant Pages

  • Re: Audacity and Gentoo
    ... > Oracle Black Helicopter Base in Antarctica: `Hey, we've got a database, ... available, especially from Australia's ABC national radio network, ... I don't sync it with the computers, ... There's over 5,000 games in that 15 ...
    (uk.comp.os.linux)
  • Re: Workgroup file connection problem!!!
    ... I made the changes on the shortcut path ... But still nothing works on other computers. ... open the database controll the path and etc. ... method is to create a shortcut that includes the workgroup file. ...
    (microsoft.public.access.security)
  • Re: sysvol folders missing
    ... Check with ntdsutil if it is really a known DC in the AD database. ... is listed in AD as a member server and now lives in the computers ... and run a Metadata Cleanup to ... Here are some links on Sysprep ...
    (microsoft.public.windows.server.active_directory)
  • Re: Can a lone computer have Access db problems?
    ... Sorry about the loose use of the term 'edit'. ... nor was his permissions changed). ... certain computers to misbehave). ... When you say he is "authorized", that sounds as if the database is ...
    (comp.databases.ms-access)
  • Re: Common Sense Prevails In Georgia
    ... >>> that computers do that any better than books and books are a helluva ... Imagine the several orders of magnitude dumber ... Now, consider how a student with such a database, who knew how to use it ...
    (comp.sys.mac.advocacy)