Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2007
    Posts
    15

    Unanswered: CD WOW based College Project

    I'm currently doing a project that has a web based front end to a database.

    I've decided to do a online retail store ie www.cdwow.ie

    At the moment I've 4 tables (Games, DVD, CD, Users) but im not sure what relationships to set between them.

    My second issue is how to record user orders??

    I've attached the work i've done so far.

    I'd be grateful for any help or a point in the right direction
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Can you tell us the structure of your tables using the following notation:

    TableName ( primaryKey(s), forgeignKey(s), field(s) )
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2007
    Posts
    15
    4 Tables (But think i need another to record the users orders)

    Games (Pri Key) Code, Platform, Title, price, number of copies...........

    DVD (Pri Key) Code, Region, Title, Price, no of copies.............

    CD (pri Key) Code, Title, Price, chart position, Artist...........

    Users (Pri Key) Customer No, Name, Address, Telephone etc...............

    Im not sure what Foregin Keys i need to post to set the relationships plus how can I record the users purchases

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Base on you table I would do it this way

    create
    orders table

    orderid (prikey)
    Users (prikey base on the Users table)
    Pdate (purchase date) don't use the word Date as a feildname
    TTYPE what had been ordered (dvd cd game) don't use the word type as a feildname
    QTY number ordered
    price can't use the price from the table cause if someone places a order know and the need to store that price
    cause if you don't when the price goes up the old orders will show the new price values.
    Last edited by myle; 11-02-07 at 15:34.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    Nov 2007
    Posts
    15
    Yeah that makes much more sense now, THANKS!!

    Just one thing. In the Orders table how would I record the exact produt they ordered rather the just being CD, DVD or GAME. Could I just create another field i.e Product Details??

    I've updated my database my having a big problem setting up the relationships. I've attached the file to make things easier to see
    Attached Files Attached Files
    Last edited by mikebyrne; 11-02-07 at 17:18.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'm not sure I agree with Myles design suggestion...

    To me it looks like every item is on a separate order, is that the way it's supposed to be?
    George
    Home | Blog

  7. #7
    Join Date
    Nov 2007
    Posts
    15
    All i really want to do is keep track of what a user buys and with that reduce number in stock levels on that item.

    I'd like to be able to run queries on what a particular customer has ordered

  8. #8
    Join Date
    Nov 2007
    Posts
    15
    There is really 3 things I want this database to achive:

    1) Stock levels to automaticaly reduce with a purchase (if possible)

    2) A way to run queries to see what each user has ordered

    3) Track sales ie If 2 copies of a game have been sold a 2 will appear in the sold field (The opposite to stock levels Decreasing)
    Last edited by mikebyrne; 11-05-07 at 05:48.

Posting Permissions

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