Thank you @frezno I will definitely try to work out what I might need in the future, and try and break it down into relevant tables.
@Snapey I'll take a look at the Spatie manager. I thought about the multiple rows, and was initially going to go with that route, but wanted to see if it was good practice from experienced developers perspective.
Thank you, @bobbybouwmann, I'll take a look at see if it helps.
@frezno, thank you! I was thinking of doing it more that way, but I was trying to condense the amount of fields in a table, and the amount of tables, if possible. I've updated my original post with an image of the types of fields I would be using/
Hello, I'm looking for assistance on how to layout tables for products that will have lots of fields.
I was thinking, 3 tables... A product table, a specifications table, and an images table.
Product table would have columns names of: id, name, price.. etc Spec table: id, product_id, spec_name(eg. Seats), spec_value(eg. 5) Image table: id, product_id, img_name(eg. banner_1), img_url(eg. /img/myimg.jpg)
There are about 18 Specifications per product. And about 4 image types(banner, product etc), with about 5-10 images for each.
I'm quite new to database design, and don't really know the best way to store a lot of data for products without creating a table with about 30 columns in it.