ArticleslgStudy

mathematics

AutoNumber

AutoNumber is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand AutoNumber rather than just read about it. In short: AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table.

Key takeaways

  • AutoNumber belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect AutoNumber to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of AutoNumber from memory before moving on to harder problems.

Reference excerpt

AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table. Only one AutoNumber is allowed in each table. The data type was called Counter in Access 2.0.

Forms There are three forms in which AutoNumbers can be generated:

start value plus increment AutoNumbers generated by this mechanism start with the start number and increment with the increment value, checking for collision with existing table rows. random AutoNumbers generated by this mechanism are assigned using a pseudo-random number generator that generates long integers and checks for collisions with existing table rows. replication IDs AutoNumbers generated by this mechanism are IDs generated in a manner to make it highly improbable that collisions will occur. They are Microsoft Globally Unique Identifiers, and the probability of collision is low until the year AD 3400. The default size of an AutoNumber is a 4-byte (long) integer. This is the size used for start+increment and random AutoNumbers. For replication ID AutoNumbers, the FieldSize property of the field is changed from long integer to Replication ID. If an AutoNumber is a long integer, the NewValues property determines whether it is of the start+increment or random form. The values that this property can take are "Increment" and "Random".

Use The default AutoNumber type is a start+increment counter, with a start value of 1 and an increment of 1. Although in many instances such an AutoNumber field will appear as if it contains the row count, it does not. Deletion of rows from a table, for example, does not cause AutoNumber fields to be re-numbered, but instead leaves "holes" in the numbering. Similarly, if a transaction to add a row to a table is begun but later aborted, the AutoNumber assigned for that row will not be re-used. The default start+increment form with the start value of 1 and increment of 1 is not suitable for all circumstances. There are reasons to choose each form, and trade-offs in doing so. The default start and increment values might reveal information about a table that it is desired not to reveal to people viewing individual table rows. For example, using an AutoNumber field for a customer ID might reveal information that it is desirable not to reveal to, say, customer number 6. This is one example of occasion where the start value of an AutoNumber field is raised, so that customer number 6 has, say, AutoNumber field value 10006. Using random values is desirable in cases where it would be unfortunate if it were possible to guess the next values assigned to new rows in the table. This usage is rare, however. A common problem with AutoNumber fields is encountered if tables are replicated. If multiple users are using multiple replicas of the table, then it is likely that they will end up assigning the same values to AutoNumber fields in new rows that they add, causing replication conflicts when the replicas are merged. This problem is addressed in two ways. First, it is possible to use Replication IDs for such AutoNumbers. Such replication IDs, being GUIDs, will be unique across replicas, with a low probability of collision. Second, when Access creates table replicas, it automatically changes AutoNumbers of the start+increment form to the random form.

Manipulation of counters using DDL The following Data Definition Language (DDL) query creates an AutoNumber field with a start value and an increment:

This query resets the counter:

An alternative method of resetting the counter is to drop column re-add it (this has the side effect of renumbering existing rows in the table):

References

Further reading Microsoft (2009). ".NET Framework Developer's Guide: Retrieving Identity or Autonumber Values". MSDN. Microsoft. Retrieved 2009-07-05.

External links Set Autonumber field using VBA

Worked examples

Example 1 — a first encounter with AutoNumber

Start with the simplest possible case. Write down what AutoNumber claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to AutoNumber before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about AutoNumber ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of AutoNumber

In research
AutoNumber appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses AutoNumber in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
AutoNumber is common in secondary-school and first-year university syllabi. It links to neighbouring topics Database management systems, Microsoft Office, Microsoft database software, so understanding it makes those chapters shorter.
In everyday life
Look for AutoNumber outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “AutoNumber” →

How to study AutoNumber in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what AutoNumber means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain AutoNumber out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is AutoNumber in simple terms?

AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table.

Why does AutoNumber matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study AutoNumber?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on AutoNumber.

Tags

  • Database management systems
  • Microsoft Office
  • Microsoft database software

Keep exploring