Solved

Database normalization problem

Posted on 2006-10-28
7
260 Views
Last Modified: 2012-05-05
Hi all experts,
I have one question about normalization

I have a Initial Database as follow:
(Please copy and patse to Notepad, choose Courier Font)

================================================================
CLUB_CODE | CLUB NAME | ST# | ST_NAME | SUBJ# | SUBJ_NAME | MARK
================================================================
          |           |     |         | P1    | PHYSICAL  |  6
   EN     |  ENGLISH  |     |         | M1    | MATH 1    |  5
          |           | ST1 | JOHN    | C1    | CHEMICHY  |  8
----------|-----------|     |         | M1    | MUSIC     |  7
   CP     | COMPUTER  |     |         | D1    | DRAW      |  5
          |           |     |         | D2    |DATA STRUCT|  8  
=================================================================
          |           |     |         | P1    | PHYSICAL  |  4
   EN     |  ENGLISH  |     |         | M1    | MATH 1    |  7
          |           | ST2 | SMITH   | C1    | CHEMICHY  |  5
----------|-----------|     |         | M1    | MUSIC     |  7
   CP     | COMPUTER  |     |         | D1    | DRAW      |  8
          |           |     |         | D2    |DATA STRUCT|  9  
=================================================================
          |           |     |         | P2    | PHYSICALII|  5
   CP     | COMPUTER  |     |         | M3    | MATH II   |  7
----------|-----------| ST3 | MARK    | C2    | CHEMICHYII|  3
          |           |     |         | M2    | MUSICII   |  9
   FR     |   FRENCH  |     |         | D2    | DRAW II   |  5
=================================================================

   
Can you help me to move it into the 1st normal form (1NF) in 2 ways :
- flatterning
- split into attributes groups

Thank you in advance.

0
Comment
Question by:bufalobk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 118 total points
ID: 17825147
hi

you are already in the 1nf form
the 1nf form says that you should take out groups of data, but you don't have those in your design
if you wish i can help you get it in 3nf form,
but i will need you to tell me what is the meaning of each column


momi sabag
0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 116 total points
ID: 17825210
You need to add three new tables, Club, Student and Subject

Club
-----------------
Club_Code
Club_Name

Student
-----------------
St#
St_Name

Subject
---------------
Subj#
Subj_Name


then your main table becomes

MainTable
-------------------------
Club_Code   PK
St#             PK
SubJ#         PK
Mark

yes, that is a Composite PrimaryKey, made up of the three fields Club_Code, St#, SubJ#

AW

0
 
LVL 1

Assisted Solution

by:simonstre
simonstre earned 116 total points
ID: 17825250
Your table in 1NF would be like this :

(CLUB_CODE, ST#, SUBJ#, CLUB NAME, ST_NAME, SUBJ_NAME, MARK) where CLUB_CODE, ST#, SUBJ# are the tree members of your primary key.

Your data would looks like this :

================================================================
CLUB_CODE | CLUB NAME | ST# | ST_NAME | SUBJ# | SUBJ_NAME | MARK
================================================================
   EN     |  ENGLISH  | ST1 | JOHN    | P1    | PHYSICAL  |  6
   EN     |  ENGLISH  | ST1 | JOHN    | M1    | MATH 1    |  5
   EN     |  ENGLISH  | ST1 | JOHN    | C1    | CHEMICHY  |  8
   CP     | COMPUTER  | ST1 | JOHN    | M1    | MUSIC     |  7
   CP     | COMPUTER  | ST1 | JOHN    | D1    | DRAW      |  5
   CP     | COMPUTER  | ST1 | JOHN    | D2    |DATA STRUCT|  8  
   EN     |  ENGLISH  | ST2 | SMITH   | P1    | PHYSICAL  |  4
   EN     |  ENGLISH  | ST2 | SMITH   | M1    | MATH 1    |  7
   EN     |  ENGLISH  | ST2 | SMITH   | C1    | CHEMICHY  |  5
   CP     | COMPUTER  | ST2 | SMITH   | M1    | MUSIC     |  7
   CP     | COMPUTER  | ST2 | SMITH   | D1    | DRAW      |  8
   CP     | COMPUTER  | ST2 | SMITH   | D2    |DATA STRUCT|  9  
   CP     | COMPUTER  | ST3 | MARK    | P2    | PHYSICALII|  5
   CP     | COMPUTER  | ST3 | MARK    | M3    | MATH II   |  7
   FR     |   FRENCH  | ST3 | MARK    | C2    | CHEMICHYII|  3
   FR     |   FRENCH  | ST3 | MARK    | M2    | MUSICII   |  9
   FR     |   FRENCH  | ST3 | MARK    | D2    | DRAW II   |  5

your groups would be the following : {CLUB_CODE, CLUB_NAME}, {ST#, ST_NAME}, {SUBJ#, SUBJ_NAME}, {MARK}

Eventually, when your data will be very normalized, it will appear in tables like this :

Students : ST#, ST_NAME (pk --> ST#)
Clubs : CLUB_CODE, CLUB_NAME (pk --> CLUB_CODE)
Subjects : SUBJ#, SUBJ_NAME (pk --> SUBJ#)
StudentsMarks : ST#, CLUB_CODE, SUBJ#, MARK (pk --> ST#, CLUB_CODE, SUBJ#)

Hope this helps.

0
 
LVL 7

Expert Comment

by:TRACEYMARY
ID: 17828554
That very nice example authur......See if groups then split them to a new table.
Great
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question