Class 2 | Week 13 | DAT601

Today's lesson pertains to more information regarding physical database design.

An index is used to speed up the performance of queries. It does this by reducing the number of database data pages that have to be visited/scanned. In SQL Server, a clustered index determines the physical order of data in a table. There can be only one clustered index per table (the clustered index IS the table).

Today we have been advised to bring headphones in order to use a lynda.com tutorial as part of our learning today.

Before this Todd has shown us a video explaining the concept of b-trees which is the system that indexes use to map references to data rows within a database, indexes can be clustered or non-clustered layout.

Image result for b-tree picture

Non-Clustered Indexes

A non-clustered index doesn’t sort the physical data inside the table. In fact, a non-clustered index is stored at one place and table data is stored in another place. This is similar to a textbook where the book content is located in one place and the index is located in another. This allows for more than one non-clustered index per table.

Clustered Index

A clustered index defines the order in which data is physically stored in a table. Table data can be sorted in only way, therefore, there can be only one clustered index per table. In SQL Server, the primary key constraint automatically creates a clustered index on that particular column.

After a couple of videos that explain the difference between clustered and non-clustered indexes to us we have been given a break and then instructed to continue on with lynda.com resources for the rest of the lesson, with Todd's help is we require.

Comments

Popular posts from this blog

Class 2 | Week 9 | DAT601

Class 2 | Week 2 | DAT601

Class 1 | Week 14 | DAT601