Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 13th, 2005, 9:40 AM   #1
dmorales
Programmer
 
Join Date: Feb 2005
Posts: 74
Rep Power: 4 dmorales is on a distinguished road
database normalization

So I'm making my first database and was wondering if I could some quick advice? How normalized are my tables? Or are they at all?

-1 table with Clients and all their information.

-2 table with Work Orders and the clients they belong to.

-3 table wth white papers and which order they correspond with.

-4 table with contacts info which correspond with other contact field in clients.

I kow this isn't very detailed but maybe you can still give me some good advice.
__________________
Lorem ipsum dolor sit amet...
dmorales is offline   Reply With Quote
Old Apr 13th, 2005, 10:11 AM   #2
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,650
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
well it sounds like it is really setup well, im not sure what more i would personally do to make it better but i will think on it and see what i can come up with
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Apr 13th, 2005, 2:10 PM   #3
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Post

If u want to find that they are well normalize, try a few update, insert and delete commands and check whether they satisfy the conditions or constraints appropriately.

(In other words, just a component testing of your table)

Try the above, and may be then you might feel whether your tables are normalized or not
__________________
Visit: http://www.somaiya.edu
java_roshan is offline   Reply With Quote
Old Apr 13th, 2005, 2:30 PM   #4
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 383
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Actualy it depends. It would probably help if you would write the problem as well, and what fields do your tables contain.
One example would be:
In your first table Clients, if you have FirstName and LastName in the same colomn, that's not good. If you have the Clients address in one column it will probabily not be good either because at some point u may want customers from only one city, or only one streat.

Also, if you have also the client's phone, maybe he has multiple phones. Now you would make another table Telephone with a foreign key that would reference the primary key in the Clients table, and a column Tel ... and so one ..

What i described will take you to the second normalization form. I'm learning now about these things ... so i only know the basics .. kinda'

Oh, 4 tables ... are not that many ...maybe you should have another look at the problem. In the end it all depends on what u plan on doing with your database.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Apr 13th, 2005, 3:12 PM   #5
dmorales
Programmer
 
Join Date: Feb 2005
Posts: 74
Rep Power: 4 dmorales is on a distinguished road
thanks xavier makes sense. So does that mean that I need to break up the database into as many tables as possible? (within reason of course)

I would think that the more information was broken up into manageable pieces (tables?) the easier it would be to query, edit, and maintain. Is this a correct assumption?
__________________
Lorem ipsum dolor sit amet...
dmorales is offline   Reply With Quote
Old Apr 13th, 2005, 11:02 PM   #6
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
It is a correct assumption but there are many other factors under consideration other than just simple normalization. Tables may be normalized uptil the second normal form or just upto the first normal form. One of the reasons, as mentioned in a book (PEARSON EDUCATION, ELMASRI/NAVATHE, Fundamentals of Database Management Systems, 4th edition) is for performance. You might just go through the references of their slides which is available at
ftp://ftp.aw.com/cseng/authors/elmasri/Dbase4e/

and download the "powerpoint.zip" file.

But the assumption is not always true, it may be true for say around 85-90% of times..(just a rough assumption!!!)
__________________
Visit: http://www.somaiya.edu
java_roshan is offline   Reply With Quote
Old Apr 13th, 2005, 11:27 PM   #7
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 383
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
U should really look at online tutorials. Try searching google for: " database normalization tutorial " - you also could look at this : http://dev.mysql.com/tech-resources/...alization.html It will give you a rough ideea about normalization.

All the best to you
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC