Introduction to Spatial Computing CSE 555

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Chapter 3: The Enhanced E-R Model
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Entity Relationship (E-R) Modeling
System Analysis - Data Modeling
Chapter Five Data Modeling with the Entity-Relationship Model.
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
Chapter 4 Entity Relationship (E-R) Modeling
Chapter Five Data Modeling with the Entity-Relationship Model.
Fundamental database concepts
Chapter 3: The Enhanced E-R Model
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Entities and Attributes
Introduction to Spatial Computing CSE 5ISC
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Concepts and Terminology Introduction to Database.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Entity Relationship Modeling
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
Slide 4-1 Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Revised by IB & SAM, Fasilkom UI, 2005 Exercise 1. a property or description.
Fundamentals, Design, and Implementation, 9/e Appendix B The Semantic Object Model.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
Databases and Database User ch1 Define Database? A database is a collection of related data.1 By data, we mean known facts that can be recorded and that.
COP Introduction to Database Structures
Databases (CS507) CHAPTER 7.
Business System Development
Enhanced Entity-Relationship (EER) Model
The Enhanced Entity- Relationship (EER) Model
Advanced Database Analysis
Semantic Object Modeling (SOM)
Conceptual Design & ERD Modelling
Chapter 4: Logical Database Design and the Relational Model
The Enhanced Entity- Relationship (EER) Model
Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling
MODELS OF DATABASE AND DATABASE DESIGN
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Databases and Database Management Systems Chapter 9
Translation of ER-diagram into Relational Schema
 DATAABSTRACTION  INSTANCES& SCHEMAS  DATA MODELS.
CS 174: Server-Side Web Programming February 12 Class Meeting
Database Management System 1 (ITED123A)
File Systems and Databases
Lec 3: Object-Oriented Data Modeling
Chapter 3: The Enhanced E-R Model
Overview of Entity‐Relationship Model
CHAPTER 3: THE ENHANCED E-R MODEL
Chapter 4 Entity Relationship (ER) Modeling
Enhanced Entity-Relationship Modeling
Chapter 20 Object-Oriented Analysis and Design
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 5 Advanced Data Modeling
Database Design Hacettepe University
Database Processing: David M. Kroenke’s Chapter Five:
Entity-Relationship Diagram (ERD)
Database EER.
ENHANCED ENTITY-RELATIONSHIP (EER) MODEL
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
Entity Relationship (ER) Modeling
Presentation transcript:

Introduction to Spatial Computing CSE 555 Fundamental Spatial Concepts Some slides adapted from Worboys and Duckham (2004) GIS: A Computing Perspective, Second Edition, CRC Press

Database Support For Spatial Data

Database Support What is a Database? a repository of data that is logically related, but possibly physically distributed over several sites A database is created and maintained using a database management system (DBMS) For a database to be useful it must be: Reliable Correct and consistent Secure Fast retrieval

Are relational databases good enough for spatial data??

Is rational database sufficient? Consider a sample vector data illustrated alongside. Each road has following information Name -- String Geometry -- sequence of lines. Line – Start point, End point and length. Q1: Design a Database schema (atleast 2NF) for this data, reduce redundancy as much as possible. P0 R1P1 R1P2 R1P3 R1 MG Road

Is rational database sufficient? Road ID Road Name R1 MG Road … ….. P0 R1P1 R1P2 R1P3 Road ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long R1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… R1 MG Road Q1: Write an SQL query to retrieve all the line segments of MG road in order.

Is rational database sufficient? Road ID Road Name R1 MG Road … ….. Road ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long R1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… Lake ID Road Name Lake1 Calhoun … ….. Lake ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long Lake1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… What if we also have data on lakes?

Is rational database sufficient? Road ID Road Name R1 MG Road … ….. Road ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long R1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… Lake ID Road Name Lake1 Calhoun … ….. Lake ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long Lake1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… Query: Write an SQL query to retrieve all roads which are alongside lakes.

Is rational database sufficient? Road ID Road Name R1 MG Road … ….. Road ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long R1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… Spatial data and operations need more than the traditional relational databases Lake ID Road Name Lake1 Calhoun … ….. Lake ID Line seg SpointLat Spoint_Long Epoint Lat Epoint Long Lake1 L1 P0.x P0.y R1P1.x R1P1.y L2 …. ….. …… Query: Write an SQL query to retrieve all roads which are alongside lakes.

