Hi,
I new in database design:
I have question with my own few solution,what do you thinks?:
Which tables should be created for all kinds files (images, attached email files,text files for store email body, etc..) that stored in my online store?
*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 1 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**
}
Thanks you,
Yosef