@sinres What’s wrong with just “media types” if that’s what it is?
Correct table name for separate table with media types
Hello !
I have table knowledge_media where I have three type of media - Webinar, Podcast, Ebook. When I create record of this table I must select one of this type. I want to create other table where will I store these types and allowed file formats for the type. I don't know what is best name for this table maybe knowledge_media_type_designation? The name is a bit too long .. Is it a good idea to keep the types in a separate table? What do you think?
In my honest opinion, you should do normalization. You can research that on your own but basically is where you break down complex data structures into simpler, related tables to reduce data redundancy and improve data integrity.
The table could look something like this:
knowledge_media_types
- id (primary key)
- type (string)
- allowed_file_formats (string)
In the knowledge_media table, you can then add a foreign key knowledge_media_type_id to link the media to its type in the knowledge_media_types table.
knowledge_media
- id (primary key)
- name (string)
- file (string)
- knowledge_media_type_id (foreign key)
Then you don't need to modify the data in the knowledge_media table. Don't know what exactly you want in your columns but this is where I would start.
Please or to participate in this conversation.