The DjangoModelling.com Data Modelling newsletter has now been going for several months and this blog will consolidate the information provided in the newsletter.

It’s worth having a short introduction to explain what DjangoModelling.com is trying to do.

This is not a site to explain or debate technical details with experts, but it is intended to have a relaxed, and hopefully interesting, look at data modelling.  We hope to discuss the basics of data modelling, and tease out some of the challenging problems that make data modelling the fascinating subject that it is.

Some say that data modelling is easy, but I would suggest that means they have not thought about it deeply enough!  Interesting, frustrating, exacting and compelling: it is all these things at different times, and we hope to reflect on the simple and dissect the difficult.  For many companies and individuals, there is a need to understand data modelling, and we hope to assist through practical examples.

office-notes-line-drawing-300px

Data modelling in the past

When modelling data in the olden days – the days when I was young, and before computers were ubiquitous – we used to keep lists on pieces of lined paper or the pages of a book.  We wrote the information neatly in columns.  Different lists would be on different pieces of paper or in different books.  This has been much the same for thousands of years.  For example, about 3,500 years ago, two lists were made – about 40 years apart – of the numbers of people in family groups in the nation of Israel, with one entry for each family group (these lists are now in the Bible: see Numbers chapters 1 and 26).

Entire libraries of clay tablets have been found in ancient cities that record business transactions in the same way.  Clay tablets didn’t fail like hard disks, and they didn’t burn like pieces of paper – instead they became stronger – so we still have the information today.  2,500 years after the death of all the people involved, it is probably just as useful as much of the information we keep in databases now!

When I was young, I had one list of coins, one of old cameras and one list of my books.  In each of these lists there were lots of objects to record and each one was normally described on one line of a piece of paper.  Each object had to be put in the correct list (eg. no cameras in the list of coins), and it was only written down once in that list.

Last year when we moved house, I was looking at the old notebook containing my list of ‘antique’ cameras.  These were mostly old unwanted items discarded on scrap heaps or sent to Opportunity Shops by more discerning people.  The list showed the same sort of development path as many databases do.  Entries on the first page were written as text in my untidy teenage hand.  One line or a few lines for each camera, and the information recorded for each camera was different.  On later pages, entries were more in the form of columns and the information recorded was more consistent.

Lists and tables

  • Lists on scraps of paper have now been replaced by databases.
  • In relational databases, each different list is a different table.
  • Each column in the list is a column in a table.
  • Each row on the page, is now a row in a table.

Data growth

One fact that stood out as I looked through the book is that the amount of information recorded for each camera kept increasing.  Sometimes, the earlier records had been updated with extra information in a different coloured pen.

This increase in the detail of information stored is also typical of most databases.  Sometimes it happens because we find we need more information, but often it happens because we like to hoard things, and data is no different from other things.