0% found this document useful (0 votes)
25 views2 pages

What Are Indexes 1.look Up Tables Used To Retrieve Data Fast

Indexes are used to retrieve data from database tables more efficiently. They act as pointers to data in tables. For example, indexes of topics in a book point to specific page numbers for that topic. There are two basic types of indexes: clustered and nonclustered. Clustered indexes physically store data at the leaf level, while nonclustered indexes store pointers to the data at the leaf level. Constraints are rules applied to columns of data tables to ensure accuracy and reliability. Common constraints include NOT NULL, DEFAULT, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be specified when creating or altering tables. Views are virtual tables that do not contain data themselves but represent the result of a stored query.

Uploaded by

savita_darekar2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

What Are Indexes 1.look Up Tables Used To Retrieve Data Fast

Indexes are used to retrieve data from database tables more efficiently. They act as pointers to data in tables. For example, indexes of topics in a book point to specific page numbers for that topic. There are two basic types of indexes: clustered and nonclustered. Clustered indexes physically store data at the leaf level, while nonclustered indexes store pointers to the data at the leaf level. Constraints are rules applied to columns of data tables to ensure accuracy and reliability. Common constraints include NOT NULL, DEFAULT, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be specified when creating or altering tables. Views are virtual tables that do not contain data themselves but represent the result of a stored query.

Uploaded by

savita_darekar2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

What Are Indexes

1.Look Up Tables Used to retrieve data fast.


2.Pointer to data In the table.
3. E.g if you want to reference all pages in a book that discuss a certain topic, you first refer to
the index, which lists all topics alphabetically and are then referred to one or more specific
page numbers
4. Indexes can also be unique, similar to the UNIQUE constraint, in that the index prevents
duplicate entries in the column or combination of columns on which there's an index
Basic Types:-

Clusterd And Non Clusterd indexes.


Clusterd Index
Table Can have Single Cluseterd Index
Leaf Level :Actual Data
Null Values Not allowed
Primary Key
Stores data at physical level

Non Clusterd Index


Multiple Non clusterd INdex
Leaf level:Reference (Pointer )to A data
Null Values are allowed
Unique Key
Stores Data At logical Level

Constrains:Rules applied on the Columns of Data Table for Accuracy and reliblity.
Applied to single column
.

NOT NULL Constraint: Ensures that a column cannot have NULL value.
DEFAULT Constraint: Provides a default value for a column when none is specified.
UNIQUE Constraint: Ensures that all values in a column are different.
PRIMARY Key: Uniquely identified each rows/records in a database table.
FOREIGN Key: Uniquely identified a rows/records in any another database table.
CHECK Constraint: The CHECK constraint ensures that all values in a column satisfy certain conditions.
INDEX: Use to create and retrieve data from the database very quickly.
Constraints can be specified when a table is created with the CREATE TABLE statement or you can use ALTER
TABLE statement to create constraints even after the table is created.

Views:Virtual Tables Not contain any data its a stored query Faseter.pre compied structure.

You might also like