Atomicity

In Database World, atomicity can either mean the lowest level of detail in our data or it can relate to transactions occurring on the data in the database. As this tutorial is on database design – we are talking about level of detail.

If you want to know more about atomicity or granularity (another boring word that DB designers like to drone on about) then toddle off to Google and ask her!

In our relational database design we are striving to reduce all our data to the lowest level (atomic) that we are interested in. Ah ha! NOT The absolute lowest level then? No.

Reducing data to the lowest level of interest

Time for an example:

A client who manufactures paint wants us to design a database. As we are fantastically gifted database designers we could start immediately ‘intuitively normalising’ – we don’t need to analyse the data – we know what cars are all about!

  • Cars are sold by dealerships.
  • Dealerships have branches in towns
  • Branches sell many makes like Ford, Jaguar, Mercedes.
  • The makes have different models like Focus, Sierra, Granada.
  • The models have different versions like GT, GTX, CSI.
  • These versions of car are purchased by customers

Our data model would look like this:

cars

So we go rushing off to the client saying “look at our wonderful fully normalised database – that will be £10,000 please” to which the client replies “How many red ones?”

What? How many red ones? Well, the client does manufacture paint!

The Atomic level needed in this design was just Cars!:

carsonly

The colour being an ATTRIBUTE of the ENTITY Cars. We skipped the analysis part so our data model was pony! Pony and Trap is rhyming slang for ‘not very good’ in London where I come from!

Be SAD – Strategy, ANALYSIS, Design!

Back to Top