Geo-Databases: lecture 2 The Relational Data Model

Slides:



Advertisements
Similar presentations
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Advertisements

Basic SQL Introduction Presented by: Madhuri Bhogadi.
Department of Geoinformation Science Technische Universität Berlin WS 2006/07 Geoinformation Technology: lecture 9a Triangulated Networks Prof. Dr. Thomas.
Representing Data Elements Gayatri Gopalakrishnan.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4 SQL: Data Definition, Constraints, and Basic Queries and Updates.
SQL Components DML DDL DAL. Overview u Getting the records onto the disk - mapping u Managing disk space u SQL Modes u Ceating database.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
DATABASES AND SQL. Introduction Relation: Relation means table(data is arranged in rows and columns) Domain : A domain is a pool of values appearing in.
COURSE: DATABASES Prof.dr Leonid Stoimenov, mr Aleksandar Stanimirović, dipl.ing Miloš Bogdanović Project IB_JEP (RS) University of Niš Faculty.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) Introduction James Wang.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
Chapter 8 Part 1 SQL-99 Schema Definition, Constraints, Queries, and Views.
Database Management System Lecture 4 The Relational Database Model- Introduction, Relational Database Concepts.
Chapter 7 SQL HUANG XUEHUA. SQL SQL server2005 introduction Install components  management studio.
Department of Geoinformation Science Technische Universität Berlin WS 2006/07 Geoinformation Technology: lecture 3 Mapping of OO Models onto Tables Prof.
University of Sunderland COM 220Lecture Two Slide 1 Database Theory.
1 SQL Tarek El-Shishtawy Professor Ass. Of Computer Engineering.
Chapter 5: Part 1: DDL STRUCTURED QUERY LANGUAGE (SQL)
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Introduction to Information and Computer Science
CMPT 258 Database Systems The Relationship Model (Chapter 3)
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi MARA (UiTM), Kedah.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Jennifer Widom Relational Databases The Relational Model.
Lecture # 24 Introduction to SQL Muhammad Emran Database Systems.
Advanced Databases COMP3017 Dr Nicholas Gibbins
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4 Basic SQL تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة.
Database Systems – (
Introduction to Database Design and Implementation With
Advanced Databases COMP3211
Fundamental of Database Systems
SQL, the Structured Query Language
CPSC 603 Database Systems Lecturer: Laurie Webster II, Ph.D., P.E.
Entity- Relationship (ER) Model
COP Introduction to Database Structures
Introduction Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe.
REV 00 Chapter 4 SQL and QBE DDC 2483 – Database Systems.
Introduction to Database
Insert, Update and the rest…
Database Managment System
Instructor: Elke Rundensteiner
Applied CyberInfrastructure Concepts Fall 2017
Chapter 4 Relational Databases
Geo-Databases: lecture 7 Database design
Database Models Relational Model
SQL 101.
STRUCTURED QUERY LANGUAGE
Instructor: Mohamed Eltabakh
Relational Databases The Relational Model.
Relational Databases The Relational Model.
SQL OVERVIEW DEFINING A SCHEMA
The Relational Model Textbook /7/2018.
Data Model.
CMPT 354: Database System I
SQL-1 Week 8-9.
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Contents Preface I Introduction Lesson Objectives I-2
Geo-Databases: lecture 5 Data Manipulation in SQL
Chapter # 7 Introduction to Structured Query Language (SQL) Part I.
Design tools and techniques for a relational database system
Geo-Databases: lecture 6 Data Integrity
Geo-Databases: lecture 3 Simple Queries in SQL
Geo-Databases: lecture 4 Complex Queries in SQL
Lectures 2: Introduction to SQL 1
Session - 6 Sequence - 1 SQL: The Structured Query Language:
DATABASE Purpose of database
Introduction to Database
SQL (Structured Query Language)
Presentation transcript:

Geo-Databases: lecture 2 The Relational Data Model Prof. Dr. Thomas H. Kolbe Institute for Geodesy and Geoinformation Science Technische Universität Berlin Credits: This material is mostly an english translation of the course module no. 8 (‘Geo-Datenbanksysteme‘) of the open e-content platform www.geoinformation.net.

Introduction to the relational data model 09/12/2018

Fundamentals of the relational model Structure: All data is presented in tables (relations) Fixed number of columns (attributes) Variable number of rows (tuples or datasets) All values of one column from the same value domain Characteristrics: Simple structuring Set-oriented processing Avoidance of redundancy by splitting and distribution of data into multiple tables 09/12/2018

Operations Projection onto certain columns of a table With this background, the following operations are particularly useful: Projection onto certain columns of a table Selection of certain rows of a table on the basis of a specific selection criterion Joining data from different tables Implemented in the query language SQL 09/12/2018

Structured Query Language (SQL) Popular, ISO standardised query language (currently: SQL:2003) SQL is based on natural language concepts SQL can be subdivided into the following areas: Data Definition Language (DDL) for creation and modification of tables Data Manipulation Language (DML) for updating and querying of data Due to the complexity we will just give an overview of SQL:1999 (for more information see literature) For the time being all examples will be based on SQL:1999! 09/12/2018

Tables in SQL To begin with: single columns Each column of a table is assigned exactly one data type A data type defines the set of possible values and the allowed operations for this type Important data types: integer: integer numbers real: floating-point numbers numeric(p,s): fixed-point numbers with precision p and scale s char(L): character string with fixed length L varchar(L): character string with maximum length L date: data type for representation of dates blob(L): Binary Large Object, binary data with maximum length L 09/12/2018

Creation of tables in SQL Tables are built using the CREATE TABLE command 09/12/2018

Identification of data sets Problem: How can we identify tuples unambiguously? Solution: We need a key that unambiguously identifies each tuple! A key may comprise multiple attributes. There can be multiple keys for one table. Possible keys for the sample table: “Nr“ “Name“, “Straße“, “Ort“ 09/12/2018

Primary key It is advantageous to name a primary key to the system: CREATE TABLE Studenten (… PRIMARY KEY (MatNr) …); If no suitable primary key can be found, an artifical key may be generated by the system. 09/12/2018

Foreign key Foreign keys in one table always refer to primary keys of other tables By means of a foreign key we can relate tuples from different tables 09/12/2018

References Overview: Ramez Elmasri, Shamkant B. Navathe, Fundamentals of Database Systems, 3. Ed., Addison Wesley, 2001 Hector Garcia-Molina, Jeffrey D. Ullman, Database Systems: The Complete Book, Prentice Hall, 2002 Jim Melton, Alan R. Simon, SQL 1999: Understanding Relational Language Components, Morgan Kaufmann Publishers, 2001 Seminal work: E. F. Codd, A relational model of data for large shared data banks, in: Communications of the ACM, Vol. 13, Seite 377-387, 1970 09/12/2018