Is it a good practice to create a table to record all the images in a database, or can I create the columns that save the image information for each specific need?
For example, let's suppose I want to create a table for categories of a website and each category of the table has an image.
tlb_category
- id
- title
- img_name
- img_ext
- date_created
- date_updated
- status
or is this more correct?
tlb_category
- id
- title
- img_id
- date_created
- date_updated
- status
tbl_image
- id
- img_name
- img_ext
- date_created
- date_updated
- status
Which is better for good practice? Do you have any other suggestions? The second form seems more correct, but it is normal to have several images of categories, products, user avatars, etc ... All mixed in a table?