R-Trees คืออะไร
R-Trees ใช้จัดเก็บ Spatial Data Indexes อย่างมีประสิทธิภาพ เหมาะสำหรับ Spatial Queries และ Storage ใช้ใน:
- Indexing ข้อมูลหลายมิติ (Multidimensional)
- จัดการข้อมูลเกม (Game Data)
- เก็บพิกัดภูมิศาสตร์ (Geospatial Coordinates)
- Virtual Maps Implementation
ตัวอย่าง R-Tree

R-Tree ที่สอดคล้อง:

คุณสมบัติ R-Trees
- ประกอบด้วย Single Root, Internal Nodes, Leaf Nodes
- Root ชี้ไปยัง Region ใหญ่สุดใน Spatial Domain
- Parent Nodes เก็บ Child Nodes ที่ Overlap Region ของ Parent สมบูรณ์
- Leaf Nodes เก็บข้อมูล MBR ของ Object
- MBR (Minimum Bounding Region) = กล่องขอบเขตขั้นต่ำที่ครอบคลุม Region
เปรียบเทียบกับ Quad-Trees
| Quad Tree | R-Tree |
|---|---|
| ต้องการ Tiling Level Optimization | ไม่ต้องการ Optimization |
| สร้างบน B-Tree ได้ | ไม่ทำตามโครงสร้าง B-Tree |
| Spatial Index สร้างเร็ว | Spatial Index สร้างช้ากว่า |
| Nearest Neighbor ช้า, Window Query เร็ว | Nearest Neighbor เร็ว, Window Query ช้า |