IJSRSET151422 | Received: 20 July 2015 | Accepted: 05 August 2015 | July-August 2015 [(1)4: 221-226] © 2015 IJSRSET | Volume 1 | Issue 4 | Print ISSN : 2395-1990 | Online ISSN : 2394-4099 Themed Section: Engineering and Technology 221 Optimizing the Search in Hierarchical Database using Quad Tree Deepak Kumar Sharma, Sonia Vatta School of Computer Science and Engineering Bahra University Waknaghat Solan, Himachal Pradesh, India ABSTRACT This research work is done to optimize the search in hierarchal database by using Quad Tree. Quad Tree is a tree which consists of a node having 4 sub child nodes.[1] Quad Tree is used in many fields such as computer graphics to find out a desired pixel in graphics and collision detection in 3-D gaming. There are various other applications of quad tree in different fields like weather forecasting, geographical survey and study of mutation rate with a change of environment. The main focus of this work was optimizing the search for which the main areas of concentration were various searching techniques using Quad Tree and finding out the best solution. To fulfill the purpose, a new approach is designed which results in better representation of data and enhancing the speed of search. This work is done on the basis of the value of the root node. Further based on this value, the ranges of nodes at each level are calculated. The results are also included with snapshots and comparison is given between earlier and proposed techniques. Keywords: Quad Tree, Memory Management, Search, Result I. INTRODUCTION The quad tree is widely in practice in detecting collision in 2D and 3D games and pixel processing to detect image in different image resolution.[2] Many games require the use of collision detection algorithms to determine when two objects have collided, but these algorithms are often expensive operations and can greatly slow down a game.[3][4][5][6][7] As such the collision detection is very costly process in gaming . So in many games we use Quad Tree to detect collision. The Quad Tree is too used to process the polygon or images in graphics. The techniques used to process the polygons in graphics are point to point processing, edge to edge processing and region by region processing. Commonly used techniques for collision detection is spatial portioning and bit- interleaving [8][9][10][11]12]. In the research paper Quad tree: an approach of traversing and searching published in IJRITCC volume 3 issue 5 [74] the searching time of the information in database is reduce. II. METHODS AND MATERIAL A. Searching Algorithm To search an element in a quad tree, the new design technique is as follows: Steps for Searching Item SEARCHING (ROOT) 1. Put ITEM in LOC. Take RANGE = ROOT 2. Calculate range of each sub node of level i a. QLN has range 0 to RANGE/2^2*i b. BLN has range RANGE/2^2*i+1 to 2*RANGE/2^2*i. c. BRN has range 2*RANGE/2^2*i + 1 to 3*RANGE/2^2*i d. QRN has all values lies between 3*RANGE/2^2*i+1 to RANGE 3. Selection of initial node to traverse for searching 3. Selection of initial node to traverse for searching 4. i=1 If (0<ITEM< RANGE)