On Thu, Dec 18, 2008 at 6:31 PM, Boris Partensky
<boris.parten...@gmail.com> wrote:
> You could have a double fetch implementation: basically have a bookid as key
> and store the object under this key, but then have a secondary mappings of
> whatever (isbn, amazon_id) to book id. So getting the actual object will
> always require 2 lookups: get bookid integer and then fetch the actual
> object based on that id. Will that work?
>
> Boris
>
> On Thu, Dec 18, 2008 at 3:16 PM, Josef Finsel <carpd...@gmail.com> wrote:
>>
>> Short answer, no.
>> Basically you're describing tags. It's been an oft discussed topic but
>> there are lots of issues related to implementing it without losing a lot of
>> performance.
>> On Thu, Dec 18, 2008 at 3:13 PM, Advt <thehaz...@gmail.com> wrote:
>>>
>>> Hi there guys,
>>>
>>> This was probably asked before but I couldn't find it on the list, so
>>> I'll just go ahead and ask.
>>> Is there a way to have more than one key assigned to a single object ?
>>>
>>> In order to have several ways of pointing to a single object, but only
>>> storing one copy of the object on the memory. I understand that this
>>> could also mess up a lot of things, including the hashes for object
>>> distribution between several servers, since the key is used to
>>> determine in which memcached an object resides.
>>>
>>> One example of this would be, for example, let's say we have objects
>>> that might have more than one "primary key" that is used to identify
>>> it, for whatever reason. For example, a system that catalogs books,
>>> where we have our internal "book_id", but where we also might want to
>>> fetch books by their ISBN ("book_isbn") or by the unique identifier
>>> that Amazon uses for this book ("book_amazon_id"). So, it would be
>>> nice to be able to apply three keys to the same object (if we ignore
>>> the problems that might bring in environments with lots of servers).
>>>
>>> Any thoughts on that ?
>>>
>>> []'s
>>> D
>>
>>
>> --
>> "If you see a whole thing - it seems that it's always beautiful. Planets,
>> lives... But up close a world's all dirt and rocks. And day to day, life's a
>> hard job, you get tired, you lose the pattern."
>> Ursula K. Le Guin
>>
>> http://www.finsel.com/words,-words,-words.aspx (My blog) -
>> http://www.finsel.com/photo-gallery.aspx (My Photogallery)
>>  -http://www.reluctantdba.com/dbas-and-programmers/blog.aspx (My
>> Professional Blog)
>
>
>
> --
> --Boris
>

Hi Boris & Josef,

Yes, I thought of that before and I was hoping that there would be a
more simple approach to this already, or at least something being
cooked up that could solve this (as the Tags stuff proved to be under
evaluation). I guess the pains of such design could be alleviated with
a good abstraction layer, until this Tags stuff comes along (if ever).

Thanks !


-- 
What this world needs is a good five-dollar plasma weapon.

Reply via email to