Composite Search Keys
•Composite Search Keys: Search on a combination of fields.
–Equality query: Every field value is equal to a constant value. E.g. wrt <sal,age> index:
•age=20 and sal =75
–Range query: Some field value is not a constant. E.g.:
•age =20; or age=20 and sal > 10
•
sue
13
75
bob
cal
joe
12
10
20
80
11
12
name
age
sal
<sal, age>
<age, sal>
<age>
<sal>
12,20
12,10
11,80
13,75
20,12
10,12
75,13
80,11
11
12
12
13
10
20
75
80
Data records
sorted by name
Data entries in index
sorted by <sal,age>
Data entries
sorted by <sal>
Examples of composite key
indexes using lexicographic order.