?
Solved

10777: Designing a Data Warehouse: Dimension table indexes:

Posted on 2014-11-05
3
Medium Priority
?
277 Views
Last Modified: 2014-11-06
Hi experts:

i am reading about Dimension table indexes, but i do not understand
1. Create a nonclustered primary key index
2. Create a clustered business key index

I can show you an example of each
0
Comment
Question by:enrique_aeo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40425113
Please do.
0
 

Author Comment

by:enrique_aeo
ID: 40425141
The code if it is,
I do not understand is the concept, which means that the difference.
When to use one or the other?
0
 
LVL 3

Accepted Solution

by:
smilieface earned 2000 total points
ID: 40425336
The difference between non-clustered and clustered indexes is well documented elsewhere. However in brief the answers to this might be:

A Primary Key is unique, and for something like a data warehouse dimension table where you have "generational" data (changes to the record are written as a new record, and the old record is retained) we often see a "surrogate key" used. The "natural" keys (such as Customer Id will be repeated on generations of data

The clustered index doesn't have to be unique, but defines where the data is stored, as it is a sorted index. This will mean that other strategies, such as storing all the data updated on a specific date together, can be explored. This would enable faster reporting if the report is based on dates.

Essentially, the clustered index is the one you WANT to use for data retrieval. The Primary Key is just a Unique index.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question