The id should be unique. So you need some logic for getting a unique id. An easy way is to store the last id value in a function and a request is adding 1 and stores it like that:
int getId()
{
int last = IdFromStore();
int id = last + 1;
StoreId( id );
return id;
}