If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Is this Table Design Normalized Correctly?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-09, 00:56
steven.81 steven.81 is offline
Registered User
 
Join Date: Mar 2009
Posts: 14
Is this Table Design Normalized Correctly?

Hi,

I'm currently in the middle of a system conversion and just starting to learn the ins and outs of Database development and wanted to see if someone could confirm whether I'm on the right track or not!

Our system gives a discount based on the the type of Product (Product Group) and the type of customer (Customer Price Group).

So a product can have a product group such as Belts, Fibre Discs, Wire Brushes, etc... to determine the discount given based on whether the customer Price group is Trade, Distributor, Reseller etc...

The following table might make this a little clearer...

Is this Table Design Normalized Correctly?-pricegroup1.gif

So I came up with the following table design:

Product Table: Product Code, Product Group (Key: Product Code)
Customer Table: Customer Code, Price Group (Key: Customer Code)
Price Table: Product Group, Price Group, Rate (Key: Product Group, Price Group). Is this the correct setup for this to be normalized?

Is this Table Design Normalized Correctly?-pricegroup2.gif

I hope I'm on the right track. I just wanted to get some confirmation whether this is the correct design or if I've gone wrong somewhere before I go any further. Any advice or help would be greatly appreciated.

Cheers
Reply With Quote
  #2 (permalink)  
Old 03-09-09, 03:36
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
Is it normalised
I dunno, have you tried asking your fellow students, or shock horror prove your teacher/lecturer
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 03-09-09, 03:51
steven.81 steven.81 is offline
Registered User
 
Join Date: Mar 2009
Posts: 14
Umm, I'm not a student and never said I was one????

I'm currently working on a transferring the data from an old legacy system, a task which I haven't done before. It is not in my field of expertise but my company has asked me to do it anyway. If I'm going to do it I want to do it right though so I have been teaching myself about relational databases. I assumed the people using this forum would be an excellent source to help me on my way...I hope I'm correct?

So please...if you don't have anything constructive to add I'm not quite sure why your responding to me???? As I'm trying to teach myself I thank anyone else with any helpful advice.

Cheers
Reply With Quote
  #4 (permalink)  
Old 03-09-09, 04:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
We get a lot of students on here trying to get their homework done for them Steven. Sometimes it takes a little probing to separate the loafer from the professional. The odd nose put out of joint is generally considered a price worth paying to avoid aiding cheating.

Design looks fine. I would use the same column names in both tables. I would probably use the product code rather than the name in your third table. But these aren't normalisation issues.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #5 (permalink)  
Old 03-09-09, 04:23
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
the only time normalisation ever crops up in questions here is when students try to get their coursework assessed prior to handing it it in, often students pretend they are just doing some work for their company, or are taking over a legacy system and are not too sure.

I've yet to hear somebody actually working in field attempt to 'noramlise' their data, as its something that most practioners would do naturally without even thinking about it.

besides which I've seen soemthing very similar to this requirement not so long back, and that was deffo an assignment.

if you are looking for help on normalisation then I'd suggest you look at the following
Fundamentals of Relational Database Design -- r937.com
The Relational Data Model, Normalisation and effective Database Design
both excellent sources of information and assistance when normalising data
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #6 (permalink)  
Old 03-09-09, 04:56
steven.81 steven.81 is offline
Registered User
 
Join Date: Mar 2009
Posts: 14
Cheers for the help,

If your trying to root out the cheaters fair enough then.

The actual system uses Product Group and Price Group codes which are keyed to tables containing further data about these so the actual data will use the codes...I used the names and dumbed down the the tables so what I was explaining would be clearer.

Thanks guys. I was hoping to make sure I was understanding correct database design correctly before jumping in and doing the SQL to set up the tables.

Cheers again
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On