{"id":3094,"date":"2019-02-16T19:48:26","date_gmt":"2019-02-16T06:48:26","guid":{"rendered":"https:\/\/helenanderson.co.nz\/?p=3094"},"modified":"2020-05-14T18:44:42","modified_gmt":"2020-05-14T06:44:42","slug":"database-dance-class","status":"publish","type":"post","link":"https:\/\/www.helenanderson.co.nz\/database-dance-class\/","title":{"rendered":"A database is like a dance class"},"content":{"rendered":"\n

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

Let me explain.<\/p>\n\n\n\n


\n\n\n\n

The Barre<\/h2>\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

Keys<\/h3>\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

Indexes<\/h3>\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

Normal Form<\/h3>\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


\n\n\n\n

The Centre<\/h2>\n\n\n\n

SELECT<\/h3>\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

JOINS<\/h3>\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


\n\n\n\n

The Rehearsal<\/h2>\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


\n\n\n\n

The Curtsy<\/h2>\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


\n\n\n\n

Photo by Wellington Cunha<\/a><\/strong> from Pexels<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"

This week I got to thinking, a ballet class is a good way to describe database concepts.<\/p>\n","protected":false},"author":1,"featured_media":3095,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":""},"categories":[214],"tags":[198,205,199],"yoast_head":"\nA database is like a dance class | Helen Anderson<\/title>\n<meta name=\"description\" content=\"This week I got to thinking, a ballet class is a good way to describe database concepts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/helenanderson.co.nz\/database-dance-class\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A database is like a dance class | Helen Anderson\" \/>\n<meta property=\"og:description\" content=\"This week I got to thinking, a ballet class is a good way to describe database concepts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/helenanderson.co.nz\/database-dance-class\/\" \/>\n<meta property=\"og:site_name\" content=\"Helen Anderson\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-16T06:48:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-14T06:44:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.helenanderson.co.nz\/wp-content\/uploads\/2020\/05\/database-dance-class.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@helenanders26\" \/>\n<meta name=\"twitter:site\" content=\"@helenanders26\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/13.237.200.153\/#website\",\"url\":\"https:\/\/13.237.200.153\/\",\"name\":\"Helen Anderson\",\"description\":\"Data Analyst | Technical Writer\",\"publisher\":{\"@id\":\"https:\/\/13.237.200.153\/#\/schema\/person\/4677a271385757403307fb29bd14d7bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/13.237.200.153\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-NZ\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#primaryimage\",\"inLanguage\":\"en-NZ\",\"url\":\"https:\/\/www.helenanderson.co.nz\/wp-content\/uploads\/2020\/05\/database-dance-class.jpg\",\"width\":1280,\"height\":853,\"caption\":\"database danceclass\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#webpage\",\"url\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/\",\"name\":\"A database is like a dance class | Helen Anderson\",\"isPartOf\":{\"@id\":\"https:\/\/13.237.200.153\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#primaryimage\"},\"datePublished\":\"2019-02-16T06:48:26+00:00\",\"dateModified\":\"2020-05-14T06:44:42+00:00\",\"description\":\"This week I got to thinking, a ballet class is a good way to describe database concepts.\",\"inLanguage\":\"en-NZ\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/helenanderson.co.nz\/database-dance-class\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#webpage\"},\"author\":{\"@id\":\"https:\/\/13.237.200.153\/#\/schema\/person\/4677a271385757403307fb29bd14d7bf\"},\"headline\":\"A database is like a dance class\",\"datePublished\":\"2019-02-16T06:48:26+00:00\",\"dateModified\":\"2020-05-14T06:44:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/13.237.200.153\/#\/schema\/person\/4677a271385757403307fb29bd14d7bf\"},\"image\":{\"@id\":\"https:\/\/helenanderson.co.nz\/database-dance-class\/#primaryimage\"},\"keywords\":\"analysis,data model,sql\",\"articleSection\":\"Data Analysis\",\"inLanguage\":\"en-NZ\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/13.237.200.153\/#\/schema\/person\/4677a271385757403307fb29bd14d7bf\",\"name\":\"Helen Anderson\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/13.237.200.153\/#personlogo\",\"inLanguage\":\"en-NZ\",\"url\":\"https:\/\/www.helenanderson.co.nz\/wp-content\/uploads\/2019\/11\/helen-anderson-profile-selects-FA-1000.jpg\",\"width\":1000,\"height\":1000,\"caption\":\"Helen Anderson\"},\"logo\":{\"@id\":\"https:\/\/13.237.200.153\/#personlogo\"},\"description\":\"Hi, I'm Helen. I'm a data analyst, technical writer, and AWS Data Hero. I interpret the story behind the numbers, build data applications, and grow analyst and developer communities - currently at Kiwibank.\",\"sameAs\":[\"http:\/\/www.helenanderson.co.nz\/\",\"https:\/\/www.instagram.com\/helenanders26\/\",\"https:\/\/www.linkedin.com\/in\/helenanders26\/\",\"https:\/\/twitter.com\/helenanders26\",\"https:\/\/www.youtube.com\/channel\/UCttVhJizwkhgmMlDBMUE0wQ\"]}]}<\/script>\n","_links":{"self":[{"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/posts\/3094"}],"collection":[{"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/comments?post=3094"}],"version-history":[{"count":3,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/posts\/3094\/revisions"}],"predecessor-version":[{"id":3250,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/posts\/3094\/revisions\/3250"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/media\/3095"}],"wp:attachment":[{"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/media?parent=3094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/categories?post=3094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.helenanderson.co.nz\/wp-json\/wp\/v2\/tags?post=3094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}