SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2004
    0 Post(s)
    0 Thread(s)

    Database Schema Question

    I work for a screen printing company and I've been debating on the best database schema to fit my needs on their new website.

    The problem is that my company has several different prices for each product based off quantity, and the number of colors. The pricing for each product looks like this.

    Product - A
    QTY               500    1,000    2,500    5,000     10,000       
    1 Color            .65     .41       .38       .32         .26
    2 Color            .90     .54       .46       .40         .32     
    Add Color         .25     .13       .11       .08         .04
    Some products have a different quantity scale also, such as Product A starts at 500 where Product B will start at 25.

    I thought about putting all the price information in one table linked to a product table, then build a 3 dimensional array from the query result, but that does not seem like a very good solution to me. I'm sure there is a much better(scalable) way to do this using joins.

    Anyone got any idea's?

  2. #2
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Scottsdale, Arizona
    0 Post(s)
    0 Thread(s)
    Why not have a seperate table that lists all possible Qty discount ratios and all starting prices? If you did that you could link the product table with the price and quantity discount tables. Is that reasonable?


Posting Permissions

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