-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Generator Discussions
PostPosted: Wed Nov 08, 2006 7:13 am 
Newbie

Joined: Fri Oct 27, 2006 8:43 am
Posts: 14
This topic is not exactly a problem, but a discussion.

We here are implementing a huge system, with many entities. One of our development decisions is that we'll have a superclass for every single entity in the system. All our entities will extend this superclass, named SuperEntity.

The id for every single entity is to be defined in the SuperEntity, and every entity will inherit it. We here are wondering what would be the best generator strategy to be used in a case like this. We are using Oracle 10g.

Our possible strategies are:

- uuid
- sequence
- increment
- hilo
- native (uses sequence)

In your opinion, what would be disadvantages and advantages from each table?

Sequence, when defined in a superclass, uses a single counter for every entity, so we are afraid that we might get close to its limit.

Increment is not threadsafe, as i previously read here, but the counter is per each entity, which is more desirable.

Thank you for any answer,
Chico Science


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 6:12 am 
Newbie

Joined: Fri Oct 27, 2006 8:43 am
Posts: 14
No ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 9:53 am 
Newbie

Joined: Thu Nov 02, 2006 8:41 am
Posts: 13
Location: Argentina
I would use SEQUENCE so you forgot the autoincrement logic, I'm refactoring a software with a Table Generator, and it's no easy to manage the generator
outside the insert table, when you can use sequences with are transactionals and threadsafe


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.