[ic] One table, multiple vendors, product codes not unique

Mike Heins interchange-users@lists.akopia.com
Tue Jun 12 11:07:00 2001


Quoting cfm@maine.com (cfm@maine.com):
> 
> Re: One table, multiple vendors, product codes not unique
> 
> We've got a mall scenario with multiple vendors in same
> tables and therefore we commonly have more than one
> instance of an sku, say '1000'.
> 
> The unique key is not (sku) but instead it is (sku,id), 
> where id is the vendor number and guaranteed
> to be there.  We are using a custom price routine for 
> now but would like to get rid of that for mainstream.
> 
> We assign our own unique keys and sku's but the mall 
> vendors need to be able to link in with their own like:
>   vlink.cgi/1234?merchant=my_store
> And JOINs need to reference their codes.
> 
> Can newer versions (>4.03) stock mv/ic handle that?
> 
> I'm tempted to modify Table/DBI.pm to always include the
> id key in queries or maybe to use Watch Points.  Can 
> anyone share any thoughts on this?

Not really -- we would need specifics on what you are talking
about with JOINS, and what access you need.  I am afraid I
still cannot figure out what you want from this.

4.7.3 has a foreign-key capability, but that is pointed toward
accessing a single data item keyed via a non-primary key field.

You can do quite a bit with [query sql="...." list=1]. That may be
what you want.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".