G-trees Region identifier: string of bits built as follows

Slides:



Advertisements
Similar presentations
Nearest Neighbor Search
Advertisements

Spatial Indexing SAMs. Spatial Indexing Point Access Methods can index only points. What about regions? Z-ordering and quadtrees Use the transformation.
Line Segment Intersection. Balanced binary search tree Internal nodes: Rightmost leaf in its left subtree Status Structure T.
Greedy Algorithms Greed is good. (Some of the time)
B+-Trees (PART 1) What is a B+ tree? Why B+ trees? Searching a B+ tree
Multidimensional Data. Many applications of databases are "geographic" = 2­dimensional data. Others involve large numbers of dimensions. Example: data.
Indexes. Primary Indexes Dense Indexes Pointer to every record of a sequential file, (ordered by search key). Can make sense because records may be much.
COMP 451/651 Indexes Chapter 1.
2-dimensional indexing structure
Multiple-key indexes Index on one attribute provides pointer to an index on the other. If V is a value of the first attribute, then the index we reach.
1 Identifying and sorting jordan sequences. 2 Jordan curve Jordan curve in the plane: A continous curve that does not intersect itself
B + Trees Dale-Marie Wilson, Ph.D.. B + Trees Search Tree Used to guide search for a record, given the value of one of its fields Two types of Nodes Internal.
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
Spatial Indexing I Point Access Methods.
1 B-Trees Disk Storage What is a multiway tree? What is a B-tree? Why B-trees? Comparing B-trees and AVL-trees Searching a B-tree Insertion in a B-tree.
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
B+ - Tree & B - Tree By Phi Thong Ho.
R-Trees 2-dimensional indexing structure. R-trees 2-dimensional version of the B-tree: B-tree of maximum degree 8; degree between 3 and 8 Internal nodes.
B-Trees and B+-Trees Disk Storage What is a multiway tree?
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
1 Multiway trees & B trees & 2_4 trees Go&Ta Chap 10.
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
B+ Trees COMP
COSC 2007 Data Structures II Chapter 15 External Methods.
12.1 Chapter 12: Indexing and Hashing Spring 2009 Sections , , Problems , 12.7, 12.8, 12.13, 12.15,
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Spring 2003 ECE569 Lecture 05.1 ECE 569 Database System Engineering Spring 2003 Yanyong Zhang
1 Algorithms CSCI 235, Fall 2015 Lecture 22 Binary Search Trees.
Spatial Indexing Techniques Introduction to Spatial Computing CSE 5ISC Some slides adapted from Spatial Databases: A Tour by Shashi Shekhar Prentice Hall.
Indexing and B+-Trees By Kenneth Cheung CS 157B TR 07:30-08:45 Professor Lee.
Computing & Information Sciences Kansas State University Monday, 31 Mar 2008CIS 560: Database System Concepts Lecture 25 of 42 Monday, 31 March 2008 William.
B+-Tree Deletion Underflow conditions B+ tree Deletion Algorithm
Jun-Ki Min. Slide  Such a multi-level index is a form of search tr ee ◦ However, insertion and deletion of new index entrie s is a severe problem.
By N.Gopinath AP/CSE.  A decision tree is a flowchart-like tree structure, where each internal node (nonleaf node) denotes a test on an attribute, each.
Multidimensional Access Structures COMP3017 Advanced Databases Dr Nicholas Gibbins –
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CS422 Principles of Database Systems Indexes Chengyu Sun California State University, Los Angeles.
CS422 Principles of Database Systems Indexes
Generic Trees—Trie, Compressed Trie, Suffix Trie (with Analysi
Indexing Structures for Files and Physical Database Design
Multiway Search Trees Data may not fit into main memory
Multidimensional Access Structures
Data Structures Binary Trees 1.
Chapter 25: Advanced Data Types and New Applications
Spatial Indexing I Point Access Methods.
B+-Trees.
Hashing CENG 351.
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
CMPS 3130/6130 Computational Geometry Spring 2017
KD Tree A binary search tree where every node is a
Orthogonal Range Searching and Kd-Trees
CMSC 341 Lecture 10 B-Trees Based on slides from Dr. Katherine Gibson.
Wednesday, April 18, 2018 Announcements… For Today…
Quadtrees 1.
B- Trees D. Frey with apologies to Tom Anastasio
B- Trees D. Frey with apologies to Tom Anastasio
Random inserting into a B+ Tree
Multiway Trees Searching and B-Trees Advanced Tree Structures
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
2-3-4 Trees Red-Black Trees
Mainly from Chapter 7 Adam Drozdek
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
B- Trees D. Frey with apologies to Tom Anastasio
Database Design and Programming
File Processing : Multi-dimensional Index
Multiway Search Tree (MST)
m-Way Search Trees A m-way Search tree of degree ‘m’ can have
Algorithms CSCI 235, Spring 2019 Lecture 31 Huffman Codes
Analysis of Algorithms CS 477/677
Presentation transcript:

G-trees Region identifier: string of bits built as follows Max number or records in a block: 2 Half partitioning of a region R0: 0 < x <= 0.5 R1: 0.5 < x <= 1 Region identifier: string of bits built as follows -Initial region is identified by empty string -Region R0: 0 < x <= 0.5 identified by 0 - Region R1: 0.5 < x <= 1 identified by 1 - When a region is divided add 0 or 1 to its identifier (add 0 if the region has lower values and 1 if the region has greater values)

RegionOf(S): S=00 corresponds to the region {(0;0.5), (0;0.5)} S=011 corresponds to the region {(0,25;0.5), (0,5;1)} Strings are stored into a B+-tree (G-tree) Use prefix as ordering relation For each leaf (S,P), S is the code of a region whose objects are store into the block reachable by P Search of an object P=(x1, y1) . Let M the maximum length of strings of regions. Find the string Sp of the region that contains P, using M bits. Search Sp in the tree (as usual) from the root to the leaf. Sp or a prefix of Sp is in the leaf . Tranfer the corresponding block

Search Sp : leaf N2 is reached. Example: P=(0.3; 0.6) M=4 Sp=0110 Search Sp : leaf N2 is reached. Get the block associated to the prefix 011 of Sp. P does not belong to the block. P is not in the database. P Properties: Let T be a region whose code is S=s1…sn, T has been obtained by a partition of the region whose code is S’=s1…sn-1 (it is S’<S) The length of a code of a region T denotes the number of partitions needed to obtain T

Search of points in a Region R Let P1 the leftmost lowest point of R Let P2 the rightmost highest point of R Search P1 in the tree. Assume leaf N1 is returned Search P2 in the tree. Assume leaf N2 is returned For each leaf between N1 and N2, for each string, generate its region R’, for regions which overlap with R Find point in the corresponding blocks R= { (0.3; 0.4) (0.2; 0.6)} M=4 P1= (0.3, 0.2) SP1=0010 P2 = (0.4, 0.6) SP2=0110 P1: Leaf N1 P2: Leaf N2 R1= { (0; 0.5) (0; 0.5)} R3= { (0; 0.25) (0.75; 1)} R2= { (0; 0.25) (0.5; 0.75)} R4= { (0.25; 0.5) (0.5; 1)} Intersection betewen R and R1 not empty Intersection betewen R and R4 not empty Block tranfer

Insert P Let Sp the code of P Search Sp in the tree from the root to the leaf. If P is not in the tree and there is space in the block of the region, insert P otherwise split R into two subregions: R1: with SR1 = SR 0 and SR2=SR 1 Distribute the points of R +P in the two sub-regions according to codes. Substitute SR by SR1 and SR2. Propagate updates upwards (if needed), similar to B+-tree

Insert P Let Sp the code of P Search Sp in the tree from the root to the leaf. If P is not in the tree and there is space in the block of the region, insert P otherwise split R into two subregions: R1: with SR1 = SR 0 and SR2=SR 1 Distribute the points of R +P in the two sub-regions according to codes. Substitute SR by SR1 and SR2. Propagate updates upwards (if needed), similar to B+-tree

Esercizio Build the Region Quadtree of the following raster data.

Esercizio Build the PointRegion quadtree (PR quadtree) of the region below. Assume maximum number of points set to 2

Esercizio Build the k-d tree of the region below. Assume maximum number of points set to 2

Rectangular-trees (R-trees) m=4 Esercizio Rectangular-trees (R-trees) m=4

Search rectangles that overlap R (the red rectangle in the figure)

Insert R9 R9 R1,R9 / R2,R3