Indexes Flashcards

1
Q

What is Indexing?

A

A data structure technique which allows you to quickly retrieve records from a database file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Index?

A

A small table consisting of two columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the first column in an index?

A

A copy of the primary or candidate key of a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the second column in an index?

A

A set of pointers for holding the address of the disk block where that specific key value stored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two main types of indexing methods?

A
  • Primary Indexing

- Secondary Indexing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a primary index?

A

An ordered file which is fixed length size with two fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 2 types of primary indexes?

A
  • Dense Index

- Sparse Index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a dense index?

A

A record is created for every search key valued in the database

Method records contain search key value and points to the real record on the disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the advantage and disadvantage of dense indexing?

A

+ Helps you to search faster

  • Needs more space to store index records
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a sparse index?

A

A record that appears for only some of the values in the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does sparse Indexing work?

A

A range of index columns stores the same data block address, and when data needs to be retrieved, the block address will be fetched

How well did you know this?
1
Not at all
2
3
4
5
Perfectly