Hi
I new in database design.
I have a question with my own few solution, what do you think?
Which tables should be created for all the kinds files that stored in my online store (images, attached email files, text files for store email body, etc.) ?
option 1: use seperate table for files types
files{
id
files_types_id FK
file_path
file_extension
}
files_types
id
type_name (unique)
}
option 2: use bool field for each file type
files{
id
file_path
file_extension
is_image_main
is_image_icon
is_image_logo
is_pdf_file
is_text_file
}
option 3: use one ENUM field 'file_type' for each file type
files{
id
file_path
file_extension
file_type (image_main,image_icon,image_logo,image_main,pdf,text) **enum**
}
Thank you, Yosef