Re: Managing an UPDATE executed concurrently?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I suggest you read it again. Nb.

Yes unique and sequential but look closer you should read the part about
seperate invoice sequences and using customer prefixes/text.

This means that any unique Id could be by customer, hence locking is less of
a problem than one sequence for all.

Again something that falls within 1/10 and is mitigated by reading fully,
dont you agree?



"Tom Cooper" <tomcooper@xxxxxxxxxxx> wrote in message
news:e0Z%23F3qRKHA.2092@xxxxxxxxxxxxxxxxxxxxxxx
There are many cases where a sequential numbering system where either no
gaps are allowed, or there must be an explaination for any gap.
Sometimes, it is just a relic of the way things used to be done. But
often, it is an auditing requirement to allow auditors to check to see if
any documents are missing. And there are many cases where it is a legal
requirement. For example, (since you are with Novare Counsulting, Ltd and
based in the UK), invoice numbers in the UK are required to be sequential
(for purposes of VAT tax auditing), or any gaps must be explained (and I
don't think HM Revenue & Customs would accept the explaination that the
gaps probably came because some other user was entering an invoice that
got rolled back). See

http://customs.hmrc.gov.uk/channelsPortalWebApp/channelsPortalWebApp.portal?_nfpb=true&_pageLabel=pageLibrary_ShowContent&propertyType=document&id=HMCE_PROD1_027711#P17_1322

Tom

"Paul" <paulriley@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:urYe2AqRKHA.4600@xxxxxxxxxxxxxxxxxxxxxxx
You missed the point. There is a line between Requirements and Design...

If at any time Requirements specify design, you get yourself into these
issues. Its simple. At the end of the day does the user really want to
sequentially number all your vouchers. I would be suprised if this was
the case. What they do want to do is have the ability to identify a
voucher and information about that voucher for example maybe expiry date.
What possible advantage does it have that the numbers each follow with no
gaps to the USER? Maybe it was a design decision, in which case it was
not necesary and they should have used identity unless spending x amount
of development and Test time creating functionality that already exists
was in the forefront of their minds.

I did Law at uni so Ive seen some examples of stupid laws, and although
this would take the buscuit I think it falls into the 1/9 times you may
need to use it. Makes you wonder how financial transactions are done
considering many use a form of GUID, for the sole purpose of security in
that 1,2,3,4,5 can be predicted and various attacks can use this whereas
with a GUID it cannot be predicted. Security must suck in that country.


"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message
news:Xns9C9CA3C285E6FYazorman@xxxxxxxxxxxx
Paul (paulriley@xxxxxxxxxxxxxxxxxxxx) writes:
Why would contiguous numbering be required? IMHO This is just fitting a
system to fit old working practices.

Yeah, when you cannot solve the what the users ask for, ask them to
change
their routines. This is usually great selling point, and strongly
increases
your changes to win the contract.

Certainly my experience is that order number do not need to be
contiguous
and I have worked with Warehousing and Web Ordering systems for over 10
years.

I was told by an SQL mate that in his country, this was the law.

In the system I work with, we don't have this requirement for order
numbers
(I believe), but we certainly have it for all voucher numbers we
generate.

Just the overhead to the system of ensuring that an id is contiguous is
a
good reason to design an application to ensure you do NOT need to do
this
ever.

If the overhead you are concerned about, I think the best is not to
implement the system at all.

Gee, users are really a pain in the rear parts. They want a lot things
that
that just causes overhead in our beautifully designed systems.

--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx





.



Relevant Pages

  • Re: Could Behe be schizophrenic?
    ... exponentially expanding neutral gaps are demonstrable in real ... subspace of English words in the space of letter sequences. ... >> of a nylonase via a frame shift ...
    (talk.origins)
  • Re: Real scientist (Einstein) versus fake scientists (neo-Darwinists)
    ... Click on Matrix Fig. 1 to download the sequences. ... Molecular phylogeny and evolution of primate mitochondrial DNA. ... >>the legend says are gaps. ... > breaking the DNA up into short fragments, ...
    (talk.origins)
  • Re: [PHP] Pragmatically changing a "Record Number"
    ... So to say it another way, I have a table that has 900 records in it, I've added 3 records, but then deleted 2 of those which puts the actual record count at 901 but my auto increment field starts at 904 on the next insert. ... Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number? ... I've seen many people who wished to "fix" sequences like this before, usually because they believe there is something "wrong" with there being gaps in there. ...
    (php.general)
  • Re: Combsort: shrink factor for guaranteed O(n log n) worst case time?
    ... a pattern as small as 324 elements long to defeat the previously ... The next gaps, being even, don't change anything. ... Though, there can be other kinds of killer sequences, of ... Batcher's odd-even mergesort is, as combsort, a sorting network. ...
    (comp.theory)
  • Re: moving selection
    ... A first query: ... It removes records such as if a customer make 2 ... It removes the extra purchase, ... if the customer has two sequences of at least 10 consecutive ...
    (microsoft.public.access.queries)