January 21, 2012 at 9:32 pm
Hello everyone,
I have some columns that I have to normalize to the 3rd normal form and all I came up with is just two tables. My question is can I get more tables out of them? Here is the columns:
Student ID
Student Name
Major
Credits Required to Graduate
Course ID
Course Name
Credit Hours for Course
Course Cost
Prerequisites to Course
I came up with two tables (students and courses)
Students(Student ID,Student Name,Major,Credits Required to Graduate)
Courses(Course ID,Course Name,Credit Hours for Course,Course Cost, Prerequisites to Course)
Am i doing something wrong? please help me!!
Regards
January 21, 2012 at 10:53 pm
Oooh, looks like a homework assignment!
Normally I don't help with those, but since you put forth an effort with what you think it might be, I'll at least give you a hint.
What determines the credits required to graduate? Is it your name or something else?
One thing that can help (especially when you're just starting to design databases) is to start putting actual data in. I think you will find you can get a better idea of how the data relates when you're looking at example data that makes sense to you.
January 22, 2012 at 12:48 am
pfm200586 (1/21/2012)
Student IDStudent Name
Major
Credits Required to Graduate
Course ID
Course Name
Credit Hours for Course
Course Cost
Prerequisites to Course
I came up with two tables (students and courses)
Students(Student ID,Student Name,Major,Credits Required to Graduate)
Courses(Course ID,Course Name,Credit Hours for Course,Course Cost, Prerequisites to Course)
In general I agree with bt, both on why I'll help and that I usually avoid these. 🙂
As bt said, start putting data in. Then figure out why it's going to hurt to do calculations on this information. You need to think in entities and relationships.
First, what's an entity? Then, how do they relate.
So, looking at your list there, I'll give you a few questions to ask yourself. 1) How do you determine if the Student has enough credits to allow graduation? Second, how many times do you want to type in Psych 101 for all the different subsequent Psych courses? Third, how do you determine in this situation if the student HAS taken Psych 101 and CAN take Psych 102?
Armed with those questions, you should be able to puzzle out a few answers, or at least get you started on them.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
January 29, 2012 at 12:24 pm
Nothing wrong with this. You want to normalise a database to reduce/abolish data repetition, and to make it easy to maintain as well as added benefits of data integrity through key constraints.
Keep things simple. Its always the best way.
Please get in touch if you have any further questions.
Database Designers
January 29, 2012 at 2:26 pm
Few other things that appears to be missing from the design:
How do I tell what courses a student has taken?
What about courses that have multiple pre-reqs? How do you record that Physics 3 requires Physics 2, Maths 2 and Chemistry 1 (yes, it did at my university)?
What about students that have multiple majors? (My majors were Physics and Computer Science, so it's not a theoretical possibility)
What determines the credits required for grad? Is it the major? Or is each student different?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply