>>/888556/
Random int, if exists, random int again. Or create a primary key using concat of values in the tables. Call the update database maintence when it locks it and she'll be right.