You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Chris Howe <cj...@yahoo.com> on 2006/11/09 12:59:32 UTC
Composite key vs Serrogate for SeqId
I've been continuing my playing around with some of
the pentaho project stuff and there's a limitation
with their query structure that doesn't support
composite foreign keys. While there are several
places in OFBiz where the composite key holds meaning
with the data model, I was reluctant to see the
benefit of using a composite key for entities like
OrderItem (orderId, orderItemSeqId) over simply having
an orderItemId as a single field primary key. Does
the sequence (01,02,03, etc) hold any meaning that
needs to be maintained?
Re: Composite key vs Serrogate for SeqId
Posted by Chris Howe <cj...@yahoo.com>.
That's somewhat true for the orderId (you'll likely
lose several sequential orderIds when you grab 10 in
sequence but only use 3 before the cache expires).
However, I'm referring to the orderItemSeqId, the line
items of the order.
--- David Welton <da...@gmail.com> wrote:
> > Does
> > the sequence (01,02,03, etc) hold any meaning that
> > needs to be maintained?
>
> BTW, having sequential numbers like this might not
> be such a hot idea,
> as your competition could use that to get an idea of
> how many orders
> you do in a day/week/month/etc...
>
> --
> David N. Welton
> - http://www.dedasys.com/davidw/
>
> Linux, Open Source Consulting
> - http://www.dedasys.com/
>
Re: Composite key vs Serrogate for SeqId
Posted by David Welton <da...@gmail.com>.
> Does
> the sequence (01,02,03, etc) hold any meaning that
> needs to be maintained?
BTW, having sequential numbers like this might not be such a hot idea,
as your competition could use that to get an idea of how many orders
you do in a day/week/month/etc...
--
David N. Welton
- http://www.dedasys.com/davidw/
Linux, Open Source Consulting
- http://www.dedasys.com/