©2007 by Austin Troy. All rights reserved Lecture 6 Important Database Concepts Introduction to GIS Lecture slides by Austin Troy, University of Vermont,

Slides:



Advertisements
Similar presentations
DATABASE RC D DD CMA C M R B PK E I S H S RC H L I V FK.
Advertisements

WHAT D IS RAW, UNPROCESSED FACTS AND FIGURES COLLECTED, STORED AND PROCESSED BY COMPUTERS.
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Data Models There are 3 parts to a GIS: GUI Tools
Technology Guide 3 Data and Database T3-1. IT for Management Prof. Efraim Turban T3-2 File Management Hierarchy of data for a computer-based file Record.
Some computer fundamentals and jargon Memory: Basic element is a bit – value = 0 or 1 Collection of “n” bits is a “byte” Collection of several bytes is.
DATA TYPES ICT DATATYPES. DATA TYPES ICT Numeric Data Numeric data simply means numbers. But, numbers come in a variety of different types... Integers.
UNIVERSITY OF PALESTINE business computer application College of Business Instructor: Mr. Ahmed Abumosameh.
1 Data & Database Development. 2 Data File Bit Byte Field Record File Database Entity Attribute Key field Key file management concepts include:
Lecture 16: Data input 1: Digitizing and Geocoding By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
Fundamentals of GIS Materials by Austin Troy © 2008 Lecture 18: Data Input: Geocoding and Digitizing By Austin Troy University of Vermont NR 143.
©2005 Austin Troy. All rights reserved Lecture 3: Introduction to GIS Part 1. Understanding Spatial Data Structures by Austin Troy, University of Vermont.
©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in Arc GIS 2.Intro to queries in Access Lecture by Austin.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Attribute databases. GIS Definition Diagram Output Query Results.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Dr. David Liu Objectives  Understand what a GIS is  Understand how a GIS functions  Spatial data representation  GIS application.
Attribute Data Input and Management
End Show Introduction to Electronic Spreadsheets Unit 3.
Database Models. Flat File The most basic way to organize data is as a flat file. You can think of this as a single table with a large number of records.
MS Access 2007 IT User Services - University of Delaware.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
IST Databases and DBMSs Todd S. Bacastow January 2005.
©2005 Austin Troy. All rights reserved Lecture 3: Introduction to GIS Understanding Spatial Data Structures by Austin Troy, Leslie Morrissey, & Ernie Buford,
Computer Systems Week 10: File Organisation Alma Whitfield.
COMPUTING FOR BUSINESS AND ECONOMICS-III. Lecture no.6 COURSE INSTRUCTOR- Ms. Tehseen SEMESTER- Summer 2010.
Alternative data structure models there are two basic different data structure models with a number of variants storage of all map elements in a “combined”
Attribute Data in GIS Data in GIS are stored as features AND tabular info Tabular information can be associated with features OR Tabular data may NOT be.
Applied Cartography and Introduction to GIS GEOG 2017 EL
1 Advanced Computer Programming Databases. Overview What is a database? Database Basics Database Components Data Models Normalization Database Design.
Fundamentals of GIS Materials by Austin Troy © 2008 Lecture 18: Data Input: Geocoding and Digitizing By Austin Troy University of Vermont.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
ECE 8443 – Pattern Recognition ECE 3822 – Software Tools For Engineers Topics: Definitions and Terminology Abstraction Schema Tables Types of Databases.
How do we represent the world in a GIS database?
Fundamentals of GIS Lecture materials by Austin Troy (c) 2010, except where noted Lecture 3 Part 1.Important Database Concepts Part 2. Queries Lecture.
CSC 2720 Building Web Applications Database and SQL.
Chapter 8. ATTRIBUTE DATA INPUT AND MANAGEMENT
Data Structure & File Systems Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
©2007 by Austin Troy. All rights reserved Lecture 6 Database Concepts Introduction to GIS By Brian Voigt University of Vermont Thanks are due to Dr Troy,
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Fanny Widadie, S.P, M.Agr 1 Database Management Systems.
Prepared by The Smartpath Information Systems
GIS Data Structures How do we represent the world in a GIS database?
Relational Database. I. Relational Database 1. Introduction 2. Database Models 3. Relational Database 4. Entity-Relationship Models 5. RDB Design Principles.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
NR 143 Study Overview: part 1 By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in Arc GIS 2.Intro to queries in Access Lecture by Austin.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
DATA Spatial Data – where things are Non Spatial Data or Attribute Data – What things are Data in a computer database are managed and accessed through.
Introduction to Databases CISC Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
Important Database Concepts Introduction to GIS. How is Data Stored? People use number system with base 10 –decimal number Each digit corresponds to 10.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
©2007 by Austin Troy. All rights reserved Lecture 6 Important Database Concepts Introduction to GIS Lecture slides by Austin Troy, University of Vermont,
Creating E/R Diagrams with SQL Server Management Studio, Writing SQL Queries D0ncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
MICROSFTACCESS tables. DATA TYPES Field TypeWhat It Holds Short Text Text up to 255 characters long (including spaces and punctuation). Use a Text field,
Introduction to Database Programming with Python Gary Stewart
Geog. 314 Working with tables.
DATA TYPES.
Databases Chapter 16.
Physical Structure of GDB
What Are Databases? Organized by Dr. Farrokh Alemi PhD
Data Types & File Size Calculations
Creating Tables & Inserting Values Using SQL
ICT Database Lesson 2 Designing a Database.
Presentation transcript:

