Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

efficient mysql database

Status
Not open for further replies.

djd4n

Programmer
Jan 30, 2005
3
0
0
GB
hi

i'm currently writing a web based catalogue system in php using a mysql database.

the catalogue has a number of products in it from different brands.

i would like to know if it is more efficient to have each brand in a separate table then a "master" table just listing the brand name and corresponding table

or

all the products in one large table and a "master" table listing each brand in the large table. the large product table would of course have a field to state which brand the product was from.

the efficiency would be based on users being able to access the database via html browsers using php and also search the database.

hope this makes sense

cheers

dan morton
 
whenever you say "each xxxx in its own table" you probably have a bad design

from your brief explanation i'd say you should have only one table altogether

unless brands have other data (e.g. the name of the brand manager, the sales quota for all products in that brand, brand discount amounts, etc.) in which case brands would have to be kept in a separate table from the products

rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (next course starts March 6 2005)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top