Best Practices for Database Design-Development-Deployment
1.1 Database Tables should be normalized. But you have to be remember that over-normalization will cause excessive joins across too many tables.
1.2 Tables name should be consistent and expressive.
1.3 Columns data type should be properly define. It is not better to store image files in tables. Instead of that keep paths or URLs. Also you don’t want to keep blob data types in select list.
1.4 Whenever you want to keep boolean value in table use bit data type.
1.5 Better to use integer data type or less character length as for keys and make index using integer data type. Use constraints (foreign key, check, not null ...) for data integrity.
1.6 Keep the tables in different file group based on its behavior (transactional table, master data keeping tables ).
1.7 Plan for table partition where large volume of transactional data will be stored.
1.8 Always try to specific number of columns rather than all column selection.
1.9 Use join rather than sub queries. It increase performance .Use ’LIKE’ whenever required.
1.10 Documentation is very much important , it should be include ER diagram ,performance guide line, database convention.
1.11 Authentication is an important part use role based authentication to all users.Security and resource availability database server and the web server must be placed in different machines. By that security and performance will be improved .
1.12 Keep passwords as encrypted for security. Decrypt them in application when required.
1.13 Keep your stored procedure encrypted at the time of deployment.
1.14 Use disaster recovery and security services like failover clustering, auto backups, replication etc.
1.15 Database source should be keep under source controls. Also make backup plan for deployment.