• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Primary Key generation - size limit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Primary Key generation - size limit


  • Subject: RE: Primary Key generation - size limit
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 24 Apr 2004 09:42:39 -0700

It depends more on the database than the adaptor/plugin.  You can always
drop and recreate the EO_PK_TABLE.  Hmmm, assuming the plugin can handle
the change.  If not you might need to make some small alterations to the
plugin.  Other databases (FrontBase, Oracle, OpenBase sort of) have their
own PK generators so a lot depends on what range they supply before rolling
over.  If memory serves, it was rather huge.


Chuck


At 01:08 PM 24/04/2004 +0200, Ruenagel, Frank wrote:
>Hi Chuck,
>
>Isn't this really adaptor dependent? With MS_SQl_Server
>by default the EO_PK_Table-Method for creating the PKs is unsed.
>And int this table the data-type of PK is 'int'. Not 'bigint', simple
>int (4 Bytes). Also I have heard that this datatype is hardcoded
>in the MSSQL-adaptor's java-code for generating the PK....  :(
>
>Please correct me if I have misunderstood something.
>Thank you!
>
>Frank
>
>
>> -----Original Message-----
>> From: Chuck Hill [mailto:email@hidden]
>> Sent: Friday, April 23, 2004 6:52 PM
>> To: Jacky Gagnon
>> Cc: email@hidden
>> Subject: Re: Primary Key generation - size limit
>>
>>
>> It just goes.  It is a matter of choosing the appropriate
>> Java type to
>> hold the size of data that the database stores.  You will
>> want to look
>> at your DB docs and see what will fit in the column type you
>> are using.
>>
>>
>> On Apr 23, 2004, at 9:44 AM, Jacky Gagnon wrote:
>>
>> > Hi Chuck
>> >
>> > Do I need to use databaseContextNewPrimaryKey if i use a long?
>> >
>> > Because in documentation, Apple talk  about using a simple
>> Integer for
>> > pk Generation by WO...
>> >
>> > Thanks
>> >
>> > Jacky
>> >
>> >
>> > Le 04-04-23, ` 12:27, Chuck Hill a icrit :
>> >
>> >> java.lang.Long valueType l
>> >>
>> >>
>> >>
>> >>
>> >> On Apr 23, 2004, at 8:48 AM, Jacky Gagnon wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> By default WebObjects use Integer for storing PK.
>> Integer have a max
>> >>> value of 231-1.  In other word the limit is not infinite,
>> especially
>> >>> when record are deleted regularly from a table (gap are created
>> >>> because
>> >>> some primary key value are lost, not reused by WO).
>> >>>
>> >>> Whats the best stategy in this case, if I don't want to reach this
>> >>> limit?
>> >>>
>> >>> -Using a bigger number (long) or binary keys (24 bytes).
>> >>> -Trying reusing objects (vs deleting these objects) to
>> avoid gaps in
>> >>> keys generation.
>> >>> -Trying to avoid gaps into pk generation algorithm.
>> >>>
>> >>> If you can point me to some documentation or case studies about
>> >>> strategies in pk generation...
>> >>>
>> >>>
>> >>> Thanks!
>> >>>
>> >>> Jacky :-)
>> >>> _______________________________________________
>> >>> 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.
>>
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
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.


  • Prev by Date: Re: Blank From Parent WOComponent When Accessing From Embedded Components
  • Next by Date: Re: Blank From Parent WOComponent When Accessing From Embedded Components
  • Previous by thread: Re: Primary Key generation - size limit
  • Next by thread: components to go?
  • Index(es):
    • Date
    • Thread