Subject | RE: [ib-support] Table size and indexing |
---|---|
Author | Helen Borrie |
Post date | 2001-06-18T14:20:19Z |
At 12:32 PM 18-06-01 +0100, you wrote:
CHECK (value in(select contactmodemnum from contactmodem))
Cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
> >>CAMPNUM refers to the advertising campaign that generated the response.It was only by way of assuming that this table's primary key wasn't itself being referenced by another structure...
> >>CAMPNUM is likely to be in the hundreds (or very low thousands).
>
> >Primary table in the structure?
>
>Not sure what you mean by this.
> >>All these columns are implemeted as FK's to ensure data integrity and toTrue; shows how much more useful a modelling tool is paper tablecloth and a couple of well-sharpened 3B pencils ! Seriously, Erwin is like a sewing machine for a tailor - it cuts out the tedium of the straight sewing but it can't be used to detail a suit that anyone could wear.
> >>make use of the IB generated indexes.
>
> >I don't see why the first two tables need to referenced to ensure data
>integrity. The
> >cost of those indexes is large; if you need data integrity triggers, write
>your own. The
> >IB- generated indexes will be terrible. If you want these columns indexed
>in the referring >table for ordering purposes, define your own composite
>indexes, viz. low-integrity key + <-- should have said "low-selectivity column"
> >pri key to raise their selectivity.
>
>
>I agree about the comments but you don't see those when you're looking at a
>diagram in Erwin!
>>CONTACTMODENUM could be a domain with a check on the content, butYou can easily do it with a check constraint on the column:
> >>since they are likely to change I would rather not have to change the
> >>database structure just to add a new contact method.
>
> >Why would you have to change the database structure to add a new contact
>method ????? If
> >it's a control table, you only need to add a new row.
>
>Just my inexperience showing! I was referring to updating a domain check but
>if you implement a lookup table and trigger it doesn't apply.
CHECK (value in(select contactmodemnum from contactmodem))
Cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________