This work studies the problem of 2-dimensional searching for the 3-sided range query of the form @math in both main and external memory, by considering a variety of input distributions. We present three sets of solutions each of which examines the 3-sided problem in both RAM and I O model respectively. The presented data structures are deterministic and the expectation is with respect to the input distribution.
 In this paper we settle several longstanding open problems in theory of indexability and external orthogonal range searching. In the rst part of the paper, we apply the theory of indexability to the problem of two-dimensional range searching. We show that the special case of 3-sided querying can be solved with constant redundancy and access overhead. From this, we derive indexing schemes for general 4-sided range queries that exhibit an optimal tradeo between redundancy and access overhead. In the second part of the paper, we develop dynamic external memory data structures for the two query types. Our structure for 3-sided queries occupies O(N=B) disk blocks, and it supports insertions and deletions in O(log B N) I Os and queries in O(log B N + T=B) I Os, where B is the disk block size, N is the number of points, and T is the query output size. These bounds are optimal. Our structure for general (4-sided) range searching occupies O (N=B)(log(N=B))= log log B N disk blocks and answers queries in O(log B N + T=B) I Os, which are optimal. It also supports updates in O (log B N)(log(N=B))= log log B N I Os. Center for Geometric Computing, Department of Computer Science, Duke University, Box 90129, Durham, NC 27708 0129. Supported in part by the U.S. Army Research O ce through MURI grant DAAH04 96 1 0013 and by the National Science Foundation through ESS grant EIA 9870734. Part of this work was done while visiting BRICS, Department of Computer Science, University of Aarhus, Denmark. Email: large@cs.duke.edu. yDepartment of Computer Sciences, University of Texas at Austin, Austin, TX 78712-1188. Email vsam@cs.utexas.edu zCenter for Geometric Computing, Department of Computer Science, Duke University, Box 90129, Durham, NC 27708 0129. Supported in part by the U.S. Army Research O ce through MURI grant DAAH04 96 1 0013 and by the National Science Foundation through grants CCR 9522047 and EIA 9870734. Part of this work was done while visiting BRICS, Department of Computer Science, University of Aarhus, Denmark and I.N.R.I.A., Sophia Antipolis, France. Email: jsv@cs.duke.edu. We examine I O-efficient data structures that provide indexing support for new data models. The database languages of these models include concepts from constraint programming (e.g., relational tuples are generated to conjunctions of constraints) and from object-oriented programming (e.g., objects are organized in class hierarchies). Letnbe the size of the database,cthe number of classes,Bthe page size on secondary storage, andtthe size of the output of a query: (1) Indexing by one attribute in many constraint data models is equivalent to external dynamic interval management, which is a special case of external dynamic two-dimensional range searching. We present a semi-dynamic data structure for this problem that has worst-case spaceO(n B) pages, query I O timeO(logBn+t B) andO(logBn+(logBn)2 B) amortized insert I O time. Note that, for the static version of this problem, this is the first worst-case optimal solution. (2) Indexing by one attribute and by class name in an object-oriented model, where objects are organized as a forest hierarchy of classes, is also a special case of external dynamic two-dimensional range searching. Based on this observation, we first identify a simple algorithm with good worst-case performance, query I O timeO(log2clogBn+t B), update I O timeO(log2clogBn) and spaceO((n B)log2c) pages for the class indexing problem. Using the forest structure of the class hierarchy and techniques from the constraint indexing problem, we improve its query I O time toO(logBn+t B+log2B). External 2-dimensional searching is a fundamental problem with many applications in relational, object-oriented, spatial, and temporal databases. For example, interval intersection can be reduced to 2-sided, 2-dimensional searching and indexing class hierarchies of objects to 3-sided, 2-dimensional searching. Path caching is a new technique that can be used to transform a number of time space efficient data structures for internal 2-dimensional searching (such as segment trees, interval trees, and priority search trees) into I O efficient external ones. Let n be the size of the database, B the page size, and t the output size of a query. Using path caching, we provide the first data structure with optimal I O query time @math for 2-sided, 2-dimensional searching. Furthermore, we show that path caching requires a small space overhead @math and is simple enough to admit dynamic updates in optimal @math amortized time. We also extend this data structure to handle 3-sided, 2-dimensional searching with optimal I O query-time, at the expense of slightly higher storage and update overheads.  XP-trees (external priority search trees) are simple, practical and versatile structures supporting searches on points, intervals and higher dimensional spatial objects in secondary memory. Our approach to developing external structures is to consider worst-case efficient (internal) data structures from computational geometry, here the priority search tree. With the XP-tree we succeeded in transferring the underlying principle in an appropriate way to organize secondary storage, arriving at a practically useful structure. Together with external counterparts of other structures from computational geometry, such as segment tree, interval tree, and range tree, XP-trees can be used as building blocks to construct nested tree structures directly representing sets of spatial objects in higher dimensions. Like the internal counterpart, the XP-tree supports "halfrange" queries on points in two dimensions. Although XP-trees are not fully dynamic we believe them to be useful in many applications. Regarding balanced XP-trees, O(logdn + t) external accesses in halfrange queries are guaranteed, where n is the number of points, d the degree of the XP-tree, and t the number of points within a halfrange. Mapping intervals, as one-dimensional spatial objects, into two-dimensional points in the standard way, the structure supports all interesting kinds of queries on intervals. An XP-tree also supports queries on spatial objects in more dimensions by projecting them to an interval in one dimension. Hence the XP-tree can be used as an index structure in temporal or geometric databese systems. Experimentalperformance evaluations show that halfrange queries on two-dimensional point sets as well as all types of interval and point queries on sets of intervals are supported efficiently by the structure. Searching is quite fast, when no or few objects are retrieved. Although the shape of an XP-tree degenerates when a point set representation of a set of intervals is stored, the searching behaviour is practically the same as for a corresponding balanced structure. Searching is either very fast or has a large "retrieval ratio".