During application design, there are always some requirements to assign unique identifer for specific Objects.
System MillSeconds + Radom
Data base
- use Sequence
- use a column in table
UUID/GUID
Unique Identifier Generation in ORM
How unique identifier generation in hibernate and eclipselink.