I'm pretty new to web development and i'm creating a local guide app. Currently, I have the following table in the database:
Organization_Id(PK) name description site category_id
- organization: entity that describes a merchant
- organization profile: page with organization's details (name, description, site, cover header_image, profile_image, detail_images)
- header_image: organizations cover image
- profile_image: organizations logo image
- detail_images: images of the organization building
An Organization has_one profile_image, has_one header_image, has_many details_images.
What is the best aproach in terms of normalization to accomplish that?
- Add one column for the profile_image and another to header_image in Organization table.
- Create one table ProfileImage, other table HeaderImage with one_to_one relationship to Organization table and eventually another DetailImage table with one_to_many relationship.
- Create an Image table to store all the images paths table with a column image_type (profile, header, details) using a one_to_many relationship.
- Other option