{"id":515,"date":"2011-05-24T08:43:01","date_gmt":"2011-05-24T08:43:01","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/tag4fun\/?p=515"},"modified":"2011-05-27T08:55:08","modified_gmt":"2011-05-27T08:55:08","slug":"to-sql-or-not-to-sql","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/tag4fun\/2011\/05\/24\/to-sql-or-not-to-sql\/","title":{"rendered":"To SQL or not to SQL?"},"content":{"rendered":"<p>The first version of the prototype (running on this website) used MySQL to store the tags.<\/p>\n<div id=\"attachment_587\" style=\"width: 643px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.46.22.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-587\" class=\"size-full wp-image-587 \" title=\"Some Sample Data in MySQL\" src=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.46.22.png\" alt=\"\" width=\"633\" height=\"141\" srcset=\"https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.46.22.png 904w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.46.22-300x66.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><p id=\"caption-attachment-587\" class=\"wp-caption-text\">Some Sample Data in MySQL<\/p><\/div>\n<p>This was fine but called for a much more complicated layout when we began to deal with multiple accounts, some people having just one account, some people having more than one facebook account, some people having 1 twitter 1 facebook, etc.<\/p>\n<p>The second prototype was created to run on the Google App Engine and so used Google BigTable as the storage mechanism. This allowed us much more flexibility in how we stored each individual tag.<\/p>\n<div id=\"attachment_588\" style=\"width: 650px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.49.50.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-588\" class=\"size-large wp-image-588 \" title=\"Profiles in BigTable\" src=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.49.50-1024x144.png\" alt=\"\" width=\"640\" height=\"90\" srcset=\"https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.49.50-1024x144.png 1024w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.49.50-300x42.png 300w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.49.50.png 1061w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-588\" class=\"wp-caption-text\">Profiles in BigTable<\/p><\/div>\n<div id=\"attachment_589\" style=\"width: 551px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.08.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-589\" class=\"size-full wp-image-589 \" title=\"Providers in BigTable\" src=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.08.png\" alt=\"\" width=\"541\" height=\"38\" srcset=\"https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.08.png 901w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.08-300x21.png 300w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/a><p id=\"caption-attachment-589\" class=\"wp-caption-text\">Providers in BigTable<\/p><\/div>\n<div id=\"attachment_590\" style=\"width: 650px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.30.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-590\" class=\"size-large wp-image-590\" title=\"Tags in BigTable\" src=\"http:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.30-1024x135.png\" alt=\"\" width=\"640\" height=\"84\" srcset=\"https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.30-1024x135.png 1024w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.30-300x39.png 300w, https:\/\/blog.soton.ac.uk\/tag4fun\/files\/2011\/05\/Screen-shot-2011-05-27-at-09.50.30.png 1044w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-590\" class=\"wp-caption-text\">Tags in BigTable<\/p><\/div>\n<p>Although we may move away from the app engine in the future it is likely that we will keep the NoSQL data store (perhaps using CouchDB or MongoDB) as it allows much more\u00a0flexibility\u00a0and (if we need it in future) scalability. Tags are quite a simple thing to store and we really have no use for lots of complicated JOINs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first version of the prototype (running on this website) used MySQL to store the tags. This was fine but called for a much more complicated layout when we began to deal with multiple accounts, some people having just one &hellip; <a href=\"https:\/\/blog.soton.ac.uk\/tag4fun\/2011\/05\/24\/to-sql-or-not-to-sql\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":159,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6496,6475],"tags":[11831,191,227],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-prototype-2","category-technical-problems","tag-no-sql","tag-prototype","tag-sql"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/users\/159"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":3,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":593,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/posts\/515\/revisions\/593"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/tag4fun\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}