When I\u2019m not working on data<\/a>, or blogging about data<\/a> or thinking about data, I go to ballet class. It makes my brain work in different ways, it\u2019s very challenging and who doesn\u2019t want to dance like a ballerina?<\/p>\n\n\n\n
This week I had obviously not really switched off from work, as I got to thinking: a ballet class is a good way to describe database concepts<\/a>.<\/p>\n\n\n\n
If you\u2019ve never been to a ballet class it generally begins with a warm-up at the barre.<\/p>\n\n\n\n
Our teacher is the PRIMARY KEY. She is UNIQUE, identifies all \u2018rows\u2019 in the class and is not NULL. She maintains our entity integrity. The teacher from the Jazz class usually visits and she is our FOREIGN KEY. She maintains our referential integrity.<\/p>\n\n\n\n
Everyone lines up in order at the barre. This is the same order every time, as everyone likes their own spot. This is our clustered index<\/a>.<\/p>\n\n\n\n
We then begin our exercises at the barre. We move through 1st, 2nd and 3rd position. Once we get to 3rd position we are considered warmed up and ready for more challenging exercises. The same way once we reach 3rd Normal Form, our data is considered \u2018Normalised\u2019.<\/p>\n\n\n\n
These exercises, just like moving through the forms of data normalisation, build on each other, are based on formal rules and are the basis of the art form.<\/p>\n\n\n\n
After barre, everyone moves into the centre. We work in a group where everyone works through exercises and turns together. When we perform solo, DISTINCT<\/a>, we come out one at a time to perform.<\/p>\n\n\n\n
When we begin to practice our combinations with a partner from the class next door, there is an INNER JOIN<\/a> and everyone has someone to dance with.<\/p>\n\n\n\n
The last part of the class is the rehearsal for the next show. We BEGIN TRANSACTION to start, and work through our ideas around the music and what looks good.<\/p>\n\n\n\n
If we are happy with what we\u2019ve come up with then we COMMIT and if not we ROLLBACK.<\/p>\n\n\n\n
At the very end of class, we curtsy and then TRUNCATE. We will be back next time to INSERT, UPDATE and SELECT again, with all our jargon.<\/p>\n\n\n\n
Photo by Wellington Cunha<\/a><\/strong> from Pexels<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"