Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    2

    One field or split into several fields?

    Hi I'm working with a small tyre database.
    The most common way of describing a tyre is, for example 165/60 -15 where 165 is the width in millimeters, 60 the height in percent and 15 the inch of the rim. Since there will be several ways of searching a tyre my first thought was to split up this information in 3 fields (width, height, inch) and store it in a tyre-table but is this a good way of doing it?

    Tyre-table
    Code:
    TyreID, Description, Width, Height, Inch, Distributor, Model, Type, SpeedCode, InPrice, ....
    5555, 165/60 -15, 165, 60, 15, Bridgestone, SomeModel, 10, 56L, 20.00, .... 
    5558, 165/60 -15, 165, 60, 15, Firestone, SomeModel, 11, 75T, 25.00, .... 
    5577, 175/50 -15, 175, 50, 15, Hankook, SomeModel, 10, 79T, 30.00, ....
    This will cause a lot of redundant data so another way is to add a new table which includes all possible sizes:

    Size-table
    Code:
    SizeID, Description, Width, Height, Inch
    1, 165/60 -15, 165, 60, 15
    2, 165/65 -15, 165, 65, 15
    3, 175/50 -15, 175, 50, 15
    Tyre-table
    Code:
    TyreID, SizeID, Distributor, Model, Type, SpeedCode, InPrice, ....
    5555, 1, Bridgestone, SomeModel, 10, 56L, 20.00, .... 
    5558, 1, Firestone, SomeModel, 11, 75T, 25.00, .... 
    5577, 3, Hankook, SomeModel, 10, 79T, 30.00, ....
    I will probably put distributor in another table as well but the main question is if this is a good way of storing the size data?

    This is of course just some dummy data but hopefully you understand the question anyway.

    Any suggestion would be greatly appreciated

  2. #2
    Join Date
    May 2005
    Location
    San Antonio, Texas
    Posts
    134
    hmmm, interesting. tire sizes are that common? If they are so common that you could use them like that then its probably fine to do so

    my only other comments would be that models belong to a distributor so if you wanted.. you really only need to reference a model which is linked to a distributor.

    If you ever planned on having more model info stored with model, then I would make a model table.
    Vi veri veniversum vivus vici
    By the power of truth, I, a living man, have conquered the universe

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Thanks for your suggestion.
    One problem when split into two tables appears when I add new data and the size doesn't exists in the size table (strange size exists in rare cases)... It must be a better way to solve this. Any other ideas?

Posting Permissions

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