Automatic primary key creation