©2007 by Austin Troy. All rights reserved Lecture 6 Important Database Concepts Introduction to GIS Lecture slides by Austin Troy, University of Vermont, © 2007

©2007 by Austin Troy. All rights reserved People use number system with base 10 Each digit corresponds to 10 to some power Hence a number with 3 digits has 10 3 or 1000 possibilities Why are computer values so often in multiples of eight? Because computers use a base 8 system of storing numbers and values A byte is 8 “on-off switches” or bits Each switch/bit represents a binary number; one byte is 2 8 or 256 possibilities Introduction to GIS How is Data Stored?

©2007 by Austin Troy. All rights reserved Switch combinations determine base ten number based on the formula: N 10 = 2 b-1 +2 b-2 +…2 b-b Where b= number of bits storing the number Hence the binary number = 2 7 * * * * * * * *1 = And the binary number = 2 7 * * * * * * * *0 = Introduction to GIS How do binary numbers translate to real numbers?

©2007 by Austin Troy. All rights reserved Number of possible values for a unit of data is an exponential function of the number of switches 2 8 =256eight bit data 2 16 =65,536sixteen bit data 2 32 = 4,294,967,296thirty two bit data Introduction to GIS Number of Possible Values is fn of number of bits

©2007 by Austin Troy. All rights reserved Number of bits determines data types Examples of Integer data types  Byte: 2 8 (0 to 255)  Short Integer: 2 16 (ranges from –32,767 to +32,767 without decimals, the sixteenth bit determines sign)  Long Integer: 2 32 (+/ e+09 ) Introduction to GIS

©2007 by Austin Troy. All rights reserved Floating point data types In this case the number can have a decimal, but the number of places is variable With this type of number the number of bits determines not just the number of possible magnitudes but also the level of precision of the decimal, represented as number of decimal places. Fewer bits in FP numbers can lead to rounding errors Two types of FP number  Single Precision: Often 2 32  Double Precision: Usually double the bits of single precision (i.e. 2 64) Introduction to GIS

©2007 by Austin Troy. All rights reserved  Currency (type of number with specific behaviors)  Date (recognizes order in dates)  String (text)  When numbers are represented as text they have no numerical properties (e.g. zip codes)  Boolean (yes, no)  Object (e.g. pictures, bits of code, behaviors, multi-media, programs) Introduction to GIS Other Data Types

©2007 by Austin Troy. All rights reserved Three Classic Database Models Hierarchical Network Relational -Arc View and Arc Info use this model Introduction to GIS

©2007 by Austin Troy. All rights reserved Hierarchical Database Model A one-to-many method for storing data in a database that looks like a family tree with one root and a number of branches or subdivisions. Problem: linkages in the tables must be known before Introduction to GIS Groovy 70s TV Action showsDrama Sitcoms Dukes of Hazzard CHIPs DallasFantasy Island Love Boat Starsky and Hutch Tom Wopat Eric Estrada Gavin McLeod Larry Wilcox Larry Hagman Ricardo Montalban David Soul Ted Lange

©2007 by Austin Troy. All rights reserved Hierarchical Database Model Example where this model works well: plant and animal taxonomies Soil classification Works when: classes are totally mutually exclusive Problem with this model: Does not work when have entities that belong to several classes or do not have mutual exclusivity Think about the problems with Windows Explorer Example: classifying your music collection You may create classes like rock, jazz, classical, Latin, with folders for artists nested within However, an artist may do rock and Latin and jazz on the same album, or one song may be a combination Introduction to GIS

©2007 by Austin Troy. All rights reserved Networked Database Model A database design for storing information by linking all records that are related with a list of “pointers.” Problem: linkages in the tables must be known before. Not adaptable to change. Introduction to GIS Action showsDrama Sitcoms Dukes of Hazzard CHIPs DallasFantasy Island Love Boat Three’s company ABC CBS NBC

