title: How do you handle descriptive database table names and their effect on foreign key names?
body: <p>I am working on a database schema, and am trying to make some decisions about table names. I like at least somewhat descriptive names, but then when I use suggested foreign key naming conventions, the result seems to get ridiculous. Consider this example:</p>
  
  <p>Suppose I have table </p>
  
  <pre><code>session_subject_mark_item_info
  </code></pre>
  
  <p>And it has a foreign key that references </p>
  
  <pre><code>sessionSubjectID
  </code></pre>
  
  <p>in the </p>
  
  <pre><code>session_subjects 
  </code></pre>
  
  <p>table. </p>
  
  <p>Now when I create the foreign key name based on fk_[referencing_table]__[referenced_table]_[field_name] I end up with this maddness:</p>
  
  <pre><code>fk_session_subject_mark_item_info__session_subjects_sessionSubjectID
  </code></pre>
  
  <p><strong>Would this type of a foreign key name cause me problems down the road, or is it quite common to see this?</strong></p>
  
  <p><strong>Also, how do the more experienced database designers out there handle the conflict between descriptive naming for readability vs. the long names that result?</strong></p>
  
  <p>I am using MySQL and MySQL Workbench if that makes any difference.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Received the answers I needed below, but I wanted to mention that after some testing, I discovered that MySQL does have a limit on how long the FK name can be. So using the naming convention I mentioned, and descriptive table names, meant that in two instances in my db I had to shorten the names to avoid the MySQL 1059 error </p>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html#error_er_too_long_ident" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html#error_er_too_long_ident</a></p>