title: Database design : preferred field length for file paths
body: <p>I have to store file paths in a DB field (<code>/tmp/aaa/bbb</code>, <code>C:\temp\xxx\yyy</code>, etc.). I can't really tell how long they could be.</p>
  
  <p>Given this <a href="http://en.wikipedia.org/wiki/Comparison_of_file_systems" rel="noreferrer">http://en.wikipedia.org/wiki/Comparison_of_file_systems</a> and that <a href="http://msdn.microsoft.com/en-us/library/aa365247.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa365247.aspx</a>, depending on the file system there could be theoretically no length limit for a path.</p>
  
  <p>I guess that defining this field as a <code>LONGBLOB</code> or <code>VARCHAR(very high value)</code> wouldn't be wise. I've thought about something like <code>VARCHAR(1024)</code> which should be suitable for most frequent (even if not all) cases, and not too big as a DB field. What would you recommend ?</p>
  
  <p>Thanks.</p>