{"id":3740,"date":"2023-10-05T18:38:03","date_gmt":"2023-10-05T18:38:03","guid":{"rendered":"http:\/\/localhost\/ecole9ja\/?p=3740"},"modified":"2023-10-05T18:43:26","modified_gmt":"2023-10-05T18:43:26","slug":"week-2-ss3-first-term-data-processing-notes","status":"publish","type":"post","link":"https:\/\/ecolebooks.com\/nigeria\/posts\/week-2-ss3-first-term-data-processing-notes\/","title":{"rendered":"Week 2 &#8211; SS3 First Term Data  Processing Notes"},"content":{"rendered":"<p>\u00a0<strong>WEEK TWO<br \/>\n<\/strong><strong>INDEXES<br \/>\n<\/strong>DEFINITION<strong><br \/>\n\t\t\t<\/strong>An Index is a copy of database table that has been reduced to certain fields and the copy is always in sorted form. The index also contains a pointer to the corresponding record of the actual table so that the fields not contained in the index can also be read. Index contains a value and a pointer to first record that contains data value.<br \/>\nA Database Index is a data structure that speeds up certain operation on a file. The Operation involves a search key which is the set of record files( in most cases a single field). The elements of an index are called <strong>data entries<\/strong>. Data entries can be actual data record. A given file of data records can have several indexes, each with different search keys as showed in the table below.<\/p>\n<p>\u00a0<\/p>\n<div>\n<table>\n<tbody>\n<tr>\n<td>Customer ID<\/td>\n<td>Name<\/td>\n<td>Address<\/td>\n<td>City<\/td>\n<td>State<\/td>\n<td>Zip<\/td>\n<\/tr>\n<tr>\n<td>001<\/td>\n<td>Mr Daniel<\/td>\n<td>10,Bale str.<\/td>\n<td>Maryland<\/td>\n<td>Lagos<\/td>\n<td>1011<\/td>\n<\/tr>\n<tr>\n<td>002<\/td>\n<td>Mrs Okon<\/td>\n<td>5, Oju-ile<\/td>\n<td>Ota<\/td>\n<td>Ogun<\/td>\n<td>1021<\/td>\n<\/tr>\n<tr>\n<td>003<\/td>\n<td>Mr David<\/td>\n<td>26, Dalemo str.<\/td>\n<td>Ikeja<\/td>\n<td>Lagos<\/td>\n<td>1023<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u00a0The search engine searches for a value in table or file in two ways. The <strong>table scan<\/strong> which is sequential and <strong>index<\/strong> which is random.<br \/>\nIndexes are special lookup tables that the database engine uses to speed up data retrieval. An index in a database is similar to an index in the back of a book.<br \/>\nAn index table or file consists of records called <strong>index entries<\/strong>. It is of the form<\/p>\n<p>\u00a0<\/p>\n<div>\n<table>\n<tbody>\n<tr>\n<td><strong>Search- key<\/strong><\/td>\n<td><strong>Pointer<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u00a0<br \/>\n\u00a0The search key field is used to sort the rows (in the index column) and the pointer field (in index column) indicates where the actual data in the table will be retrieved. When a table has an index it simply means the records in that table has been sorted in one way or the other.<br \/>\nIndexes are automatically created when primary key and unique constraints are defined on table columns.<\/p>\n<p>\u00a0<strong>EVALUATION<\/strong><br \/>\n\t\t1. What is an index?<br \/>\n2. What are data entries?<\/p>\n<p>\u00a0INDEX CLASSIFICATION<br \/>\nIndex can be classified as either <strong>clustered<\/strong> or <strong>unclustered<\/strong>.<\/p>\n<p>\u00a0CLUSTERED<br \/>\nClustered index is an index whose sorting order determines the order of how the rows\/records in a table are stored. There could be only one clustered index in a table because there could always be one way of arranging the records in a table at a given time. For example, if you are asked to arrange some tables in a room, you could arrange them in a round form, row form or packed them close together, only one way at a time. Clustered index also means that related values in a table are stored close to each other according to the order of the index.<\/p>\n<p>\u00a0<\/p>\n<ul>\n<li>CLUSTERED INDEX\n<\/li>\n<\/ul>\n<p>A Clustered index is when a file is organized so that the ordering of data  records is the same as or closes to the ordering of data entries. A clustered index can take place only if the data records are sorted on the search key field. For example, suppose that students records are sorted by age; an index on age that stores data entries in sorted order by age is a clustered index.<\/p>\n<p>\u00a0Indexes that maintain data entries in sorted order by search key use a collection of index entries, organized into a tree structure to guide searches for data entries. Thus, clustered indexes are relatively expensive to maintain when the file is updated, when data entries are to be moved across pages, and if records are identified by a combination of page id and slot as is often the case, all places in the database that point to a moved record must also be updated to point to the new location.These additional updates can be time consuming.<\/p>\n<p>\u00a0The table below illustrate a clustered index file:<\/p>\n<div>\n<table>\n<tbody>\n<tr>\n<td>Student ID<\/td>\n<td>Name<\/td>\n<td>Age<\/td>\n<\/tr>\n<tr>\n<td>00231364OJ<\/td>\n<td>Olu Jacob<\/td>\n<td>12<\/td>\n<\/tr>\n<tr>\n<td>00241265AF<\/td>\n<td>Agu Faith<\/td>\n<td>13<\/td>\n<\/tr>\n<tr>\n<td>00251057AJ<\/td>\n<td>Abiola Joseph<\/td>\n<td>13<\/td>\n<\/tr>\n<tr>\n<td>00211362MS<\/td>\n<td>Mathew Stephen<\/td>\n<td>14<\/td>\n<\/tr>\n<tr>\n<td>00251302TB<\/td>\n<td>TjomasBintu<\/td>\n<td>15<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u00a0<\/p>\n<ul>\n<li>UNCLUSTERED INDEX\n<\/li>\n<\/ul>\n<p>This  an index whose sorting order does not determine the order of how the rows\/records in a table are stored. This means that the search keys in the index column is sorted in one order while the actual records or rows are sorted in another order or are not sorted at all.<\/p>\n<p>\u00a0This is an index that is not clustered. A data file can contain several unclustered index. For example, supposing that students records are sorted by age; and if  additional index on gpa field is included, it is called unclustered index.<\/p>\n<p>\u00a0<strong>GENERAL EVALUATION<br \/>\n<\/strong>(1)Explain a database index<br \/>\n(2) Explain clustered index versus unclustered index.<\/p>\n<p>\u00a0<strong>READING ASSIGNMENT<\/strong><br \/>\n\t\tUnderstanding Data Processing for Senior Secondary Schools by Dinehin Victoria, Page 254.<strong><br \/>\n\t\t\t<\/strong><br \/>\n\u00a0<strong>WEEKEND ASSIGNMENT<\/strong><\/p>\n<ol>\n<li>\u2026\u2026\u2026. is a database table that has been reduced to certain fields.a) Table  b) An index c) Table model d) Network model\n<\/li>\n<li>The copy of an index is always in  \u2026\u2026 form.  a) duplicate b) field c) sorted  d) domain\n<\/li>\n<li>The \u2026\u2026\u2026\u2026index can take place only if the data records are sorted on the search key field. a)unclustered b)insert c) update  d) clustered\n<\/li>\n<li>A \u2026\u2026\u2026\u2026\u2026.. can contain several unclusterd indexes a) data file b) primary c) check d) index\n<\/li>\n<li>Index contain a value and  \u2026\u2026. a)pointer b) sign c) update d) model\n<\/li>\n<\/ol>\n<p>\u00a0<strong>THEORY<br \/>\n<\/strong><\/p>\n<ol>\n<li>Differentiate between clustered index and unclustered index.\n<\/li>\n<li>State two reasons why clustered index is expensive to maintain.\n<\/li>\n<li>What is an index?<strong><br \/>\n\t\t\t\t<\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0WEEK TWO INDEXES DEFINITION An Index is a copy of database table that has been&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,291],"tags":[],"class_list":["post-3740","post","type-post","status-publish","format-standard","hentry","category-posts","category-first-term-ss3-data-processing"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/posts\/3740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/comments?post=3740"}],"version-history":[{"count":1,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/posts\/3740\/revisions"}],"predecessor-version":[{"id":3741,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/posts\/3740\/revisions\/3741"}],"wp:attachment":[{"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/media?parent=3740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/categories?post=3740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecolebooks.com\/nigeria\/wp-json\/wp\/v2\/tags?post=3740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}