SQL Server Relationships and Indexes through Database Diagrams

Posted by Elliott Nash | Filed under , , , , ,

The Importance of SQL Indexes and Database Relationships

A great way to help manage your database indexes and database relationships in MS SQL Server databases is to keep a database diagram up to date. The larger you database the more important optimisation becomes. Remember its alot easier to get things right the first time round than having to go back and refactor problematic code or procedures. Sometimes you can acheive large performance increases by adding required database indexes, but be careful as adding incorrect indexes can have a negative effect on performance.

When connected through Management Studio, expand the Databases list and then expand the database you wish to work on. Right-click Database Diagrams and select New Database Diagram.

An index is basically a sorted list of key values associated with the physical address of the rows that match these key values.

Add your tables to the blank canvas, you now need to add-in the database relationships of all primary and foreign key columns in your tables. More...