Hey,
i have this table:
CREATE TABLE Listing (
id int(11) NOT NULL auto_increment,
tblAccount_id tinyint,
keyword varchar(50) NOT NULL default '',
title varchar(250) NOT NULL default '',
description mediumtext,
isAdultListing tinyint(1),
url varchar(250) NOT NULL default '',
weight decimal(10,2) NOT NULL default '0.00',
isActive tinyint(1),
isApproved tinyint(1),
PRIMARY KEY (id, tblAccount_id)
) ;
Each member can have one or more listing.
Each listing can have one or more keywords for that listing.
Each keyword has a weight associated with it. The higher the weight, the higher it will appear in the results.
I am working on a PPC engine.
Would it make more sense to have another table for keyword or is it fine the way it is now ?
I assumed that by having the keywords and the weight in one table, i will not need to run a join. Only one select statement that goes through the table and looks at the keyword, title, and description field for any occurance of the search term.
What do you guys thinks ?