| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jan 2005
Posts: 30
![]() | Database Normalisation I have some fiedls and i woant to know what they will be like in 1st and 2nd normal form? I can do them in 3rd. thanks here are the fields: Student Middle Name Student Date of Birth Student ID Student Address Student Address 2 Student City/Town Student County Student Postcode Student Parent name Student Telephone Student Parent Mobile Student Parent 2 Name Student Parent 2 Address Student Parent 2 Address 2 Student Parent 2 City/Town ????: NamePros.com http://www.namepros.com/programming/72274-database-normalisation.html Student Parent 2 County Student Parent 2 Post Code Student Parent 2 Telephone Student Parent 2 Mobile Emergency Contact Name Relationship Address Address 2 City/Town County Postcode Telephone Mobile Student previous school Student Form Tutor Student Subjects taken Student Subject groups Student subject sets Tutor First Name Tutor Initials Tutor Surname Thanks |
| |
| | #3 (permalink) |
| Senior Member Join Date: Aug 2004 Location: Washington
Posts: 4,327
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | What do you need exactly?
__________________ Download youtube videos at www.HugYouTube.com -NO LINKS TO PARKED PAGES- Anonymous access at www.Banned.net |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Jan 2005 Location: Land of the m00
Posts: 729
![]() ![]() ![]() ![]() | Why do you need them in 1st or 2nd normal form? 1NF: "A Relation in which the intersection of each row and column contains one and only one value" 2NF: "A relation that is in the first normal form and every non-primary-key attribute is fully functionally dependent on the primary key"
__________________ The more I think the more confused I get...
Last edited by col; 02-27-2005 at 09:25 AM.
|
| |
| | #5 (permalink) |
| Senior Member Join Date: May 2003
Posts: 2,187
![]() ![]() ![]() | your tables wont be normalised unless you move the tutor info to a new table one of the factors of normalisation is that you atomise the data and that it doesnt repeat. your tutor information will repeat. move the tutor feilds to a new table give each tutor an id make "tutor ID" feild in data table and link to them there it saves having your data replicated and when it comes to change details etc for tutors you wont be required to go through each row on the table ????: NamePros.com http://www.namepros.com/showthread.php?t=72274 you could probably do the same for these as well Student previous school Student Form Tutor Student Subjects taken Student Subject groups Student subject sets others students in the same dbase will obviously be in the same sets, groups etc etc so use a unique id to indentify these also is your student id going to be a unique number that can idenfify each row on the table? also just a little nit pick i guess but your making the asumtion that everyone has a parent, not everyone does it might be an idea to replace "parent" to guardian or something similar. |
| |
| | THREAD STARTER #7 (permalink) |
| NamePros Member Join Date: Jan 2005
Posts: 30
![]() | Here is what i have come up with, tell me if it can be improved or something. Student ID Student First Name Student Middle Name Student Surname Student Date of Birth Previous School ID Teacher ID Student Address Student Address 2 Student City/Town Student County Student Post Code Telephone Mobile Contact Name Relationship ID Contact ID Contact Student ID Contact Relationship ID Contact Name Contact Address Contact Address 2 Contact City/Town Contact County Contact Post Code Contact Telephone Emergency Contact Mobile Student Previous ID Student previous school Student ID Student Subjects taken ID Student Subject groups Student Subject sets ID Teacher ID Teacher Form Teacher First Name Teacher Initials Teacher Surname Relationship ID Relationship Name Report ID Subject ID Comment Completed Report ID Student ID Term Subject Set ID Subject Set name Subject ID Subject Name Subject Group ID Subject ID Subject Set ID Teacher ID Class ????: NamePros.com http://www.namepros.com/showthread.php?t=72274 Thanks |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |