Database Calls and Structure
- RULE
- Use all CAPITAL LETTERS for Common SQL commands. Ex: “SELECT Member_ID FROM Members WHERE…”
- RATIONAL: Allows for increased SQL statement readability
- RULE
- Avoid “SELECT *” statements. Use “SELECT field1, field2, field3…”
- RATIONAL: Allows for increased SQL statement readability and cuts down on transfer of unneeded data
- RULE
- Normalize tables where possible
- RATIONAL: Increases the speed of data processing
- RULE
- Index columns that will be updated regularly and have a variety of options. Ex: Index a Rank Column, but not a Gender Column.
- RATIONAL: Increases the speed of data processing and readability of table data
- RULE
- Minimize the use of not equal operations, <> or !=. SQL Server has to scan a table or index to find all values to see if they are not equal to the value given in the expression. Try rephrasing the expression using ranges: WHERE KeyColumn < 'TestValue' AND KeyColumn > 'TestValue'
- RATIONAL: Increases the speed of data processing