From: MonkeeSage Date: 2006-09-24T22:10:17+09:00 Subject: Re: unique data Peter Meier wrote: > Does anybody has some advice, how to generate such a unique id? > Could be a random, but unique number, ... Hi Peter, How about a type-4 UUID? class UUID @@range = %{0123456789abcdef}.split(//) @@indices = [7,11,15,19] def self.new uuid=[] 32.times { |i| uuid << @@range[rand(16)] uuid << '-' if @@indices.include?(i) } uuid.join end end puts UUID.new Mabye just using the object_id of the node itself or the object you're inserting into the node would work? Regards, Jordan