{"id":37,"date":"2019-04-29T17:56:11","date_gmt":"2019-04-29T17:56:11","guid":{"rendered":"https:\/\/courses.bowdoin.edu\/computer-science-2340-database-design\/?page_id=37"},"modified":"2019-04-29T17:56:11","modified_gmt":"2019-04-29T17:56:11","slug":"database-design","status":"publish","type":"page","link":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/database-design\/","title":{"rendered":"Database Design"},"content":{"rendered":"<h4><strong>Task: Research Relational Databases vs. Graph Databases<\/strong><\/h4>\n<p><b>Relational Databases<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>Structure<\/b><span style=\"font-weight: 400\">: Tables<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Relationships<\/b><span style=\"font-weight: 400\">: High-level, formed between tables<\/span><\/li>\n<\/ul>\n<h4><strong><b>Great for<\/b><span style=\"font-weight: 400\">: transactional data, modeling hierarchies, repetitive data<\/span><\/strong><\/h4>\n<p><b>Graph Databases<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>Structure<\/b><span style=\"font-weight: 400\">: Nodes and edges\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Relationships<\/b><span style=\"font-weight: 400\">: Low-level, formed between records<\/span><\/li>\n<\/ul>\n<h4><strong><span style=\"font-weight: 400\"><b>Great for<\/b>: Flexible data, visualizations, large and complicated data sets<\/span><\/strong><\/h4>\n<p>&nbsp;<\/p>\n<h4><strong>Task: Representation of the Gallery to Graph Model<\/strong><\/h4>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-95 aligncenter\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/DdIsQDA9LN_HD1K-yhy99NtJi_Q9EhEBfu8HpreZA1qnZfyfUFZlNOnEqtmlqECwIztSl2Ulpy9kom6Nb6rxTE4EUz_TFTqU4gshiLN7KXECNKD03YzcerdoUwpYSioKJx0UX8mJKlU.png\" alt=\"\" width=\"529\" height=\"682\" srcset=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/DdIsQDA9LN_HD1K-yhy99NtJi_Q9EhEBfu8HpreZA1qnZfyfUFZlNOnEqtmlqECwIztSl2Ulpy9kom6Nb6rxTE4EUz_TFTqU4gshiLN7KXECNKD03YzcerdoUwpYSioKJx0UX8mJKlU.png 529w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/DdIsQDA9LN_HD1K-yhy99NtJi_Q9EhEBfu8HpreZA1qnZfyfUFZlNOnEqtmlqECwIztSl2Ulpy9kom6Nb6rxTE4EUz_TFTqU4gshiLN7KXECNKD03YzcerdoUwpYSioKJx0UX8mJKlU-233x300.png 233w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-97 aligncenter\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/KpiyiETdSbFRTRzLo_UyfktvsDZku2LA4ipIiDuCSS20lUJHRvlMWU3sTtJZQz9kcndzoZNwh560hihI-uUcqsmAsvEGtO7uveZ0Lr792YVyGtAiI3jNwWQHF8Bt3DO8ssIIXuDwhnU.jpg\" alt=\"\" width=\"786\" height=\"599\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-96 aligncenter\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE.jpg\" alt=\"\" width=\"805\" height=\"603\" srcset=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE.jpg 1600w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE-300x225.jpg 300w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE-1024x768.jpg 1024w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE-768x576.jpg 768w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE-1536x1152.jpg 1536w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/RqrJODo7C1_6KsAFnorTJFghkvDnA6E6NySkXDVCPSPeiJrlS8ijMWvKyAMd8uCKutAdTZYcP-AXV4YjZ7wLKBXcwQWnDTJYS1uzVxKm8uHFuWraaUFgjZDTs4pJqDyjLqXrXKfmwAE-1200x900.jpg 1200w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 aligncenter\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/YPk0oP68EUlLC4TOB2nakU1OHLcHZhL18iVuRFtyUMo-nwiV941zq3jdjq12ctwuMMRHPOf_YzcHEXwZHiuvrXJ6iNLeGIhzd_cf0V1Cei8MWcio8ORdbrx0Xd1Uy4btXe2vAXljVLw.png\" alt=\"\" width=\"1594\" height=\"1146\" \/><\/p>\n<h4><strong>Task: Create Queries: Find Paintings in Zone<\/strong><\/h4>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-98 alignleft\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/xAkgsuNQWG6nWV1oPxVqc4AYAWNzFHG37k9sJls1rmYv88QaE2Z9JfA-gui9UWEKe-EM7n2eQA574n4TcyGD_4rj8wCSoltMzGNC9Z9VcvleSzW2RTLVay9jQimoHF6ZP1M1a_7D3o.png\" alt=\"\" width=\"372\" height=\"353\" \/><\/h4>\n<h4><strong><span style=\"font-weight: 400\">Cypher Query Statement<\/span><\/strong><\/h4>\n<p><span style=\"font-weight: 400\">MATCH<\/span><\/p>\n<p><span style=\"font-weight: 400\">(z:Zone)-[:CONTAINS]-&gt;(p:Painting)\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">RETURN p, z<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>Task: Create Queries: Find Zone Based on Location<\/strong><\/h4>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-101 alignleft\" src=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/g_kC_P7egJTW9CxoC13P4EC9mvq1WSfnIQVBdCg2a5wdC3vLR0q8t-naicdNK2wR7F8oQSU4sawauFZosYepBxpjCIvXSp96QUBnGLKLiPw7p03KfvrpSBrDPYTkNizLTCUKM8A1X34.png\" alt=\"\" width=\"271\" height=\"309\" srcset=\"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/g_kC_P7egJTW9CxoC13P4EC9mvq1WSfnIQVBdCg2a5wdC3vLR0q8t-naicdNK2wR7F8oQSU4sawauFZosYepBxpjCIvXSp96QUBnGLKLiPw7p03KfvrpSBrDPYTkNizLTCUKM8A1X34.png 271w, https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-content\/uploads\/sites\/361\/2019\/08\/g_kC_P7egJTW9CxoC13P4EC9mvq1WSfnIQVBdCg2a5wdC3vLR0q8t-naicdNK2wR7F8oQSU4sawauFZosYepBxpjCIvXSp96QUBnGLKLiPw7p03KfvrpSBrDPYTkNizLTCUKM8A1X34-263x300.png 263w\" sizes=\"auto, (max-width: 271px) 100vw, 271px\" \/><\/p>\n<p><span style=\"font-weight: 400\">Cypher Query Statement<\/span><\/p>\n<p><span style=\"font-weight: 400\">MATCH<\/span><\/p>\n<p><span style=\"font-weight: 400\">(n:Node)-[:IS_IN]-&gt;(z:Zone)\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">WHERE n.id = 17\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">RETURN n, z<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Team Database Design: Next Steps<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Web Visualization<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Administration Tool<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Tracking Data Integration<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Task: Research Relational Databases vs. Graph Databases Relational Databases Structure: Tables Relationships: High-level, formed between tables Great for: transactional data, modeling hierarchies, repetitive data Graph Databases Structure: Nodes and edges\u00a0 Relationships: Low-level, formed between records Great for: Flexible data, visualizations, large and complicated data sets &nbsp; Task: Representation of the Gallery to Graph Model &nbsp; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-37","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/pages\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":0,"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/pages\/37\/revisions"}],"wp:attachment":[{"href":"https:\/\/courses.bowdoin.edu\/computer-science-2345-spring-2020\/wp-json\/wp\/v2\/media?parent=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}