Decide whether to use the R-tree access method
- The data is multidimensional.
- On a given dimension, a data object spans some width. That is, it corresponds to an interval or range, not a point.
- Two-dimensional spatial objects, such as points, lines, and polygons
- Geographic mapping information, defined in terms of latitude and longitude, that includes pointlike objects, such as cities; linelike objects, such as roads and rivers; and regionlike objects, such as counties, states, and land masses
- Video or audio clips, each with a start and stop time
If you create a time range user-defined data type, you can search for overlapping clips more efficiently with an R-tree index than with a B-tree index.
- Color information that includes hue, brightness, and saturation
- Multidimensional views of standard relational quantitative data, such as age, salary, sales commission, hire date, and so on
An R-tree index works on data with only one of these properties (multidimensional points or ranges along a single dimension) but data corresponding to points on a single dimension is better indexed with a B-tree index.
Unlike other data structures, such as a grid-file and a quad-tree, the R-tree access method does not require that data values be in a known bounded area.
If you are developing a DataBlade® module that includes a user-defined data type of a multidimensional or interval nature, you might want to use the R-tree access method to index columns of this data type.
- Numerical data, such as employee IDs
- Character data, such as last names and product names
After you decide to use the R-tree access method to index a user-defined data type, you must create a new operator class. Creating a new operator class describes this process. The next section describes issues you should be aware of when you design the user-defined data type.