Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012

    Unanswered: How should I go about structuring my database to suit these options?

    I'm capable of building tables...... but I'm lost in terms of HOW I should go about structuring my database to make it represent everything I need to utilize in my site. Let me start by saying I'm working on an e-commerce site for designing custom tee shirts, when it comes to certain shirts there's no way I can make one table to suit all the different options needed to represent the item. I don't know if SQL is even the best option to go with but so far it's the only database language I know so I figured it would be good to start here. Take a look at the pic below to get a better idea of the problem I'm having.

    Click image for larger version. 

Name:	Database_Blueprint.png 
Views:	7 
Size:	200.6 KB 
ID:	16742

    As you can see, just this one type of shirt has many options that have to be represented. For starters, the sleeves and collars are different colors, THEN the torso comes in different colors, the price for white torso and color torso shirts are different, every size from infants up to 1X adult is the same price and it increments up each step from 2X up to 5X, the print prices are different for white and colored garments. Some sleeve colors may or may not be available in certain sizes or torso colors, then I have to work in the specs and overview of the item. I HAVE NO CLUE AS TO HOW I SHOULD STRUCTURE THIS!!!

    There are other varieties of shirts I'll be offering as well, some that will need the same solution to this situation but the rest MUCH easier to handle. I'm hoping figuring this out will teach me more than enough to be able to tackle the structure of the others. I plan on building the site with Ruby on Rails and I know that has an SQLite gem for database development. Can someone please help me get to the bottom of how to go about structuring this into a working mechanism? Thanks in advance.

  2. #2
    Join Date
    Apr 2014
    Provided Answers: 23
    something like:

    torsoColor (fill from qry using tColors.Colortype=torso)
    trimColor (fill from qry using tColors.Colortype=Trim)

    color (white,blue...
    colorType (torso,trim)

    size (small men, med men,...

    color (white,color)
    PrintSize (3x3,12x12...

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