Presentation is loading. Please wait.

Presentation is loading. Please wait.

Date: 13/03/2015 Training Reference: 2015 GIS_01 Document Reference: 2015GIS_01/PPT/L4 Issue: 2015/L4/1/V1 Addis Ababa, Ethiopia GIS Data Base Management.

Similar presentations


Presentation on theme: "Date: 13/03/2015 Training Reference: 2015 GIS_01 Document Reference: 2015GIS_01/PPT/L4 Issue: 2015/L4/1/V1 Addis Ababa, Ethiopia GIS Data Base Management."— Presentation transcript:

1 Date: 13/03/2015 Training Reference: 2015 GIS_01 Document Reference: 2015GIS_01/PPT/L4 Issue: 2015/L4/1/V1 Addis Ababa, Ethiopia GIS Data Base Management Systems Instructor: Gabriel Parodi Implementation of the Training Strategy of the Monitoring for Environment and Security in Africa (MESA) Programme

2 NameResponsibility Contributions fromGabriel ParodiLecturer ITC, University of Twente Edited byTesfaye Korme Team Leader and Training Manager, Particip GmbH Reviewed byMartin Gayer Project Manager, Particip GmbH Approved byRobert BrownTechnical development Specialist (TDS),TAT

3 Short Introduction

4 GIS chapter 3.4 DBMS  What is a database / DBMS.  Advantages and implications of using a DBMS.  DBMS functionality and architecture.  The relational data model.  Querying a relational database.

5 Database  Computerised collection of structured data  Electronic filing cabinet  A structured collection of data stored in one or more tables  A database is only successful if it meets the needs of its users

6 Database management system (DBMS)  Software package that allows the user to set up, create and maintain a database.  A computerised record keeping system whose overall purpose is to maintain data and to make that data available on demand.

7 Advantages of using a DBMS  DBMS supports data models, a language that allows the definition of the data structure and stores and manipulate very large data sets.  Define integrity constraints to achieve data correctness (obvious errors).  The same data set can be used by many users at the same time (data sharing, concurrency control).  Declarative query language for flexible retrieval of data. (‘what’ but not ‘how’).  A query is a computer program that extracts data form the DB meeting the conditions in the query.  Backup and recovery functions to avoid loss of data.  Avoid unnecessary duplication of data (redundancy).

8 Implications of using a DBMS  Security restrictions: user privileges and authorisation.  Expert knowledge, high capital investment, overhead  Centralised risk

9 Functionality of and data model for DBMS  the user of a DBMS can:  add new (empty) files to the database  insert new data into existing files  retrieve data from existing files  update data in existing files  delete data from existing files  remove existing files (empty or otherwise) from the database  but first……. you need a data model

10 Data models  language to define a database structure and manipulate data  relational data model is most prominently used:  Define database structure: attributes, tuples and relations  Define integrity rules  Define queries (extract without alteration)  transactions (change database contents)

11 Relations, tuples and attributes relation = table tuple = record attribute = column attribute value Who has borrowed the book of author Burrough?

12 Relations, tuples and attributes  database: collection of relations / tables  relation is a collection of similarly shaped tuples / records (having the same named attributes)  attribute (a column) is a characteristic of the relation  attribute value has a single domain:  string, date, yes/no, number etc.

13 to define a relation schema you need to …..  provide a name for the relation  indicate which attributes it will have  define what the domain of each attribute is  Book(BookId: number, Title: string, Author: string, Year:number)  Borrow(BookId: number, StudentId: number, DateBorrowed: date)  Student(StudentId: number, Lastname: string, Initials: string, Programme: string)  relation schema is important part of database design  relation schema is stable, tuples often change  relation instance, database instance  underlined attribute is primary key

14 Attribute domains  StringE12-18-07  Numerical  integer255  real23.457  Special  date18/07/2000  memoAt this location we see ….  Location456000, 650000 UTM  Booleanyes/no

15 What is (the use of) a primary key...  definition: one or more attributes (column) that uniquely identifies a tuple (record)  large volumes to find records that match search criteria of data need quick searches (queries)  key should be minimal: consist of as few as possible attributes (columns)  a relation always has a key (unique value)  can Title be the primary key of the Book relation?  could Author ?

16 Primary Key  What attribute is the primary key of the relation Book?  primary key uniquely identifies each record in a relation

17 What is (the use of) a foreign key...  used to refer between records of different relations.  It is not a key of the relation in which it appears but is a primary key of another relation.

18 Finding records and building links Who has borrowed the book of author Burrough?

19 ? Finding records and building links Has Amer borrowed a book?

20 The three golden rules of data integrity  key uniqueness:  unique identifier, no duplicates within relation  key integrity  primary key value is never null (unknown)  referential integrity  value of a foreign key refers to an existing primary key value in another relation  foreign key values must have current matching primary key values

21 Database Queries  A database query is a data extraction without changing the database (otherwise we speak of a transaction or an upgrade)  By defining a query we search the database for a subset of records and/or attributes according to conditions defined by the user  To define queries we need a querying language, such as SQL = structured query language

22 Querying a relational database Basic operators  Tuple or record selection:  It allows tuples that meet the selection condition to pass, and disallows tuples that do not meet the condition.  Attribute projection:  Works like a tuple formatter: it passes through all tuples of the input, but reshapes each pf them in the same way. Produces fewer attributes.  Joining:  Attributes of two relations are matched and ‘glued’ together (foreign key). The number of attributes increases

23 Record selection Which records satisfy the condition AreaSize > 1000 ? SQL: SELECT* FROMParcel WHEREAreaSize > 100

24 Attribute projection I only want to see the attribute values of Pld and Location. SQL: SELECTPld, Location FROMParcel

25 The join operator…. SQL: SELECT* FROMTitleDeed, Parcel WHERETitledeed.Plot = Parcel.Pld I want to see the attributes values of TitleDeed and Parcel together

26 A combined selection, projection, join query... SELECTOwner, DeedDate FROMTitleDeed, Parcel WHERETitledeed.Plot = Parcel.Pld ANDAreaSize > 1000 I want to see the attributes values of TitleDeed and Parcel together for areas bigger than 1000 Ha.

27 Queries in GIS  In GIS application we can define spatial queries (where is it?) example: where is my field station number 10 (ST-10)? Lithology, landform, structure, mineralization x = 516000, y = 678003

28 Queries in GIS  A GIS allows us to combine spatial and non-spatial searches in one query  Example:  Where are the field stations with mineral showings and what kind of mineralization was found at those stations ?

29 Queries in GIS  SELECT Location, Mineralization  FROM Fieldstations, Samples  WHERE Showing = ‘yes’ REPORT X Y Mineralization 459802 5567030 Au 443023 5567122 Pb, Zn 472900 5566988 Pb, Zn Pb Zn Au Pb Zn MAP

30 Raster model The entity information is explicitly recorded for a basic data unit (cell, grid or pixel)

31 Linking spatial and attribute data raster map attribute table

32 Linking spatial and attribute data vector map attribute table AB F CE A A

33


Download ppt "Date: 13/03/2015 Training Reference: 2015 GIS_01 Document Reference: 2015GIS_01/PPT/L4 Issue: 2015/L4/1/V1 Addis Ababa, Ethiopia GIS Data Base Management."

Similar presentations


Ads by Google