Answer the question
In order to leave comments, you need to log in
Data categorization. How to do it wisely?
now there is a table in the downloads database, it has a type column
, let's say file|image|mp3
on the page where it is displayed there is a filter, when selected, this column is filtered
Now the task has changed and you need to add an
image
-png
-jpg
-gif type nesting,
so I thought to take it out into a separate table types and store all the information there,
but before doing it, I decided to ask
, I know that almost all CMS use taxonomy for this,
can I also use this approach for my task? or how?
Answer the question
In order to leave comments, you need to log in
Guided by the KISS principle , maybe just start writing through the “ category.type ” separator:
Is this field in your table of the ENUM type?
As I understand it, you can simply do a like request for ".jpg" for example. And according to the mind, the table should be:
id | filename | file_type
where file_type will already have numbers that will mean "mp3","jpeg",'gif' and everything else
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question