Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database normalization problem

Posted on 2006-10-28
7
Medium Priority
?
271 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
4 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 472 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 464 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 464 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

773 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