06 Indexing Flashcards

1
Q

files organisation

A
  • 1 database contains 1 or more tables
  • 1 table contains 1 or more tuples
  • 1 file contains 1 or more data pages
  • given query, DBMS figures how to enable efficient access to desired data pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

3 methods of organisation

A
  1. heap files
    - random order
    - scan all records
  2. sorted files
    - good for order sensitive data retrieval and range search
  3. indexes
    - additional data structure to optimise retrievals
    - speed up search
    - fast update
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is indexing

A
  • goal: fast
  • data structure to organise and optimise files
  • use specific search keys for each tuple
  • data entry recorded in index file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

types of index data structure

A
  1. hashing
    - collection of buckets containing data entries
    - buckets have size limits
    - each bucket contains key, eg. key: lastname = “smith”
    - equality search
  2. tree
    - equality and range search
    - hierarchy structure
    - B+ tree most popular
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

B+ tree

A
  • all data is in the leaf node
  • leaves are all on the same level (balanced)
  • leaves are all linked
  • min 50% occupancy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly