Geometrical Objects and Indexes Are Still Stored in the File System
Total Page:16
File Type:pdf, Size:1020Kb
Spatial Database System Prostorové databázové systémy Jiří Horák 2nd part – Spatial databases v. 2021 Literature • Aitkinson A. (2009): Beginning Spatial with MS SQL 2008. Apress. ISBN 978-1-4302- 1830-2. 425 pages. • Bělka L: Možnosti využití databáze pro uložení ortofotosnímků. Seminární práce. • Ďuráková D: Lecture7-8.PDF, GIS - Spatial SQL. • Kaufmann, San Francisco, 2002. ISBN 1-55860-588-6. 410 pages. • Lacko L. (2002): Oracle. Správa, programování a použití databázového systému. ComputerPress. ISBN 80-7226-699-3 • Manolopoulos Y., Papadopoulos, Vassilakopoulos M.: Spatial Databases: Technologies, Techniques, Trends. Idea Group Publishing. 340 stran, Hershey, 2005. ISBN 1-59140-387-1. • Nabil R.A., Gangopadhyay A. (1997): Database Issues in Geographical Information Systems. Kluwer. • Nabil R.A., Gangopadhyay Aryya (1998): Database Issues in Geographic Information Systems. Kluwer, 2.vydání, 1998. • Pokorný, J.: Prostorové datové struktury. Sborník konference GIS’98, Ostrava, 1998. • Pokorný J.: Prostorové datové struktury a jejich použití. GIS Ostrava 2000. • Pokorný J.: Prostorové objekty a SQL. GIS Ostrava 2001. • Rigaux P., Scholl M., Voisard A. (2002): Spatial Databases with Application to GIS. Literature 2 • Samet H. (1989): The Design and Analysis of Spatial Data Structures. Addison- Wesley Publishing Company. ISBN 0-201-50255-0. 493 pp. • Samet H. (1990): Application of Spatial Data Structures: computer graphics, image processing and GIS. Addison-Wesley Publishing Company. ISBN 0-201-50300-X. 507 pp. • Sandbox1: http://wp.soulwasted.net/msz/pdb/prostorove-databaze-problemy- indexace-bodu-v-prostoru-algoritmy-stromove-hasovaci-kombinovane • Šarmanová skripta INS.PDF • Troch, J.: http://jt.sf.cz • wiki 1: http://cs.wikipedia.org/wiki/Prostorov%C3%A1_datab%C3%A1ze • http://www.geo.unizh.ch/oai/spatialdb/folien/ogcsf.pdf: Daniel Wirz, Department of Geography - GIS Division, University of Zurich [email protected], January 2004, OGC Simple Features (for SQL and XML/GML). • Yeung A., Hall G. (2007): Spatial Database Systems. Desing, Implementation and Project Management. Springer, Dordrecht, 2007. ISBN 10-1-4020-5393-2. 553 pages. • Žemlička: http://www.ksi.mff.cuni.cz/~zemlicka/vyuka/OZD/spatial/TitlePage.html Introduction • Gütting (1994): spatial database system is the class of DBS which satisfies 3 basic features: – Fulfil common properties of DBS – Offer spatial data types (SDT) in the database model and in the query language – Support implementation of spatial data types using spatial indexing (minimal requirement) and highly performing algorithms for spatial join. • spatial database system: – Satisfies requirements for standard database system , – Offers extended functions enabling to perform tasks specific for spatial data. • Use various methods for overlaying and combining of features which utilize their location and topology. • Spatial dbs do not replace SW for GIS but only facilitate part of functions specific for GIS. • Current spatial DBS still more in the form of spatial data warehouses • Their goal – to provide users (GIS) appropriate data in time and space (including temporal consistency, appropriate aggregation etc.) • Features in reality are subjects of changes where the time of completing changes are so long that overcross usual response time and that is why we need to perform it as long transactions to assure consistency of database • The goal of spatial data modelling in db (Pokorný): – Enable to deal appropriate way with neighbourhood of spatial objects and its connectivity. • Emphasizes topological properties required for data processing. Proprietary data formats and structures • ESRI shapefile: – SHP - for geometry – DBF – storage of attribute (lexical) data – SHX – indexation – SBN and SBX – spatial indexation – FBN and FBX - spatial indexation, only for reading – PRJ – coordinate system – AIN a AIH - attribute indexation – IXS, MXS – geocoding – SHP.XML - metadata in XML – CPG – code page specification for DBF Proprietary data structures • We can imagine it as relational table • Not always are useful for user requirements • Suitable data structure - enables effectively evaluate spatial queries (i.e. query for the polygon area, query for the intersection of 2 regions, search the nearest neighbour of the object etc.) • Structures in relational tables enable to deal with topological relationships but not easy way. • Suitable to use other, auxiliary structures which directly represents topological relationships and real spatial objects represent a second layer. • Spatial indexation, Spatial data structures (SDS) • Spatial indexation can be applied for both vector and raster data • spatial indexation is not enough to solve (evaluation) all spatial queries. • We need in queries also lexical data (attributes), providing alphanumerical and temporal values, or modelling various relationships. Such data can be easily represented by i.e. relational tables with explicit link to spatial objects using ID. • Necessity of integrated querying to combine both type of data Spatial indexation • We cannot use directly common indexation methods known from usual databases. • I.e. B-tree, which is suitable for primary key indexation, or any other attribute, is not sufficient for spatial data because of its multidimensionality. • If we use directly some multidimensional spatial data structure like multidimensional grid or multidimensional B-trees, we reach the multidimensional spaces, nevertheless we do not cross the fact that this methods were proposed for multidimensional queries and not spatial queries. • The problem of sequential ordering – it is not simultaneous (coincident) ordering. • Spatial queries (such as a query to i.e. the nearest neighbour or intersection of objects) are evaluated by multidimensional variants of classic methods quite ineffective or non-evaluated. • Another problem – these methods were designed for a point data but not always spatial objects can be represented by points. Spatial data structures • Each data structure for a large data set has to be effectively transformed into memory pages. • Different spatial data structures are suitable for different types of spatial queries. • It is useful to measure not only spatial requirements for SDS but also complexity of each operation (INSERT, DELETE, UPDATE) because they are usually implemented by quite a lot complicated algorithms. Various versions of these algorithms enable to create new independent SDSs. • Further question – how dynamic are applications for the given SDS? Are suitable for frequent update operations or more effective for a velocity of evaluation of a spatial query? • Independent operation is the initial building of the structure from the set of data (BUILD operation). Operation with SQL • Manipulation operations – insert – delete – update – modification of the object shape, attribute update etc. • Selection (of objects): – graphical (show me ...) – attributed – Spatial query (for region etc.) – topological operators TOUCHES, WITHIN .. • Creating new objects using operation : – UNION – INTERSECTION – DIFFERENCE – And other specific spatial (BUFFER, CONVEXHULL etc.) • geometrical attribute = attribute contains a geometry • Spatial relation = relation including a geometrical attribute • Spatial relations have other properties than conventional relations because they address mainly topological and metric relationships of concerned objects. Generation of GIS development according to Pokorný according to Pokorný • 1st generation – Spatial objects, their attributes and indexes are stored in files. – Spatial queries are available, but no on-line links to other db data (necessary to transform data from db into proprietary files using export/import). • 2nd generation – Attribute data as well as another application data are stored in a relational database – Geometrical objects and indexes are still stored in the file system. – Integration of spatial data and other data are indirect. It is possible to make queries to spatial objects and to data connected with these objects. But the access is limited to requirements which can be easily decomposed into geometrical and lexical components. – Queries cannot be globally optimised. • 3rd generation – They are controlled dominantly from a database side not from a GIS side. – Spatial data types and relevant operations and functions are integrated into a relational DBMS. – Various implementations; more advanced ones are represented by modules linked with object-relational DBMS (ORDBMS) Generation of GIS development by Yeung, Hall According to Yeung, Hall • 1st generation (to middle of 90) – Usage of specialised SWs for GIS with specific APIs and also proprietary data storage in specific file formats • 2nd generation(to end of 90) – Increase utilisation of RDBMS in GIS – typical attribute data are stored in relational database while geometrical parts are still stored in proprietary files. – GIS uses standard SQL queries for communication with DBS. – Spatial data processing is performed only in GIS. • 3rd generation (since the end of 90) – Spatial data is stored in ORDBMS including part of spatial functions. – Except of using classic GIS engines there are new spatial applications which do not use any special SW for GIS but they offer only basic spatial functions available in a current DBMS. – Role of GIS – mainly data collection, graphical data editing, analysis, synthesis and modelling, cartography and visualisation – Role of OODBMS – mainly data storage, its management, spatial indexing, data