Re: Globally unique IDs
Re: Globally unique IDs
- Subject: Re: Globally unique IDs
- From: David Teran <email@hidden>
- Date: Sat, 7 Feb 2004 10:47:05 +0100
EOF uses gids if the pk javaclass value is NSData and 24 'bit' long.
Besides this: why does one want to use these human unusable pk values?
Did you ever try to write sql by hand that uses these binary pk values?
IMHO int pk values are best.
regards David
On 06.02.2004, at 23:05, Alexander Spohr wrote:
> in fact apple encourages you to use unique pks. i forgot where, but
> there is some document explaining how to do it with eof. they use time
> and machine ids and someting. i think i remeber 80 bit or 80 byte...
>
> googling for "eomodeler unique primary key" finds:
>
> Adaptor-Generated Primary Key
>
> In EOF's default primary key mechanism, the EOAdaptorChannel
> generates the primary keys. It collaborates with the database server
> to maintain a linear sequence of nonrepeating primary keys per entity.
> The primary key attribute must not be a class property. If the type of
> the primary key attribute is a 12-byte NSData, EOF generates unique
> primary keys without going to the database.
>
> not sure if that's what your'e looking for :)
>
> atze
>
>
> Am 06.02.2004 um 19:45 schrieb Colin O'Brien:
>
>> Hi,
>>
>> we are working on a new system, where we will be moving data between
>> different databases.
>> This will require objects with a simple ID that is globally unique.
>> It seems the automatic private key mechanism in WO only provides
>> unique keys within a single database.
>> It seems we could get a truly unique ID using VMID.
>> It further seems we could create our own "PK's" in awakeFromInsertion.
>>
>> The questions then would be
>> * is there going to be a noticeable performance hit using VMID's (40
>> bytes) compared to the more typical int?
>> more concerned about retrieval performance than update performance
>>
>> * would it be better to use the built-in PK system and have a
>> separate column for the VMID?
>> particularly thinking about how relationships might work
>>
>> We are planning on using MySQL.
>> We looked at both MySQL and PostgreSQL and while PostgreSQL seems the
>> better database system, MySQL seems better supported in WO.
>>
>> Thanks for any help
>> Colin
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type text/directory which had a name of David TerĂ¡n.vcf]
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.