[eluser]gtech[/eluser]
let me get this right..
are you currently only storing the integers in the database and then converting them into strings in the code?
if so then it is perfectly acceptable to store data as strings thats what databases are designed to do, say in the brands table you might want to store name, market share or any other kind of data.
Code:
table brands:
--------------
id name share
== ===== =====
0 Chevrolet 20%
1 Buick 20%
2 Ford 40%
there is no performance loss storing the strings in the database.
the point of having an id is so other tables can relate to the brands table
eg
Code:
table models:
--------------
id name brandid
== ===== =======
0 Cortina 2
1 Ka 2
2 Escort 2
3 Camaro 0
the brandid tells me that the Camaro is a chevrolet, so if I want to select company information related to the car model I can easily.
It is more efficient to search using ids and that is why it is useful for every database table to contain a unique id for every row.
another advantage is that say chevrolet and ford built an escort your table could look like this
Code:
id name brandid
== ===== =======
0 Cortina 2
1 Ka 2
2 Escort 2
3 Escort 0
note that each model still has a unique ID, but the brandid shows that the models belong to different companies.
does that make sense, or have I misunderstood your question?
you may want to research one to many, and many to many relationships.