dbTalk Databases Forums  

Database Design and Number of Tables

comp.databases comp.databases


Discuss Database Design and Number of Tables in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Papago
 
Posts: n/a

Default Database Design and Number of Tables - 07-24-2004 , 02:57 AM






I've recently had my work reviewed by somebody who made the assertion that
my database was never going to work with so few tables. I only got this
news second hand though, I haven't talked to the person himself yet.

What I understand he said is that for the type of system I'm creating I'd
need many, many more tables, He made reference saying that eBay has
hundreds to thousands of tables managing all their data. I find it hard to
believe that so many tables would be necessary.

I passed all my classes on database management in college, I don't remember
anybody ever telling us that we'd need to create databases with so many
tables. In fact, the impression that I'm left with is that we should do our
best to make our database design as lean, mean, and easy to understand as
possible.

Are there some different schools of thought in database design on this point
or something? I had gotten everything that I'd designed so far working in
my tests, I don't see how adding more databases would improve anything at
all. I'd like to know what he might have been thinking of when he said
those things before I meet with him.

If anybody can shed some light on this please let me know.



Reply With Quote
  #2  
Old   
Laconic2
 
Posts: n/a

Default Re: Database Design and Number of Tables - 07-24-2004 , 06:39 AM







"Papago" <me (AT) myplace (DOT) com> wrote

Quote:
I've recently had my work reviewed by somebody who made the assertion that
my database was never going to work with so few tables. I only got this
news second hand though, I haven't talked to the person himself yet.

[snip]

Quote:
Are there some different schools of thought in database design on this
point
or something? I had gotten everything that I'd designed so far working in
my tests, I don't see how adding more databases would improve anything at
all. I'd like to know what he might have been thinking of when he said
those things before I meet with him.

If anybody can shed some light on this please let me know.
I've worked with databases that had several hundred tables, and built
databases with as few as nine tables.

How well or poorly your database is going to work depends on several
factors. If you are using the database to support on line transaction
processing, then departures from normalized form in the critical tables is
going to slow down updates. The slowdown could be enough to be a problem.

If your database courses were good ones, and if you passed them with a C,
then you will recognize at least third normal form.
Look at your tables. Does every table have a primary key? Are primary keys
guaranteed to be present (non null) and unique? Is every non key item
dependent on the key, the whole key, and nothing but the key (so help me
Codd)?

If not, then you may need to justify your design.

If on the other hand, your database has one massive load program that feeds
it new data, and supports OLAP style inquiry most of the time, then design
principles other than normalization could lead you to a satisfactory design
with far fewer tables.
One such design principle is star schema. Did they cover star schemas in
your database courses?







Reply With Quote
  #3  
Old   
--CELKO--
 
Posts: n/a

Default Re: Database Design and Number of Tables - 07-24-2004 , 11:19 AM



Quote:
somebody who made the assertion that my database was never going to
work with so few tables .. Are there some different schools of
thought in database design on this point or something? <<


Well, in the old days people used to map an existing file to a single
table. The files were often a mess that had everything but the
kitchen sink in them. So a small number of tables was a sign that the
schemaq needed to be normalized.

But this is not a rule or anything like that ... Weird.


Reply With Quote
  #4  
Old   
Papago
 
Posts: n/a

Default Re: Database Design and Number of Tables - 07-24-2004 , 11:33 AM



"Laconic2" <laconic2 (AT) comcast (DOT) net> wrote

Quote:
If your database courses were good ones, and if you passed them with a C,
then you will recognize at least third normal form.
Look at your tables. Does every table have a primary key? Are primary
keys
guaranteed to be present (non null) and unique? Is every non key item
dependent on the key, the whole key, and nothing but the key (so help me
Codd)?
Of course I use primary keys and each table only represents a single entity,
that's the way I was trained.

What are OLAP style inquiries?




Reply With Quote
  #5  
Old   
Laconic2
 
Posts: n/a

Default Re: Database Design and Number of Tables - 07-25-2004 , 06:45 AM




"Papago" <me (AT) myplace (DOT) com> wrote



Quote:
Of course I use primary keys and each table only represents a single
entity,
that's the way I was trained.
Good. It may turn out that the portion of reality that your database
captures is quite simple, compared to that of e-bay
or of some databases in my experience. It may turn out that the objections
you have heard second hand to your design are spurious.

Best of luck.


Quote:
What are OLAP style inquiries?
I wasn't making a specific reference. It was just a kind of general
reference to the sort of query you tend to find when on line analysis is
going on, as opposed to on line transaction processing.
Quote:




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.