{"id":2545,"date":"2019-08-12T11:36:51","date_gmt":"2019-08-12T11:36:51","guid":{"rendered":"http:\/\/teachcomputerscience.com\/?p=556"},"modified":"2024-07-24T10:47:01","modified_gmt":"2024-07-24T10:47:01","slug":"database-table","status":"publish","type":"post","link":"https:\/\/teachcomputerscience.com\/database-table\/","title":{"rendered":"Database Table"},"content":{"rendered":"<div class=\"gb-container gb-container-c01a572c upsell-block\"><div class=\"gb-inside-container\">\n<div class=\"gb-grid-wrapper gb-grid-wrapper-43247699\">\n<div class=\"gb-grid-column gb-grid-column-6352b6d2\"><div class=\"gb-container gb-container-6352b6d2\"><div class=\"gb-inside-container\">\n\n<h2 class=\"gb-headline gb-headline-6baf29a2 gb-headline-text\">GCSE Databases Resources (14-16 years)<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>An editable PowerPoint lesson presentation<\/li><li>Editable revision handouts<\/li><li>A glossary which covers the key terminologies of the module<\/li><li>Topic mindmaps for visualising the key concepts<\/li><li>Printable flashcards to help students engage active recall and confidence-based repetition<\/li><li>A quiz with accompanying answer key to test knowledge and understanding of the module<\/li><\/ul>\n\n\n<div class=\"gb-button-wrapper gb-button-wrapper-ff412fb0\">\n\n<a class=\"gb-button gb-button-699fdbdc gb-button-text\" href=\"https:\/\/teachcomputerscience.com\/gcse\/databases\/\">View GCSE Databases Resources<\/a>\n\n<\/div>\n<\/div><\/div><\/div>\n\n<div class=\"gb-grid-column gb-grid-column-79971378\"><div class=\"gb-container gb-container-79971378\"><div class=\"gb-inside-container\">\n\n<h2 class=\"gb-headline gb-headline-40ed781c gb-headline-text\">A-Level Introduction to Databases (16-18 years)<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>An editable PowerPoint lesson presentation<\/li><li>Editable revision handouts<\/li><li>A glossary which covers the key terminologies of the module<\/li><li>Topic mindmaps for visualising the key concepts<\/li><li>Printable flashcards to help students engage active recall and confidence-based repetition<\/li><li>A quiz with accompanying answer key to test knowledge and understanding of the module<\/li><\/ul>\n\n\n<div class=\"gb-button-wrapper gb-button-wrapper-e06615a0\">\n\n<a class=\"gb-button gb-button-bb878ed9 gb-button-text\" href=\"https:\/\/teachcomputerscience.com\/a-level\/exchanging-data\/introduction-to-databases\/\">View A-Level Introduction to Databases Resources<\/a>\n\n<\/div>\n<\/div><\/div><\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n\n<p class=\"wp-block-paragraph\">A relational database is made up of&nbsp;different components. The most important of these is the table. All the data in the <a href=\"http:\/\/teachcomputerscience.com\/what-is-a-database\/\">database<\/a> is stored in the database table.&nbsp; Without tables, there would not be much needed for relational databases at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Information on a single subject is placed in order as rows and columns in a&nbsp;relational database.&nbsp; For example, a database for a company would typically contain a table for employee information, which would store employee numbers, addresses, phone numbers, and so on, as a series of columns.&nbsp; Every single piece of data is a&nbsp;<a href=\"http:\/\/teachcomputerscience.com\/database-fields\/\">field<\/a>&nbsp;in the table.&nbsp; A column consists of all the entries in a single field, like the telephone numbers of all the employees.&nbsp; Fields, in turn, are arranged as&nbsp;records, which are complete sets of information, each of which contains a row.&nbsp; The method of&nbsp;normalisation aims at identifying how data will be most effectively systematised into tables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A table is a named relational database data set that is arranged by rows and columns.&nbsp; The relational table is a vital relational database concept because tables are the principal form of data storage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Columns form the table\u2019s structure, and rows form the content.&nbsp; Tables permit restrictions for columns, but not for rows.&nbsp; Every database table must have a distinct name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Relational tables keep data in columns and rows.&nbsp; When forming a table, columns must be described, but columns may be appended or removed after table creation.&nbsp; During this time, column data restrictions may or may not be defined.&nbsp; For example, when creating an EMPLOYEE_MASTER table for storing employee information, definitions may be added. An example of this could be a DATE_OF_BIRTH column accepting dates only or an EMPLOYEE_NAME column that may not be null.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Table rows are the table\u2019s actual data elements.&nbsp; In the EMPLOYEE_MASTER table, the rows hold each employee record.&nbsp; Thus, a row consists of a data element contained within each table column.&nbsp; If a row value is not entered, the value is termed \u201cnull,\u201d which does not have the same meaning as a zero or a space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tables have other table connections that are determined by special columns. The most influential of these are primary and foreign keys.\u00a0 Going back to our original example, the EMPLOYEE_MASTER table has an EMPLOYEE_ID column that is used to uniquely identify each table employee.\u00a0 If another table needs to refer to a certain employee, a corresponding column that references the EMPLOYEE_MASTER table\u2019s employee ID may be inserted.\u00a0 Other tables do not need to store additional employee details that are already stored in the EMPLOYEE_MASTER table.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/032-data.png\" alt=\"All data in a database is stored in a database table.\" class=\"wp-image-5956\" width=\"331\" height=\"331\" title=\"\" srcset=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/032-data.png 512w, https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/032-data-150x150.png 150w, https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/032-data-300x300.png 300w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Database Table Structure<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A database has one or more tables, wherein each table has rows and columns.&nbsp; Each row in a relational database is distinctly identified by a primary key.&nbsp; A primary key can be present in one or more sets of column values, but most of the time it is found in a single column.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each relational table has a primary key.&nbsp; A primary key is used to distinctly identify each row in the database.&nbsp; The same primary key value cannot be present in two rows.&nbsp; The practical benefit of this is that you can distinguish each row without needing more information than its primary key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Columns<\/strong> \u2013 These are defined to hold a specific type of data, such as dates, or numeric\/textual data.&nbsp; It is defined by its name and data type.&nbsp; The name is used in SQL statements when selecting and ordering data, while the data type is used to validate the stored information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rows<\/strong> \u2013 A table can contain zero or more rows.&nbsp; When there are zero rows, it is said to be empty.&nbsp; There is no practical limit on the number of rows a table can hold.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The columns are can be thought of as giving the table its personality, while the rows can be considered to grant it its substance.<\/p>\n\n\n\n<h3 class=\"gb-headline gb-headline-01329c39 gb-headline-text\"><strong>Further Readings:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Table_(database)\" target=\"_blank\" rel=\"noopener\">Table (database)<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A relational database is made up of&nbsp;different components. The most important of these is the table. All the data in the database is stored in the database table.&nbsp; Without tables, there would not be much needed for relational databases at all. Information on a single subject is placed in order as rows and columns in &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Database Table\" class=\"read-more button\" href=\"https:\/\/teachcomputerscience.com\/database-table\/\" aria-label=\"Read more about Database Table\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12],"tags":[204,47],"class_list":["post-2545","post","type-post","status-publish","format-standard","hentry","category-databases","tag-article","tag-hide-old-upsell","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"acf":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/posts\/2545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/comments?post=2545"}],"version-history":[{"count":2,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/posts\/2545\/revisions"}],"predecessor-version":[{"id":605975,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/posts\/2545\/revisions\/605975"}],"wp:attachment":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/media?parent=2545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/categories?post=2545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/tags?post=2545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}