Docsity

Advanced Database Systems: Indexing Techniques for Multimedia Databases - Prof. Sakti Pram, Study notes of Deductive Database Systems

Partial preview of the text

Download Advanced Database Systems: Indexing Techniques for Multimedia Databases - Prof. Sakti Pram and more Study notes Deductive Database Systems in PDF only on Docsity!

CSE 880

Advanced Database Systems

Indexing Multimedia Databases

S. Pramanik

Traditional Indexing Methods B+-tree

  • Allows direct access to a disk block contain- ing the search key.
  • M-way Balanced-Tree (Order: M)
  • Each level down the tree narrows down the search range.
  • Insert the keys:(10,5,9,100) in the order given, into a B+-tree of order 3: (Search for 10) (5,10) => (9) /
    (5) (9, 10)
     (9, 10) / | \ 

(5) (9) (10,100)

  • B+-trees are for one dimensional data.

k-D Trees continued

  • kD-tree is a space partitioning approach.
  • The k-D-tree of previous page partitions the space as follows: ^ | | | 0 (40,50) | | | (20,30) | |-------0-----| | | | | 0(10,25) | (45,20) | | |--0-- 0------------------->
  • In disk-based approach sparse grid in high dimension.
  • More efficient disk-based space partitioning have been developed.

R-trees

  • M-way balanced tree (suitable for disk)
  • Data partitioning; Minimum Bounding hyper- Rectangle (MBR).
  • Most successful for low dimensional databases.
  • May follow more than one path for search.
  • Better performance for less overlapping MBR’s.
  • Two important algorithms:
    • Insert: inserts an object into R-tree.
    • Split: A node is split when overflowing (just like B-tree).

Example

A B C D E F

P1 P2P G H

F

E D

C

G

B-----||-----B1 ||

| A1------ |

P

P

P

H

A

  • P1, P2, P3 describes the MBR’s
  • How many accesses to search for G?
  • How many accesses to search for E?
  • Insert A1 and B1 near A and B, respectively.

Applications

  • Range search for traditional database appli- cations: - Get all employees with ages between 40 and 60 and salary between 20K and 30K.. - get all lakes in the map with x-coordinate from x1-x2 and y-coordinate y1-y2. - These are 2-dimensional examples.

Nearest Neighbor Search for multimedia applications

  • Feature vectors are points in space.
  • Nearest neighbors search:
    • k-nearest neighbors Get first 5 similar images to the query im- age. ∗ i.e., find those 5 points in space that are closest to the query point.
    • Nearest neighbor within a range. Get all images that are within a distance of 10. ∗ i.e., find all those points in space that are within a distance of 10 from the query point.

k-Nearest Neighbor Search Algorithm for R-tree

  • Query point is searched in R-tree for the most appropriate leaf node.
  • Initial k-nearest neighbors are picked from this leaf node.
  • Minimum bounding candidate set hypersphere (MBC) for the query is formed.
  • Using the parent node all twin nodes are checked for intersection.
  • Both the k-nearest neighbor set and the MBC are refined.
  • Tree is traversed upwards, and downwards while refining the MBC until there is no more intersecting MBR’s.