My problem is I have a bunch of 'objects'. These objects can have a list of words of up to 3 words and can also have none. For mysql I already have a row per each object and im trying to figure out how to incorporate the words. Here are my approaches:
1: i have 3 extra columns for each word. This though leaves empty, redudant cells when there aren't 3 words.
2: have 1 column with each word seperated by a space in that column. This leaves a redundant cell when there are no words and also requires extra processing
3: make another table to hold the words with a reference number that refers it to it's corresponding object. This requires an extra query but in my opinion has the lowest redundancy.
Advice?
I would always go for #3 using an extra table. This ensures in the future if you need to do any "Word" search using SQL across all objects or change the structure to add more words or reduce words then there wont be any hiccups. Additionally, these additional queries are normally very less burden for a RDBMS server. Also, all the other options will also require some sort of processing from PHP (assuming it is the coding language) which will also consume some CPU cycles. But since #3 will scale well in the future, I shall prefer to go with #3.