Some other query examples Traditional Query Query 1: Retrieve names and addresses of all opencast coal mines in Staffordshire Data may be retrieved by a simple look up and match Query 2: Retrieve names and addresses of all employees of Wedgwood Pottery who earn more than half the sum earned by the managing director Numerical comparison

Some other query examples Spatial Query: Retrieve all the addresses which are not over the underlying water table and do not have direct water connection from municipality. Retrieve all addresses where the house income is less than 10,000 per month. Satisfying these queries may require the integration of both spatial and non-spatial information

Spatial Data Vs Relational Data Spatial data can be notoriously large and often layered. Considering its spatial semantics is a must. Specialized modeling concepts (conceptual mode) operators (logical data model), spatial storage structures (physical data model) and access methods (physical data model) are required.

Building a System of Spatial Data The process of developing a database is essentially a process of model building Application domain model: describes the core requirements of users in a particular application domain, based on an initial study Conceptual model: Illustrates the entities, the core concepts and relationships among the entities. Usually consists of conceptual models such as ER diagrams. Logical model: An abstract layer creating between the conceptual and the physical layers to create independence between the two. Consists of abstract data types and operators defined on data. Physical model: This is the result of a process of programming and system implementation. Query optimization can also be considered a part of physical model.

Conceptual Modeling of Spatial Data

Conceptual data model A conceptual data model provides a model of the proposed system that is independent of implementation details An effective conceptual model: Easy communication between analysts, designers and users Aids the design of the system Provides basic reference material for implemented system

Background on Entity relationship model The entity relationship model is a conceptual data modeling technique where An entity type represents a collection of similar objects An entity instance is an occurrence of a particular entity An attribute type is a property associated with an entity An attribute type that serves to uniquely identify an entity type is called an identifier Identifiers are usually underlined attribute type entity type identifier

Background on Entity relationship model Entity types are connected using relationships A relationship type connects one or more entity types A relationship occurrence is a particular instance of a relationship Relationships may have their own attributes independent of entities Entity, attribute, and relationship types are shown in an entity relationship diagram (E-R diagram) relationship type

Background on Entity relationship model Relationship types may be many-to-many: e.g., a town may have many road, which in turn may pass through many towns many-to-one: e.g., a town may have many cinemas, but a cinema can be located in at most one town one-to-one: e.g., a cinema may have one manager who manages only one cinema These constraints constitute cardinality conditions

Background on Entity relationship model In addition to cardinality conditions, relationships may also have participatory conditions: optional or mandatory (indicated with a double line) A relationship from an entity to itself is called involutory A relationship connecting three entities is called a ternary relationship

Extended Entity Relationship model The extended entity relationship model (EER) adds further features: An entity type E1 is a subtype of E2 if every occurrence of E1 is also an occurrence of E2. In this case, E2 is a supertype of E1 The operation of forming subtypes is called specialization; the inverse operation of forming supertypes is called generalization

Extended Entity Relationship model For specialization (and conversely for generalization) A subtype has the same identifying attribute(s) as the supertype A subtype has all the attributes of the supertype, and possibly some more A subtype enters into all the relationships in which the supertype is involved, and possibly some more. Subtypes and supertypes are organized into an inheritance hierarchy

Extended Entity Relationship model Subtypes may be: disjoint: where no occurrence of one subtype is an occurrence of another overlapping: subtypes are not disjoint EER uses an extended diagrammatic notation to represent specialization/generalization constructs supertype overlapping disjoint subtype

EER for spatial information #1 E-R or EER can be used to model spatial entities Most vector-based GIS use a similar structure Node area directed arc

Pop Question Area needs to be bounded. Question: What is the minimum number of arcs associated with an area? (0,1, or many)? Node area Question: What is the minimum number of nodes in an area? (0 ,1 or many)? directed arc

EER for spatial information #2 Question1: What is the minimum number of arcs associated with an area? (0,1, or many)? Question2: What is the minimum number of nodes in an area? (0 ,1 or many)? Question: Re-consider the implication if “overlapping” is changed to “disjoint” in the EER diagram

Pop question What should be changed in the ER diagram to model the red dot? Node area directed arc