donboe — 2010-12-04T02:29:44-05:00 — #1
I have a companies table (about 190.000) with the usual info (name, address, etc). Some of these companies will become advertisers. There are some advertising related fields like (advert_type(pay_per_click, etc), period, budget etc) What do you guys and girls think is best? To have those fields in the companies table or to create a separate table advertising table with company_id as foreign key.
I personally think that I should go for the second option since a company could choose for more than one advert_type. Or is there maybe another way, I didn't think of and someone would choose to use?
I look forward to hear your opinion.
system — 2010-12-04T03:26:26-05:00 — #2
if a company can have many advert types then you will need a second table, otherwise a single table would be ok.
donboe — 2010-12-04T04:53:06-05:00 — #3
Just what I thought myself, but it's never a bad idea to hear some other opinions as well. Thanks
r937 — 2010-12-04T06:54:51-05:00 — #4
yes, there is, but it has the drawback that if you search on all companies that have a certain ad type, for example, it is forced to use a table scan, hence your query is as slow as cold glue
system — 2010-12-04T06:56:22-05:00 — #5