Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I like this idea and is very similar to an approach I was already trying out (foreign key for Store and Website in the option table). I am using Enum for fieldtype (String, int, select list etc) so having one for the actual name is a great idea. My only concern at this point is mapping a number to field name when writing raw SQL queries but this isn't a huge issue. Commented Oct 23, 2014 at 9:58
  • this normally depends on how your DBMS handles enums, In mysql's case, you can use the word itself you defined in the enum field(the database converts it to int for you on the fly) when running queries, helps alleviate the usage of lookup tables and magic numbers Commented Oct 23, 2014 at 12:08