All of this discussion reminds me of what we were doing in 1992 (and are still stuck with now). Object IDs are a DECIMAL(18,8) that looks like this:
xxxxxxx.sssscccc where xxxxx is an autoincrement value assigned by the "client" machines, ssss is a "site number" assigned by us to the "client", and cccc is the class number which is used to know which object _type_ to inflate when doing lazy instantion. For example 34344.02340032 is an "Option" (class id 0032), created in the studio at in Boston (site id 0234), and it's the 34344'th one created THERE. This works well, but requires tracking the "next number" for each class at each site. We could have just as easily used a GUID (had the database supported them at the time), eliminating the next number and site portion and insuring no duplication across the universe, and adding a second column for the class ID. If you are confident in IDENTITY or AUTOINCREMENT columns, then you could do a segemented key with one of those and a site number. What I CAN tell you is that things like CustomerID to CustomerOrders and such should NOT be governed by database "rippling" of IDs. Do yourself a favor and emit a reasonably complete XML that describes the hierarchy, and write a VERY SIMPLE posting program that enforces the rules needed at the central office databases. That way, your questions about who takes care of the rippling of the "negatives-means-new" IDs down to child rows is simple to code and review. Marc =================================== This list is hosted by DevelopMentor® http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
