{"id":479,"date":"2022-08-23T17:01:15","date_gmt":"2022-08-23T16:01:15","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/?page_id=479"},"modified":"2022-08-23T17:40:04","modified_gmt":"2022-08-23T16:40:04","slug":"normalisation","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/normalisation\/","title":{"rendered":"Normalisation"},"content":{"rendered":"<p>Normalisation is the process of dividing a flat file database into smaller tables\u00a0\u200b<\/p>\n<p>In other words, normalisation removes the deletion, insertion and update <span data-usefontface=\"true\" data-contrast=\"none\">anomalies from a database table.<\/span><br \/>\nA table which is in unnormalised form is a flat file table.<\/p>\n<p><strong>Example<\/strong>\u200b<\/p>\n<p>A school stores\u00a0all of\u00a0it&#8217;s\u00a0course details in record cards with one record card for\u00a0each course. A student may take several courses, and teachers may teach more than one course. A sample record card is shown below<\/p>\n<p data-ccp-props=\"{&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559683&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559737&quot;:0,&quot;335562764&quot;:2,&quot;335562765&quot;:1,&quot;335562766&quot;:2,&quot;335562767&quot;:0.2,&quot;335562768&quot;:2,&quot;335562769&quot;:0}\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-482\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png\" alt=\"\" width=\"1260\" height=\"468\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png 1260w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-300x111.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-1024x380.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-768x285.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-624x232.png 624w\" sizes=\"auto, (max-width: 1260px) 100vw, 1260px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"color: red\">Step 1: List the attributes<\/strong><\/p>\n<p>\u200bcourse_id<\/p>\n<p>course_title<\/p>\n<p>teacher_id<\/p>\n<p>teacher_name<\/p>\n<p>pupil_id<\/p>\n<p>pupil_name<\/p>\n<p>DOB<\/p>\n<p>tutor_group<\/p>\n<p>grade<\/p>\n<p><strong style=\"color: red\">Step 2: Identify the Primary key and <u>underline it<\/u><\/strong><\/p>\n<p><u>\u200bcourse_id<\/u><\/p>\n<p>course_title<\/p>\n<p>teacher_id<\/p>\n<p>teacher_name<\/p>\n<p>pupil_id<\/p>\n<p>pupil_name<\/p>\n<p>DOB<\/p>\n<p>tutor_group<\/p>\n<p>grade<\/p>\n<p><strong style=\"color: red\">Step 3: Identify the repeating groups &#8211; using the primary key, decided if their is one value linked to the primary key or many values.<\/strong><\/p>\n<p><a href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-482\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png\" alt=\"\" width=\"1260\" height=\"468\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm.png 1260w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-300x111.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-1024x380.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-768x285.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23170451\/norm-624x232.png 624w\" sizes=\"auto, (max-width: 1260px) 100vw, 1260px\" \/><\/a><\/p>\n<p><u>\u200bcourse_id<\/u><\/p>\n<p>course_title <strong>1<\/strong><\/p>\n<p>teacher_id\u00a0<strong>1<\/strong><\/p>\n<p>teacher_name\u00a0<strong>1<\/strong><\/p>\n<p>pupil_id\u00a0<strong>m<\/strong><\/p>\n<p>pupil_name\u00a0<strong>m<\/strong><\/p>\n<p>DOB\u00a0<strong>m<\/strong><\/p>\n<p>tutor_group\u00a0<strong>m<\/strong><\/p>\n<p>grade\u00a0<strong>m<\/strong><\/p>\n<p>Linked to the Primary Key course_id, there is 1 course title and 1 teacher etc, but there are many pupil_id&#8217;s and pupil_names etc.<\/p>\n<p><strong style=\"color: red\">Step 4: Remove the repeating groups to a new entity &#8211; make sure you name both entity tables<\/strong><\/p>\n<p><strong>Course<\/strong> (<u>course_id<\/u><\/p>\n<p>course_title<\/p>\n<p>teacher_id<\/p>\n<p>teacher_name )<\/p>\n<p><strong>Pupil<\/strong> (pupil_id<\/p>\n<p>pupil_name<\/p>\n<p>DOB<\/p>\n<p>tutor_group<\/p>\n<p>grade)<\/p>\n<p><strong style=\"color: red\">Step 5: Underline the new Primary key in the second entity and add the Foreign key to link both tables together and mark it with an asterisks *.<\/strong><\/p>\n<p><strong>Course<\/strong> (<u>course_id<\/u><\/p>\n<p>course_title<\/p>\n<p>teacher_id<\/p>\n<p>teacher_name )<\/p>\n<p><strong>Pupil<\/strong> (<u>pupil_id<\/u><\/p>\n<p>pupil_name<\/p>\n<p>DOB<\/p>\n<p>tutor_group<\/p>\n<p>grade<\/p>\n<p>course_id*)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normalisation is the process of dividing a flat file database into smaller tables\u00a0\u200b In other words, normalisation removes the deletion, insertion and update anomalies from a database table. A table which is in unnormalised form is a flat file table. Example\u200b A school stores\u00a0all of\u00a0it&#8217;s\u00a0course details in record cards with one record card for\u00a0each course. [&hellip;]<\/p>\n","protected":false},"author":79984,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-479","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/users\/79984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":14,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/479\/revisions"}],"predecessor-version":[{"id":494,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/479\/revisions\/494"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/media?parent=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}