Do I need sequential numbers?

I am working on a winform (.NET) application that includes Orders, Invoices, Service Orders, Tickets, etc.

Do these enities need to be consistent in the numbering of their identifiers? IMO no. Take an order, for example, it can only be valid after it passes at the business level, during this subsequent creation a different order could be created, approved and saved with number 2, while the order that was created earlier with error 1 with error.

This seems to open up a can of worms about which layer assigns the order number, no?

I am currently using unclassified numbers with an identifier prefix for the object. For example, order uses OR-123. Is that a good idea?

thanks

Connected:

Unique but simple identifiers in SQL Server .

+5
source share
8 answers

In my experience with pre-made and custom-made accounting systems in the USA, sequential numbers are not required by accountants or auditors. Demonstration of management and audit capabilities required. If the item is deleted, there must be a trace. Detection of a deleted item is not tracked by a missing number. In the end, there are other types of fakes that require sequential numbers, and demonstrating adequate controls goes far beyond that.

. , , . , .

(, IDENTITY) ( GUID, GUID ) , SQL Server. , IDENTITY , , . ( ).

ID COMB:

http://jeffreypalermo.com/blog/use-guid-comb-in-your-database-if-you-need-guid-keys-but-don-t-want-to-take-a-big-performance-hit/

http://www.informit.com/articles/article.aspx?p=25862

, CSLA SmartGUID. SmartGUID . , , , .

+3

, .

+7

, ( , , ). , RDBMS - (t20) ( ). - Guid, , - .

, "OR-" db.

+5

, , , , . , , .

+4

, , . . , , , , , , - .

, , , , , , (, Guid).

+4

, , -.

. , , , 10000? , , - , - .

+2

, , 1 3 ..

: "" URL-, - ( ..).

- GUID ( ). , , .

SQL Server 2005, SequentialID() GUID, , , .

- , smalldatetime GETDATE() , .

+2

, , .

, , .

0

All Articles