Creating a non-sequential Order System
This entry was posted on 9/4/2006 5:21 PM and is filed under SQL Server.
Some e-commerce systems employ a sequential order numbering scheme. In
some scenarios this design is not desirable. I worked for an
e-commerce company that did not want its order volume available to
competitors, and used a system that generated sequential order numbers.
A competitor could place an order first thing in the morning and
another order at the end of the day. By subtracting the first order
number from the last order number, one could derive a close estimate of
the actual orders generated. I was tasked with creating a
non-sequential ordering system. I published an article on sswug.org describing my solution. I used a separate table with unique numbers and used the T-SQL newid() function to select a random row.
The rest of my article can be viewed by following this link.