h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

SQL DB Structure

SQL DB Structure

  • Each table must have a primary key.
  •  In most cases it should be an IDENTITY column named ID. 
  • Normalize data to third normal form. 
  • Do not compromise on performance to reach third normal form. Sometimes, a little de-normalization results in better performance. 
  • Do not use TEXT as a data type; use the maximum allowed characters of VARCHAR instead. 
  • In VARCHAR data columns, do not default to NULL; use an empty string instead. 
  • Columns with default values should not allow NULLs. 
  • As much as possible, create stored procedures on the same database as the main tables they will be accessing.