Reputation
311
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 3
Newest
 Editor
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 1 vote cast
Jul
21
comment PHP mysql checking for relational equivalence
Regardless of how you store it in the DB though, I think you have a good solution with the constants.
Jul
21
comment PHP mysql checking for relational equivalence
Yes, you're right, it requires an Alter Table statement to add new values and it theoretically could be much more expensive than adding a value to the lookup table. But you need to weigh the size and eventual complexity of the table against the skill and discipline of the programmers. It's one of those areas that there might not be a one size fits all solution. For me it was the one to one relationship that said "enum" (not to mention the data that is unlikely to be modified by the end user) If there is the possibility of needing multiple roles per user in the future then stick with the table.
Jul
21
revised PHP mysql checking for relational equivalence
added 53 characters in body
Jul
21
answered PHP mysql checking for relational equivalence
Jul
21
awarded  Editor
Jul
21
revised Less PHP request to REST API
deleted 12 characters in body
Jul
21
answered Less PHP request to REST API
Jun
21
answered At which point using string-based enums can become a real problem?
Jul
17
awarded  Yearling
Aug
6
awarded  Supporter
Jul
14
answered How to protect intellectual property when oursourcing software development?
Jul
12
awarded  Teacher
Jul
12
answered How to save a young and dying project?