GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/CST1600/Labs/Lab09/ |
Upload File : |
<? // JimMartinson/CST1600/Labs/Lab09/index.php $TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n"; ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path. require('application.phpinc'); require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced. $disabled = ''; #$disabled = ' disabled'; // Comment this line to enable lab. $uploadFilename = str_replace('zip','txt',$uploadFilename); $uploadFilename = fileSafe($userFileName.'-'.$evaluationName.'.txt'); ?> <fieldset><legend>Description</legend> The purpose of this lab is to demonstrate the ability to normilize tables from raw data. <?=$gradeNote?> <? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Assignment</legend> <ol class="count"> <? // 1 ?> <li> Create a directory called <b class="copyText"><?=$evaluationName?></b>. We will use it for all work performed in this lab. </li> <? // 2 ?> <li> Create a file called <b class="copyText"><?=$uploadFilename?></b> in your <b><?=$evaluationName?></b> directory and copy the following text into it: <div class="code copyText" style="white-space: pre-wrap;">UNF: studentgrades (StudentId*, StudentName, SP, Lab01, Lab02, Lab03, Lab04, Lab05, Lab06, Lab07, Lab08, Lab09, Total, Final, IP) lettergrade (LetterGrade1, Percentage1, LetterGrade2, Percentage2, LetterGrade3, Percentage3, LetterGrade4, Percentage4, LetterGrade5, Percentage5, LetterGrade6, Percentage6, LetterGrade7, Percentage7, LetterGrade8, Percentage8, LetterGrade9, Percentage9) possiblepoints (SP, Lab01, Lab02, Lab03, Lab04, Lab05, Lab06, Lab07, Lab08, Lab09, Total) 1NF: 2NF: 3NF: Three data rows: </div> <span class="note normal">Do not place any extra text in the text file other than as directed in steps 3 thru 6.</span> <fieldset><legend>The studentgrades table field meanings are:</legend> <ul> <li><b>StudentId</b> is a unique ID number assigned to the student.</li> <li><b>StudentName</b> is the student's full name.</li> <li><b>SP</b> is the student's grade for the Student Profile.</li> <li><b>Lab01</b>, <b>Lab02</b>, <b>Lab03</b>, etc are the student's grades for those labs.</li> <li><b>Final</b> is the student's final grade if no more work is done.</li> <li><b>IP</b> is the student's grade for the work that has been performed.</li> </ul> </fieldset> <fieldset><legend>The lettergrade table field meanings are:</legend> <ul> <li><b>LetterGrade1</b>, <b>LetterGrade2</b>, <b>LetterGrade3</b>, etc are the letter grades that would be given when a percentage is met.</li> <li><b>Percentage1</b>, <b>Percentage2</b>, <b>Percentage3</b>, etc are the percentages that must be met to obtain that letter grade.</li> </ul> </fieldset> <fieldset><legend>The possiblepoints table field meanings are:</legend> <ul> <li><b>SP</b>, <b>Lab01</b>, <b>Lab02</b>, etc are the max points possible for those assignments.</li> </ul> </fieldset> <fieldset><legend>Designate primary keys, foreign keys, and unique fields with:</legend> <ul> <li><b class="bold copyText" style="font-family: monospace;">*</b> (asterisk) to denote a primary key field. <span class="note">PKs are unique and do not need to be marked with the <b>^</b> character.</span></li> <li><b class="bold copyText" style="font-family: monospace;">@</b> (at sign) to denote a foreign key field. Append <b>[table.field]</b> if the table and field a foreign key points to is not obvious. <br><span class="note">Such as when the FK field name is not the same as the name of the field it relates to. <br>E.G. The <b>rerortsTo</b> FK relates to the <b>employeeNumber</b> field in the <b>employees</b> table and would be written as: <b>reportsTo@[employees.employeeNumber]</b>.</span></li> <li><b class="bold copyText" style="font-family: monospace;">^</b> (caret) to denote a unique field that is not a primary key.</li> </ul> </fieldset> </li> <? // 3 ?> <li><b>1NF:</b> Normalize the tables to 1NF and list them under the <b>1NF:</b> line. <ol> <li>Make note of why any tables that violate 1NF. If all tables pass 1NF, just note <b>OK</b>.</li> <li>Create fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you create and why. This should be rare, but you may want to add an Id field to a new table. Mostly you will be removing repeating fields. <br>Make a note of the tables you create and why. This is quite common when you normalize tables thru to 3NF. </li> <li>Rename fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you rename and why. Changes may be needed to remove non-alphanumeric characters, pluralization, or when you remove repeating fields, etc. <br>Make a note of the table you rename and why. This is sometimes done when the data remaining in the table is changed. </li> </ol> </li> <? // 4 ?> <li><b>2NF:</b> Normalize the tables to 2NF and list them under the <b>2NF:</b> line. <ol> <li>Make note of why any tables that violate 2NF. If all tables pass 2NF, just note <b>OK</b>.</li> <li>Create fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you create and why. This should be rare, but you may want to add an Id field to a new table. Mostly you will be removing repeating fields. <br>Make a note of the tables you create and why. This is quite common when you normalize tables thru to 3NF. </li> <li>Rename fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you rename and why. Changes may be needed to remove non-alphanumeric characters, pluralization, or when you remove repeating fields, etc. <br>Make a note of the table you rename and why. This is sometimes done when the data remaining in the table is changed. </li> </ol> </li> <? // 5 ?> <li><b>3NF:</b> Normalize the tables and list them under the <b>3NF:</b> line. <ol> <li>Make note of why any tables that violate 3NF. If all tables pass 3NF, just note <b>OK</b>.</li> <li>Create fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you create and why. This should be rare, but you may want to add an Id field to a new table. Mostly you will be removing repeating fields. <br>Make a note of the tables you create and why. This is quite common when you normalize tables thru to 3NF. </li> <li>Rename fields or tables as needed. Designate a primary key for all tables. <br>Make a note of the fields you rename and why. Changes may be needed to remove non-alphanumeric characters, pluralization, or when you remove repeating fields, etc. <br>Make a note of the table you rename and why. This is sometimes done when the data remaining in the table is changed. </li> </ol> </li> <? // 6 ?> <li><b>Three data rows:</b> Show the sample data as they would be stored in the 3NF tables under the <b>Three data rows:</b> line: <ol> <li>For the first three rows from the studentgrades table.</li> <li>All the data from the lettergrade table.</li> <li>All the data from the possiblepoints table.</li> </ol> <? showBegin('See data in table form',false,true); ?> <pre class="copyText"><? require('Lab09_data.txt') ?></pre> <? showEnd(); ?> <br> <? showBegin('See original data in report form',false,false); ?> <pre class="copyText"><? require('Lab09_report.txt') ?></pre> <? showEnd(); ?> </li> <? // 6 ?> <li>Turn in your assignment: <ol type="a"> <li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li> <li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading. </li> </ol> </li> </ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <? $PartialGradingCriteria = ' <b>Total possible points: assignmentPoints</b> <br> -15 1NF violation. Further grading will not be done. <br> -4 2NF violation. <br> -3 3NF violation. <br> -4 Data loss (Data not in tables or link between data is lost). <br> -4 Deletion anomaly. <br> -3 Insert or update anomaly. <br> -2 Incorrect primary key. <br> -2 Duplication of data (not covered by an insert or update anomaly). <br> -1 Duplication of table for same data type. <br> -1 Incorrect foreign key. <br> -1 Incorrect unique key. <br> -1 Bad table or field name. <br> -1 New or renamed field not listed under <b>Table field meanings are</b> section. <br> -2 Table in <b>Three data rows</b> section does not match table in <b>3NF</b> section. <br> -1 Data incorrect in <b>Three data rows</b> section. <br> '; require('Gradebook/EvaluationSubmission_END.phpinc'); require('common/sectionFooter.phpinc'); #require('../../ReferencesResources.phpinc'); #require($Instructor['Path'].'/ContactInformation.phpinc'); require('common/pageFooter.phpinc'); if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n"; ?>