Hello, I would still consider myself in the "beginners" stage for php and mysql programming and I have a quick question about structuring a database. Right now I have a website that eventually will have a product database of about 2500 items. I didn't realize it would grow to be this big, I thought at the begining it would have one or two hundred records at most. Basically I have all the products in one big table and I usually find them by "product_type" and there will eventually be about thirty or forty different product types. Is the best idea to eventually have thirty or forty different tables (one for each product type) or is keeping all of the products in one big table an okay option as well? Ultimately I do not yet posses enough programming knowledge to realize which option is better. Or if it is not so much a matter of which option is better, rather which one works best for my situation? Any help is appreciated!
keeping them in one table is fine you can have millions of lines in a database table and still operate just fine. Just keep the product type and other variable you want to use to distinguish the products from each other
For sure you don't need to create a new table for each product type. You can keep them all in one table, but if you have a lot of fields you can split this table into two: keep in first data you request often i.e. ID, name, price and in second store additional information. Of course if you have only 2550 rows it will not give you more speed.