Use Uuid In Postgresql. Alternatively, UUID values can be generated outside of the database