database design - How strict should I be with creating a separate association table? -


Say I have a table with a report_type column and I only have 2 reports Is it worth it to create a report_types table for them, and then it refers to this table with a foreign key? Or is it acceptable to store report type as a string in that column?

Things to consider: / P>

  • Can the type add?
  • Do you have the possibility of other tables which refer to report types (such as for collecting statistics or auditing)?
  • Are you likely to use these values ​​in other contexts (like GUI drop-down widgets)?
  • Do you need to associate the additional data (such as the long description) with the report type?

I know that it takes a little bit like overwork to create a table, just to hold two rows and very clearly the gods will support you if you have a column And decide to stay with the check barrier. But if you already have a bunch of code lookup tables to implement restricted sets of values, then there is also a value in stability, well.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -