Database normalization problem

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.

LVL 1
bufalobkAsked:
Who is Participating?
 
momi_sabagConnect With a Mentor Commented:
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
 
Arthur_WoodConnect With a Mentor Commented:
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
 
simonstreConnect With a Mentor Commented:
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
 
TRACEYMARYCommented:
That very nice example authur......See if groups then split them to a new table.
Great
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.