{"id":451,"date":"2016-05-19T11:14:32","date_gmt":"2016-05-19T16:14:32","guid":{"rendered":"https:\/\/researchbdev.wpengine.com\/digital-computational-studies\/?p=451"},"modified":"2017-04-20T09:20:33","modified_gmt":"2017-04-20T14:20:33","slug":"databases-debunked-helpful-terms","status":"publish","type":"post","link":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/student-research\/sql\/databases-debunked-helpful-terms\/","title":{"rendered":"Databases Debunked: Helpful Terms"},"content":{"rendered":"<p><strong>What&#8217;s in a database?<\/strong>\u00a0 A database is a system for storing, retrieving, and analyzing data. \u00a0A database is made up of tables. \u00a0Tables are made up of rows (entries) and columns (attributes). \u00a0Each entry has its own\u00a0unique identifier, usually a number, called a primary key. \u00a0Primary keys exist in their own column in each table.<\/p>\n<p><strong>Why do primary keys matter? \u00a0<\/strong>This brings us back to the question of why we need databases. \u00a0Primary keys\u00a0ensure that each entry (row) in a database is unique. \u00a0In comparison, when we consider a database alternative, like Microsoft Excel, each cell is unique. \u00a0Each cell can be changed independently of any other element in the spreadsheet, including the other cells in its row. \u00a0Really, primary keys allow for the\u00a0relations that make up relational databases.<\/p>\n<p><strong>What&#8217;s SQL?<\/strong> \u00a0SQL stands for Structured Query Language. \u00a0It&#8217;s the language used to make databases understandable by computers or other machines.<\/p>\n<p><strong>Well then, what&#8217;s MySQL?<\/strong> \u00a0MySQL is relational database management system (RDBMS) , a software product that\u00a0understands SQL. \u00a0DCSI has chosen to explore databases using MySQL because it&#8217;s is free, open-source, and widely used.<\/p>\n<hr \/>\n<p>A <strong>database<\/strong> is collection of organized data,\u00a0made up of tables. \u00a0Each <strong>table<\/strong> represents a real-world entity. \u00a0A <strong>relational database<\/strong> keeps track of relations between information stored in different tables according to their common elements.\u00a0 Tables are organized into rows and columns, where rows represent one instance, or <strong>record<\/strong>, of a real-world entity and columns represent characteristics, or <strong>attributes<\/strong>, of the record. \u00a0A single cell in a table represents a <strong>field<\/strong>, an intersection between a row and column.<\/p>\n<p>In order to maintain the relations of a relational database,\u00a0every record in a table has a unique <strong>primary key<\/strong>, an unchanging value held in a table&#8217;s column.<\/p>\n<p>To put these terms into context, we can consider a fictional Bowdoin database. \u00a0The database might contain tables for Students, Dorm Rooms, Professors, Classes, and more.<\/p>\n<p><a href=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/bowdoinDB1-e1461337415372.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-469 aligncenter\" src=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/bowdoinDB1-e1461337415372.png\" alt=\"bowdoinDB\" width=\"440\" height=\"273\" srcset=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/bowdoinDB1-e1461337415372.png 440w, https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/bowdoinDB1-e1461337415372-300x186.png 300w, https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/bowdoinDB1-e1461337415372-250x155.png 250w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p>A Student table might contain records of each student at Bowdoin, where each row represents an individual student. \u00a0Each column in the Student table might represent different attributes of each Student, for example, their unique student ID number, their first name, their last name, the SU box number, and more. \u00a0Conveniently, since each Bowdoin student has a unique<\/p>\n<p><a href=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/studentTable1-e1461339566869.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-471 aligncenter\" src=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/studentTable1-e1461339566869.png\" alt=\"studentTable\" width=\"437\" height=\"277\" srcset=\"https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/studentTable1-e1461339566869.png 437w, https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/studentTable1-e1461339566869-300x190.png 300w, https:\/\/research.bowdoin.edu\/digital-computational-studies\/files\/2016\/04\/studentTable1-e1461339566869-250x158.png 250w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>A good way to think about the relationship between primary keys are foreign keys is to consider<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong>Definitions<\/strong><\/p>\n<ul>\n<li><strong>Database: <\/strong>\u00a0&#8220;A system that allows for the efficient retrieval and storage of information&#8221; (Ramsay)<\/li>\n<li><strong>Relational database management system: \u00a0<\/strong>The<\/li>\n<li><strong>Domain: \u00a0<\/strong>&#8220;The universe of discourse&#8221; (Ramsay)<\/li>\n<li><strong>Entities:<\/strong> \u00a0The elements of a domain, represented as rows. \u00a0Essentially, the major components of categorization.<\/li>\n<li><strong>Attributes:<\/strong> \u00a0The categories within an attribute, represented as columns.<\/li>\n<li><strong>Fields: \u00a0<\/strong>The intersection of rows and columns.<\/li>\n<li><strong>Primary key:<\/strong> \u00a0A unique value held by each individual record in a table.\u00a0 Representationally, it is held in its own column.<\/li>\n<li><strong>Foreign key:<\/strong> \u00a0Stores a reference back to the entity.<\/li>\n<li><strong>Association:<\/strong> \u00a0An entity that represents an abstracted relationship between two foreign keys.<\/li>\n<li><strong>Schema:<\/strong> \u00a0A representation of database design that is understandable to computers\/machines. (Ramsay)<\/li>\n<li><strong>Structured Query Language (SQL):<\/strong> \u00a0The language used to translate database design into a representation understandable to computers\/machines. (Ramsay)<\/li>\n<\/ul>\n<hr \/>\n<p><em>These definitions and analogies are inspired by the Digital Humanities Coursepack by Harvey Quaemen, Jon Bath, and John Yobb and by Stephen Ramsay&#8217;s &#8220;Databases&#8221; in &#8220;A Companion to the Digital Humanities&#8221;. \u00a0Thank you!<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What&#8217;s in a database?\u00a0 A database is a system for storing, retrieving, and analyzing data. \u00a0A database is made up of tables. \u00a0Tables are made up of rows (entries) and columns (attributes). \u00a0Each entry has its own\u00a0unique identifier, usually a number, called a primary key. \u00a0Primary keys exist in their own column in each table. [&hellip;]<\/p>\n","protected":false},"author":106,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[17],"tags":[],"class_list":{"0":"post-451","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-sql","7":"entry"},"_links":{"self":[{"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":0,"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"wp:attachment":[{"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.bowdoin.edu\/digital-computational-studies\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}