Results 1 to 6 of 6
  1. #1
    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...

    Click image for larger version. 

Name:	PriceGroup1.GIF 
Views:	70 
Size:	1.6 KB 
ID:	9298

    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?

    Click image for larger version. 

Name:	PriceGroup2.GIF 
Views:	394 
Size:	6.1 KB 
ID:	9299

    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

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Is it normalised
    I dunno, have you tried asking your fellow students, or shock horror prove your teacher/lecturer
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    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

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    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 on the Tiger 800 or the Norton

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •