Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011

    Online Store Database

    Hi, im new to the site and hoping someone can help.

    I am looking at setting up a site to sell shoes online and I am building the website myself.

    All payment stuff etc is all going to be handled by paypal or similar but looking to set a database behind the site to store details about the products and track stock levels etc but I am struggling to put together a schema for the database that I think will work.

    I think the main issue I am having is deciding how to handle the fact that a certain product (shoe) can have multiple sizes as well as being either an adults or a kids product.

    My experience in this kind of thing is so so - I have put together database driven sites before but I am by no means an expert.

    Hoping someone can just give me a pointer on what would be a good way of setting this up in terms of tables etc.

    Probably doesnt really matter as like I say its the ideal DB design im after at the moment but for the record I will be using PHP and MySQL.

    Any hints or tips much appreciated.

  2. #2
    Join Date
    Apr 2010
    firstly i'm no expert... i usually confine myself to asking questions rather than answering them but fwiw this might be one way to think of it:

    product table (pk id)
    id, make, name, type
    1, adidas, samba, adult
    2, nike, air, adult
    3, new balance, 305, adult
    4, nike, air, kids

    sizes available (pk: product_id, size)
    product_id, size
    1, 5
    1, 6
    1, 7
    1, 8
    1, 9
    1, 10
    2, 8
    2, 9
    3, 7.5
    3, 8
    3, 8.5
    3, 9
    3, 9.5
    4, 6
    4, 7
    4, 8

  3. #3
    Join Date
    Aug 2011
    Many thanks for the reply jx12345, any input much appreciated.

    Seems like it could work, will have a look at it.

Tags for this Thread

Posting Permissions

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