Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    Unanswered: Assistance on DB Design

    Hi All.
    I was wondering whether someone could assist me.
    I have a set of users (all with unique usernames)
    For each user, there are a set of products that they view and the price of these products varies depending upon the amount they order. The prices on the products varies between users.

    So my view would look something like this (assuming userA has signed in)

    quantity product1 product2 product3 product4
    1 5.20 3.29 4.99 3.99
    2 3.99 3.99 9.22 9.20

    and obviously userB would have the similar view but with the prices being different - or the same, depending upon the distributors decision.
    I have created one table called users which contains the user details, but I suspect I would need a Foreign Key or some join to ensure that when userA signed in, they would see only the prices applicable to them - not userB's.

  2. #2
    Join Date
    Jan 2005

    Foreign Key

    The primary key of table users will be the foreign key for the product prices table, think if products are the same for all to make a products table that the primary key is foreign key for the prices table so a value per product per user

Posting Permissions

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