Subject | Re: Key size too long (from Oracle to Interbase) |
---|---|
Author | Bruno Mattarollo |
Post date | 2000-08-18T07:48:28Z |
Hello,
--- In IB-Conversions@egroups.com, "Claudio Valderrama C."
<cvalde@u...> wrote:
primary key -in that case I assume that my design is not wise at all
and I ask for the forgivness of all the database
normalization/optimization gods- but imagine I am talking about a
unique constraint ... Then this limitation is not good. For example,
I need to store the referer logs to my site:
create table s_RefererLogs (
iRefererLogID integer not null primary key,
sLocalUrl varchar(250) not null,
sForeignUrl varchar(250) not null,
dEntryDate datetime not null,
iClickCount integer default 0,
unique (sLocalUrl, sForeignUrl, dEntryDate)
);
I know this is not something that I could not do with some code, but
I want to avoid placing that in a trigger, that's why the constraint
is there ... That's just an example. I understand the problem you
mentionned about IB beeing though for small footprint machines, but
this could have been changed... don't you think?
Anyway... Thanks again for the answer!!!
/B
--- In IB-Conversions@egroups.com, "Claudio Valderrama C."
<cvalde@u...> wrote:
> There are two problems:[snipped the first problem]
> - Second, using super strings as primary keys never has been wise.It's like
> using your full name instead of your social security number (in theUS) or
> an unique identification per person (in other countries).Yes, I understand that, but imagine that I was not speaking about a
primary key -in that case I assume that my design is not wise at all
and I ask for the forgivness of all the database
normalization/optimization gods- but imagine I am talking about a
unique constraint ... Then this limitation is not good. For example,
I need to store the referer logs to my site:
create table s_RefererLogs (
iRefererLogID integer not null primary key,
sLocalUrl varchar(250) not null,
sForeignUrl varchar(250) not null,
dEntryDate datetime not null,
iClickCount integer default 0,
unique (sLocalUrl, sForeignUrl, dEntryDate)
);
I know this is not something that I could not do with some code, but
I want to avoid placing that in a trigger, that's why the constraint
is there ... That's just an example. I understand the problem you
mentionned about IB beeing though for small footprint machines, but
this could have been changed... don't you think?
Anyway... Thanks again for the answer!!!
/B