Since your work is related to the Play Store, Género
are "categories" of the store and these values are already stored in the database.
If the answer is yes, there is a problem of "many to many" and not just of "1 for many".
For a database to comply with the 1st Normal Form all table column values must be atomic in order to avoid data redundancy.
As such, the solution used for this problem involves the creation of an intermediate table to store the relationship between the two entities which assumes that the Categorias
are previously defined would be something similar to this:
+---------+ +---------------------+ +-----------+
| EXEMPLO | | EXEMPLO_CATEGORIA | | CATEGORIA |
+---------+ 1 * +---------------------+ 1 +-----------+
|- ID [PK]|---------|- Exemplo [PK, FK] | +---|- ID [PK] |
|- TITULO | |- Categoria [PK, FK] |----+ |- Nome |
| | | | * | |
| | | | | |
+---------+ +---------------------+ +-----------+
Either way I recommend reading the question What is database normalization? to get an idea of what the normal forms of a relational database and the best practices related to them are.
What would be the category type? varchar?
– Leonardo Furtado
@Leonardofurtado in this example
varchar
, multivariate columns are evidas pq are complicated to search also need extra manipulation to update or validate the value.– rray