If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > One field or split into several fields?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-07, 17:47
Gothic3 Gothic3 is offline
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old 12-03-07, 18:15
amthomas amthomas is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 12-04-07, 07:05
Gothic3 Gothic3 is offline
Registered User
 
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On