Pre-dominantly, everybody uses the int
data-type or it's variants tinyint
,smallint
and mediumint
to generate a unique value for the id
field of their database table(s).
I have seen so many questions, asking How to start auto-increment from a value (offset) ?
When it comes to generating ids for orders table in specific, I feel everybody wants to start off from an offset.
So, in this context, my questions are:
Is it more of a business rule? If so, how does a business rule make sense while generating numbers?
If it's an individual's decision then what could be the possible elements to be considered while deciding to assign id's value from an offset??
Why not start from 1 for all the ids and what is the need to start assigning
ids
from anoffset
? What problem does it solve? What are the Pros and Cons of doing so?