On Thu, Mar 31, 2011 at 3:34 PM, Alexander Burger <a...@software-lab.de> wrote:
> Hi Edwin,
>
>> > In fact, there is a function 'genKey' which generates keys, but this is
>> > different from how I understand the above autogenerated keys. 'genKey'
>> > simply returns a new number not yet existent in an index.
>>
>> i think this hits the nail squarely.
>
> OK, good! I just misunderstood the autogenerated keys.
>
>
>> suppose there is a song entitled "evergreen". one was sung by barbra
>> streisand, the other by will young. different lyrics, but same song
>> title.
>>
>> i'd like to use SongTitle as a key, but it won;t cut it, as in the
>> example above. so i have to revert to something like an autoincrement
>> key.
>
> I see. So indeed 'genKey' can be used to generate some unique key.
>
> Another option, as you know, might be to define SongTitle as a
> non-unique key (+Ref), and build a unique key combination by '+Aux'ing
> the artist.
>
> It is not necessary, btw, for an Entity to have any unique key at all.
> You can 'collect' all songs with a non-unique SongTitle, or find them
> with Pilog.
>

discussions like these makes lurking lovely. add to that understanding
how things work more deeply.


-- 
http://nybl.info
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to