60 likes | 78 Views
Which are Spatial Data?. Names email address NASA satellites imagery Weather and Climate Data SSN Medical Imaging NASA satellites imagery - terabytes of data per day Exercise: Identify spatial and non-spatial data items in A phone book A cookbook with recipes.
E N D
Which are Spatial Data? • Names • email address • NASA satellites imagery • Weather and Climate Data • SSN • Medical Imaging • NASA satellites imagery - terabytes of data per day • Exercise: Identify spatial and non-spatial data items in • A phone book • A cookbook with recipes
Difference between GIS and SDBMS • GIS • Focus on Algorithms • Dataset is loaded to the main memory • GIS is a top layer and use SDBMS • Does not work well on JOIN operation with large set of objects • File-based system (Layers) • Does not have Concurrency Control, Index, and Query Processing • SDBMS • Focus on how data is stored and managed • Dataset is located on the secondary storage • SDBMS is a lower level • Work well on JOIN operation with large set of objects • Relational tables • Concurrency Control, Index, and Query Processing
DBMS • Persistence across failures • Allows concurrent access to data • Scalability to search queries on very large datasets which do not fit inside main memories of computers • Efficient for non-spatial queries, but not for spatial queries • DBMS SDBMS
Mapping ER Model to the Relational Model • 1. Map each entity into a separate table, attributes become columns. • 2. For 1:1 cardinality, place any one of the entities as a FK in the other relation. • 3. For M:1 cardinality, place PK of 1-side relation as a FK in the relation of M- side. • 4. For M:N cardinality, create a new relation with the PK consisting of the PKs of the participating entities. • 5. For multivalued attribute, a new relation is created that has 2 columns: key and multivalue attributes. Together key and multivalued attributes form PK. • 6. For elevation attribute needs to be handled in the distinct manner. Since elevation is multivalued attribute, we need a new relation name Elevation. Because elevation captures height of the forest at different point (pointid), the new relation needs to have 3 attributes: Forest-name, Elevation, pointid.
An Example World Database • The World consists of three entities: country, city and river. • A country can have multiple capital cities and originate multiple rivers. • A river is originated by one country. • City is modeled as Point and has 3 attributes: Name (PK), Population, and Capital. • Country is modeled as Polygon and has 5 attributes: Name (PK), GDP, Population, Continent, and Life-Exp. • River is modeled as line and has 2 attributes: Name (PK), and Length.
An Example World Database • Purpose: Use an example database to learn query language SQL • Conceptual Model • 3 Entities: Country, City, River • 2 Relationships: capital-of, originates-in • Attributes listed in Figure 3.1