I am learning about database design and I'm writing a Java GUI program with a back-end database. The main table in my database stores a different product in each row. I have some columns such as: product_id (PK), price, stock_quantity, etc. I also have eight columns that store the names of the file names for that product's images: img_file_1, img_file_2 ... img_file_8. The Java program uses those file names to find the images to display on the screen for that product.
Is this poor design? Should I be storing these file names in their own table, and adding a foreign key to that table in my main table?
The program works fine as is, but I want to make sure I am learning good habits.