unit 7 indexes and views. key concepts index structure clustered vs. non-clustered indexes query...
TRANSCRIPT
Key ConceptsKey Concepts• Index structure• Clustered vs. non-clustered indexes• Query optimization• Creating indexes• Selecting index columns• Index forms• Creating views• Using views• Updating through views
IndexesIndexes• Based on one or more columns.• Stored as physical database items.• When indexed table columns are updated,
indexes must also be updated.• Unique indexes are used to force
uniqueness on index columns.– Single-column index, each value must be
unique– Multiple-column index, the combined
column value for each row must be unique
Clustered and Non-Clustered and Non-Clustered IndexesClustered Indexes
• Clustered index– Table is physically sorted in index order– A table can have only one clustered index
• Non-clustered index– Logically organizes data– Does NOT change the data's physical
storage– A table can have multiple non-clustered
indexes
Index ColumnsIndex Columns• Commonly used as selection criteria• High cardinality• Enforced uniqueness• Foreign key constraints
View FundamentalsView Fundamentals• Virtual representation of one or more
tables.• Used like a table when retrieving
data.• Specify the columns available to
users or applications.• Hide secure columns from users or
applications.• Can include computed columns.