[Grok-dev] ZODB and storing, retrieving, deleting, use of ID

rmoskal rmoskal at mostmedia.com
Mon Oct 13 10:09:39 EDT 2008

You might try the python uuid module.  I tend to use uuids for RDBMS work,
why not use them with the ZODB?


Robert Moskal

Laurence Rowe wrote:
> John de la Garza wrote:
>> I'm making an app that has polls for voting... When I make a Poll  
>> object to I have to create an ID so I can find it again.  I'm comming  
>> froma RDBMS background and am wondering if there are any articles  
>> that would helpl me transistion.  For example should the ID be the  
>> last object id + 1?  I saw some sample code that kept the objects in  
>> a list then just got the length of the list, but if items are deleted  
>> then using the len as the ID could be trouble (not unique).... any  
>> feed back would be apprecitated.  I've read intro to ZODB (Jim  
>> Fulton) but it doesn't mention deleting
> * Randomised keys have better efficiency when filling a B-Tree. You need 
> to check that the randomly generated key does not already exist.
> * Store the length with a BTrees.Length.Length and increment/decrement 
> as you add/delete.
> Laurence
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

View this message in context: http://www.nabble.com/ZODB-and-storing%2C-retrieving%2C-deleting%2C-use-of-ID-tp19817305p19955637.html
Sent from the Grok mailing list archive at Nabble.com.

More information about the Grok-dev mailing list