View Single Post
Old 04-18-2003, 08:05 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
Database Design Question

i designed and maintain a php/mysql app for a tech-support department to track inbound calls.

the system has been up and running great for about a year now.. but i am doing a re-design to optimize the database and add a few more features.

when a caller calls in, usually they are calling about 1 product.. however there are cases where they will call about 2 products.

the product field separates multiple products with commas .. this is fine when i'm using php to extract data, however when using other programs such as crystal reports, i can't get an accurate query because of course they can't explode a field, then reference the product name from the products table.

if you're not following, don't worry, but here is my question.

the solution to the problem is to just make another table that consists of 2 fields. "issue_id" & "product_id".

i suppose it's not that big of a deal, but it just seems like i'm running a mysql table ranch with all the little tables i'm adding to optimize for more precise queries.

is it better to have more tables? i suppose i can answer my own question by saying "if you want that level of precision" .. but i'm interested what others think.
__________________
Mike
sde is offline   Reply With Quote