mysql - Enum in a database -


I have a feature in a table that I want to be able to update. What is the best way to implement it?

  1. To create a second table with the values ​​and "enum_id" in the second table, and when I want to add or update the en enum value, then just update the specific row Or delete or add?

    Using MISL

    < p> If the second choice is better then update your property values ​​when you update / insert new feature, Master T The id of the attribute in Lika remains the same

    If you go with the first choice and use the ENUM data type, you do You will only need to do INSERT or UPDATE on your attribute table. Alternate Table Every time you need to insert or update your attributes, and you need to enter each ENUM The value must be UPDATE in the main table.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -