Re: TRM - Morbidity has set in, or not?
Date: Tue, 16 May 2006 15:56:01 GMT
Message-ID: <lCmag.8417$A26.214148_at_ursa-nb00s0.nbnet.nb.ca>
Paul Mansour wrote:
> Bob, I'm sure I'm missing something, but I can't see it. If it
> wouldn't be too much trouble, would you or J M Davitt give me a small
> example? Or maybe you can correct mine:
>
> Condider, as in Davitt's example above, a Date domain D that enumerates
> all the possible dates (leave it a 5 days for the example):
>
> D <-> 2006-01-01 2006-01-02 2006-01-03 2006-01-04 2006-01-05
>
> and a single relation with two columns Date-of-Birth (DOB) and
> Expiration date (EXP) with indices pointing to D:
>
> ID <-> 1 2 3 4
> DOB <-> 3 2 5 4
> EXP <-> 1 5 5 3
>
> Are the columns stored like this in TRM? If not, how are they stored?
> If they are stored like this, what advantage is there to pointing to D
> instead of just storing actual date values in DOB and EXP?
>
> I realize I must sound like an idiot, but I would appreciate any help
> or explanation. Thanks.
Paul, you left out an important element of J M's argument, and this seems central to your misunderstanding what he said.
{ { 1, 2006-01-03, 2006-01-01 }, { 2, 2006-01-02, 2006-01-05 } , { 3, 2006-01-05, 2006-01-05 }, { 4, 2006-01-04, 2006-01-03 } }
In a traditional row store, the four rows above appear in a heap in some essentially random order. To maintain the dates and the ids in order, they will also appear in three indexes.
An index for four rows will occupy only a single page on disk. An index for a billion rows will occupy many more pages.
The size of each of those indexes is O(log(N)) and the size of the heap is O(N) where N is the cardinality. The size of the column store is O(1) for the domain values and O(N) for the pointers.
Your whole point is the O(N)'s are the same. J M's point is O(log(N)) >> O(1) for large N.
However, I just received an email from Fabian where he points out that the "TRM is not at the physical level, so it's not about storage. It is a layer between RM and storage, and can be physically implemented in any number of ways, one of which is columnar."
While I do not have sufficient information to evaluate the claims of the TRM, hopefully I have cleared up what you were missing from J M's argument. Received on Tue May 16 2006 - 17:56:01 CEST