Path: news.easynews.com!easynews!cyclone2.usenetserver.com!usenetserver.com!newsfeed.gamma.ru!Gamma.RU!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!fu-berlin.de!uni-berlin.de!207.106.4.85!not-for-mail From: "Alan" Newsgroups: comp.databases.oracle.server Subject: Re: one big tables vs. many smaller Date: Thu, 4 Apr 2002 09:49:02 -0500 Lines: 47 Message-ID: References: NNTP-Posting-Host: 207.106.4.85 X-Trace: fu-berlin.de 1017931551 29800524 207.106.4.85 (16 [114862]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: easynews comp.databases.oracle.server:142029 X-Received-Date: Thu, 04 Apr 2002 07:43:40 MST (news.easynews.com) If the two tables are always or almost always used in combination, then it makes sense (and from a realtional theory point of view as well) to combine into one big one. In fact, if, from a realtional theory viewpoint they should be combined, then definitely do so (in this case). "Steffen Ramlow" wrote in message news:a8hm7r$sqgtj$1@ID-54600.news.dfncis.de... > what r the advantages / disadvantages of this? > > sample: > > Main (pk, id, c1, c2) > Sub1 (pk1, fk1, c10, c11) > Sub2 (pk2, fk2, c20, c21) > > rows: > > Main: 1,1,2,3 > Sub1: 1,1,4,5 > Sub2: 1,1,6,7 > > vs. > > BigMain(pk,id,c1,c2,c10,c11,c20,c21) > > rows: > > 1,1,2,3,4,5,null,null > 2,1,2,3,null,null,6,7 > > > the rows are always read as when Main and Subx would be inner joined > > obvious is, that BigMain has many null values (there are up to 10 sub > tables) but u do not need to join Main and Subx > > i would use Main + Sub, coz it is better to maintain and to tune, but what > about the costs of the join? > > both tables may contain millions of rows > > what r ur options? > > >