-->
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.  [ 2 posts ] 
Author Message
 Post subject: Artifical keys in a distributed database environment
PostPosted: Thu Jan 27, 2005 4:31 pm 
Newbie

Joined: Thu Jan 27, 2005 4:24 pm
Posts: 2
Hi All,

I am building an application which has a copy of the application installed at each of the companies branches, each with their own database. Data is moved to a central server and stored in a single database.

At the moment I am using a natural key, with the high order key being the Branch Number. I'd like to switch to artificial keys. Is there any relatively simple way of ensuring that each branch entry to a table will be unique across all branches?

PS: This is my first post, I started using Hibernate last week to replace my own 'roll your own' DAO approach and I am blown away, this is open source dev at its finest!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 6:43 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
You may want to look at using GUIDs, they'll be unique but I'm not sure what type of perfomance hit you might take on using a 32 character varchar.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.