seeking advice on database design
Posted: Mon Oct 16, 2006 4:16 pm
hello folk
i am building a website application that allows users to navigate through a list of motorbikes (new and used) as well as quad-bikes, and then accessories for bikers. each of these can be further defined into a make/brand (ie: suzuki, yahama, ducati), and each specific entity is associated to an image (large as well as thumbnail).
here are my thoughts on the database schema. your feedback would be appreciated.
table1: images (used to store all images, large as well as thumbnails)
attributes: image_id, image_name, image_size, image_type, image_blob
table2: brands (used to store list of makes, such as ducati and suzuki)
attributes: brand_id, brand_name, image_id (the id corresponds to an image in the image table of the brand's logo)
table3: categories (ie: new bike, used bike, quad bike, accessory)
attributes: category_id, category_name
table4: products (the heart of the database)
attributes: product_id, product_name, product_description, product_category_id (so i know which category product falls into), product_image_id (its corresponding picture), product_brand_id (its brand), product_price
ok is this a good or bad schema? and what's the best practise on handling thumbnails as well as full sized images?
please bear in mind that i have to design the content management side too for the administrator to take over the running of the site.
thanks a bunch
i am building a website application that allows users to navigate through a list of motorbikes (new and used) as well as quad-bikes, and then accessories for bikers. each of these can be further defined into a make/brand (ie: suzuki, yahama, ducati), and each specific entity is associated to an image (large as well as thumbnail).
here are my thoughts on the database schema. your feedback would be appreciated.
table1: images (used to store all images, large as well as thumbnails)
attributes: image_id, image_name, image_size, image_type, image_blob
table2: brands (used to store list of makes, such as ducati and suzuki)
attributes: brand_id, brand_name, image_id (the id corresponds to an image in the image table of the brand's logo)
table3: categories (ie: new bike, used bike, quad bike, accessory)
attributes: category_id, category_name
table4: products (the heart of the database)
attributes: product_id, product_name, product_description, product_category_id (so i know which category product falls into), product_image_id (its corresponding picture), product_brand_id (its brand), product_price
ok is this a good or bad schema? and what's the best practise on handling thumbnails as well as full sized images?
please bear in mind that i have to design the content management side too for the administrator to take over the running of the site.
thanks a bunch