©2007 by Austin Troy. All rights reserved Relational (Tabular) Database Model A design used in database systems in which relationships are created between one or more flat files or tables based on the idea that each pair of tables has a field in common, or “key”. In a relational database, the records are generally different in each table The advantages: each table can be prepared and maintained separately, tables can remain separate until a query requires connecting, or relating them, relationships can be one to one, one to many or many to one Introduction to GIS

©2007 by Austin Troy. All rights reserved Introduction to GIS NamePhoneAddressStudent ID *** Records are the unit that the data are specific to Fields, or columns, are attribute categories Cells are where individual values of a record for a field are stored Data Tables (flat files) records fields cells Headings: are the labels for the columns

©2007 by Austin Troy. All rights reserved Introduction to GIS Course name Course number enrollmentfaculty ID *** Is a field that is common to two or more flat files; allows a query to be done across multiple tables or allows two tables to be joined Data key NamePhoneAddressfaculty ID *** Flat file: professor infoFlat file: course info

©2007 by Austin Troy. All rights reserved Join Tables Based on the values of a field that can be found in both tables The name of the field does not have to be the same The data type has to be the same KeyA B C KeyA B C JOIN Introduction to GIS In this case we have a one to one join; here the key is unique 3 50

©2007 by Austin Troy. All rights reserved Join Tables KeyA B C KeyA B C JOIN Introduction to GIS In this case we have a one to many join; here the key is not unique

©2007 by Austin Troy. All rights reserved u Relational (Tabular) Database Model: 70s TV example Now we can have various flat files (tables) with different record types and with various attributes specific to each record Introduction to GIS ActorYear born* Sideburn length David Sole1948serious Eric Estrada1949moderate Larry Wilcox 1953slight Tom Wopat1950major ShowLead actor Co-starNetwork * Starsky and Hutch David Soul Paul Michael Glaser ABC CHIPsEric Estrada Larry WilcoxCBS DukesTom Wopat John Schneider NBC *entirely guessed at- I am not responsible for mistaken TV trivia Table 1- specific to actors Table 2- specific to shows

©2007 by Austin Troy. All rights reserved u Relational (Tabular) Database Model This allows queries that go across tables, like which CBS lead actors were born before 1951? Answer: Tom Wopat and David Sole Introduction to GIS ActorYear born* Sideburn length David Sole1948serious Eric Estrada1949moderate Larry Wilcox 1953slight Tom Wopat1950major ShowLead actor Co-starNetwork * Starsky and Hutch David Soul Paul Michael Glaser CBS CHIPsEric Estrada Larry WilcoxABC DukesTom Wopat John Schneider CBS *entirely guessed at- I am not responsible for mistaken TV trivia It does this by combining information from the two tables, using common key fields

©2007 by Austin Troy. All rights reserved u Relational (Tabular) Database Model Object-relational databases can contain other objects as well, like images, video clips, executable files, sounds, links Introduction to GIS ActorYear born* Sideburn length Picture David Soul1948serious Eric Estrada1949moderate Larry Wilcox 1953slight Tom Wopat1950major

©2007 by Austin Troy. All rights reserved u Relational Database: another example: property lot info Introduction to GIS One-to-one relationship Parcel ID Street address zoning Maple St. Residential Brooks Ave Commercial Windam Ct. Residential 4 OwnerParcel IDoccupation J. Smith 13lawyer R. Jones 11dentist T. Flores 12Real estate developer

©2007 by Austin Troy. All rights reserved u Relational database: one to many relationship Introduction to GIS One-to-many relationship Parcel ID Street address zoning Maple St. Residential Brooks Ave Commercial Windam Ct. Residential 4 OwnerParcel IDoccupation J. Smith 13lawyer R. Jones 11dentist J. McCann 12financier T. Flores 12Real estate developer In this case, several people co-own the same lot, so no longer one lot, one person

©2007 by Austin Troy. All rights reserved Assuming each owner owned several parcels, we would structure the database differently Introduction to GIS One-to-many relationship Parcel ID Street address zoning Maple St.Residential Brooks AveCommercial Windam Ct.Residential 4 Owneroccupation# properties owned J. Smith lawyer2 R. Jones dentist5 J. McCann financier2 T. Flores Real estate developer 3 Properties owned by T. Flores OwnerParcel ID Date of transaction Flores Flores Flores Note: this table includes data pertinent only to Flores’ ownership of these properties

©2007 by Austin Troy. All rights reserved Example Here’s an example of a chart showing the relationships between flat files in a sample relational database for food suppliers* in Microsoft Access Introduction to GIS * This comes from an MS ACCESS sample database

©2007 by Austin Troy. All rights reserved Introduction to GIS * This comes from an MS ACCESS sample database

©2007 by Austin Troy. All rights reserved Introduction to GIS * This comes from an MS ACCESS sample database A real time RDBMS allows for realtime linking and embedding of tables based on common fields Here we see all the orders for product ID 3; there is no need to include product ID in that sub- table