Vous êtes sur la page 1sur 19

NPTEL Online - IIT Bombay

file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/main.html[6/14/2012 3:12:20 PM]




Course Name Indexing and Searching
Techniques in Databases
Department of Computer Science and
Engineering
Instructor Dr. Arnab Bhattacharya

Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_1.htm[6/14/2012 3:12:20 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


The Lec t ur e Cont ai ns:
General Setting
Exact match query or Point query
Extended setting
Similarity search
Example of similarity search














Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_2.htm[6/14/2012 3:12:20 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Gener al set t i ng
Database of objects

















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_3.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Gener al set t i ng
Database of objects
Each object has dimensions

No particular database design assumed
















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_4.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Gener al set t i ng
Database of objects
Each object has dimensions

No particular database design assumed
Query is an object with the same dimensions
















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_5.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex ac t mat c h quer y or Poi nt quer y
Poi nt quer y: Given and , return all objects such that
















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_6.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex ac t mat c h quer y or Poi nt quer y
Poi nt quer y: Given and , return all objects such that

The concept of equal i t y (oper at or =) needs to be precisely defined

For ex ampl e, iff all the dimensions individually are the same,
i.e.















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_7.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex ac t mat c h quer y or Poi nt quer y
Poi nt quer y: Given and , return all objects such that

The concept of equal i t y (oper at or =) needs to be precisely defined

For ex ampl e, iff all the dimensions individually are the same,
i.e.
Equality can be defined over a subset of the dimensions as well
For ex ampl e,















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_8.htm[6/14/2012 3:12:21 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions
















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_9.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions

Di st anc e f unc t i on between two objects















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_10.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions

Di st anc e f unc t i on between two objects

If dimensions are defined, distance function can be, for example,
Euc l i dean, Manhat t an, etc.

Can be over a subset of dimensions















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_11.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions

Di st anc e f unc t i on between two objects

If dimensions are defined, distance function can be, for example,
Euc l i dean, Manhat t an, etc.

Can be over a subset of dimensions

Otherwise, can be a metric distance















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_12.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions

Di st anc e f unc t i on between two objects

If dimensions are defined, distance function can be, for example,
Euc l i dean, Manhat t an, etc.

Can be over a subset of dimensions

Otherwise, can be a metric distance

If is not a metric distance, then the problem is much harder














Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_13.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex t ended set t i ng
Database of objects
Each object has dimensions

Query is an object with the same dimensions

Di st anc e f unc t i on between two objects

If dimensions are defined, distance function can be, for example,
Euc l i dean, Manhat t an, etc.

Can be over a subset of dimensions

Otherwise, can be a metric distance

If is not a metric distance, then the problem is much harder
Poi nt quer y: Given and , return all objects such that















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_14.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Si mi l ar i t y sear c h
Range quer y: Given , , and range , return all objects such
that

















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_15.htm[6/14/2012 3:12:22 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Si mi l ar i t y sear c h
Range quer y: Given , , and range , return all objects such
that


Near est nei ghbour (k NN) quer y: Given , , and number of nearest
neighbour , return objects such that
| | = and for any
















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_16.htm[6/14/2012 3:12:23 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Si mi l ar i t y sear c h
Range quer y: Given , , and range , return all objects such
that


Near est nei ghbour (k NN) quer y: Given , , and number of nearest
neighbour , return objects such that
| | = and for any
Wi ndow quer y: Given and ranges in each dimension
, return all objects such that


















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_17.htm[6/14/2012 3:12:23 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex ampl e of si mi l ar i t y sear c h
Obj ec t Di m 1 Di m 2
3 7
3 6
5 8
9 2
4 5
is Manhat t an di st anc e.
Range sear c h:
kNN sear c h:















Objectives_template
file:///C|/Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture1/1_18.htm[6/14/2012 3:12:23 PM]
Module 1: Basics and Background
Lecture 1: Basic Database Queries


Ex ampl e of si mi l ar i t y sear c h
Obj ec t Di m 1 Di m 2 d(.,Q)
3 7 3
3 6 2
5 8 4
9 2 8
4 5
-
is Manhat t an di st anc e.
Range sear c h:
kNN sear c h:
Range sear c h answ er :
kNN sear c h answ er :

Vous aimerez peut-être aussi