You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Tim Joyce <ti...@hoop.co.uk> on 2001/09/24 18:06:29 UTC
Re: Velocity newbie (OT)
Jon,
> > nope, it used Integer, so will fail at a couple of billions (US).
>
> Yup. That would be a problem for us since we have a requirement that we
can
> handle the largest integers possible (BigDecimal).
ok, i don't think that it would be very troublesome to switch to BigDecimal.
It's the first time this requirement has come up.
> Torque internally uses BigDecimal for everything and does not require a
> unique ID column for all tables.
cool. I have not used Torque. is it simply OR mapping, or does it cache as
well? Is there a mechanism for adding metadata to tables/columns?
tia
timj
Re: Velocity newbie (OT)
Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
Indeed!
alter table myTable add constraint
( primary key(key1,key2) constraint myTable_pk);
but syntax differs between RDBMS vendors.
F
On Mon, Sep 24, 2001 at 11:08:29AM -0700, Jon Stevens wrote:
> on 9/24/01 11:01 AM, "Will Glass-Husain" <wg...@forio.com> wrote:
>
> > Technically, concatenating keys doesn't ensure uniqueness.
> >
> > Key 1 = "123"
> > Key 2 = "1"
> > Concatenated key = "1231"
> >
> > or
> >
> > Key 1 = "12"
> > Key 2 = "31"
> > Concatenated key = "1231"
> >
> > However, (Practically speaking) this is probably a rare case.
> >
> > WILL
>
> I *knew* someone would think this.
>
> I didn't mean String concatenation.
>
> -jon
--
Fergus Gallagher Tel: +44 (20) 8742 1600
Orbis Fax: +44 (20) 8742 2649
414 Chiswick High Street email: Fergus.Gallagher@orbisuk.com
London W4 5TL Web: http://www.orbisuk.com
Re: Velocity newbie (OT)
Posted by Jon Stevens <jo...@latchkey.com>.
on 9/24/01 11:01 AM, "Will Glass-Husain" <wg...@forio.com> wrote:
> Technically, concatenating keys doesn't ensure uniqueness.
>
> Key 1 = "123"
> Key 2 = "1"
> Concatenated key = "1231"
>
> or
>
> Key 1 = "12"
> Key 2 = "31"
> Concatenated key = "1231"
>
> However, (Practically speaking) this is probably a rare case.
>
> WILL
I *knew* someone would think this.
I didn't mean String concatenation.
-jon
RE: Velocity newbie (OT)
Posted by Will Glass-Husain <wg...@forio.com>.
Technically, concatenating keys doesn't ensure uniqueness.
Key 1 = "123"
Key 2 = "1"
Concatenated key = "1231"
or
Key 1 = "12"
Key 2 = "31"
Concatenated key = "1231"
However, (Practically speaking) this is probably a rare case.
WILL
-----Original Message-----
From: Jon Stevens [mailto:jon@latchkey.com]
Sent: Monday, September 24, 2001 10:44 AM
To: velocity-user
Subject: Re: Velocity newbie (OT)
on 9/24/01 10:23 AM, "Lane Sharman" <la...@san.rr.com> wrote:
> Associative rows (called join tables in this thread), that is to say rows
> which
> contain two or more foreign references, are unwieldy to work with if not
given
> a unique identifier.
>
> -lane
The unique identifier is the concatenation of the foreign key's. There is
nothing difficult about that.
-jon
Re: Velocity newbie (OT)
Posted by Jon Stevens <jo...@latchkey.com>.
on 9/24/01 10:23 AM, "Lane Sharman" <la...@san.rr.com> wrote:
> Associative rows (called join tables in this thread), that is to say rows
> which
> contain two or more foreign references, are unwieldy to work with if not given
> a unique identifier.
>
> -lane
The unique identifier is the concatenation of the foreign key's. There is
nothing difficult about that.
-jon
Re: Velocity newbie (OT)
Posted by Lane Sharman <la...@san.rr.com>.
Tim Joyce wrote:
> Jon,
>
> > > nope, it used Integer, so will fail at a couple of billions (US).
> >
> > Yup. That would be a problem for us since we have a requirement that we
> can
> > handle the largest integers possible (BigDecimal).
>
> ok, i don't think that it would be very troublesome to switch to BigDecimal.
> It's the first time this requirement has come up.
It would be better to use Long, not BigDecimal. The overhead of BigDecimal as
an object type is quite high. I've never seen a table design that had more
rows addressable by a Long.
Also, if a row does not have a unique, primary key, then it becomes really
painful to delete/update the row in a manner which is acceptable from a
performance standpoint.
Associative rows (called join tables in this thread), that is to say rows which
contain two or more foreign references, are unwieldy to work with if not given
a unique identifier.
-lane
>
>
> > Torque internally uses BigDecimal for everything and does not require a
> > unique ID column for all tables.
>
> cool. I have not used Torque. is it simply OR mapping, or does it cache as
> well? Is there a mechanism for adding metadata to tables/columns?
>
> tia
>
> timj
--
Lane Sharman
http://corporate.acctiva.com/lane
Re: Velocity newbie (OT)
Posted by Tim Joyce <ti...@hoop.co.uk>.
Jon,
> > is it simply OR mapping
>
> Simply OR mapping.
>
> We don't do caching in Torque on purpose yet. The issue is that caching
can
> get complicated quickly when you want to distribute the data caching
across
> multiple machines and then sync all the information properly.
indeed. as alluded to previously, melati/POEM can be classified as a single
machine framework. something to be bourne in mind.
timj
Re: Velocity newbie (OT)
Posted by Jon Stevens <jo...@latchkey.com>.
on 9/24/01 9:06 AM, "Tim Joyce" <ti...@hoop.co.uk> wrote:
> is it simply OR mapping
Simply OR mapping.
We don't do caching in Torque on purpose yet. The issue is that caching can
get complicated quickly when you want to distribute the data caching across
multiple machines and then sync all the information properly.
-jon