Database Systems. Lecture 1: Introduction



Similar documents
Database Management Systems. Chapter 1

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

COIS Databases

Introduction to Database Systems. Module 1, Lecture 1. Instructor: Raghu Ramakrishnan UW-Madison

Introduction to Database Systems CS4320. Instructor: Christoph Koch CS

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

Week 1 Part 1: An Introduction to Database Systems. Databases and DBMSs. Why Use a DBMS? Why Study Databases??

Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Overview. Introduction to Database Systems. Motivation... Motivation: how do we store lots of data?

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

ECS 165A: Introduction to Database Systems

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

The Relational Model. Why Study the Relational Model?

Database Design and Programming

Overview of Data Management

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

1 File Processing Systems

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

Relational Database Basics Review

Logistics. Database Management Systems. Chapter 1. Project. Goals for This Course. Any Questions So Far? What This Course Cannot Do.

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 1 Outline

Lecture 6. SQL, Logical DB Design

DATABASE MANAGEMENT SYSTEM

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

EECS 647: Introduction to Database Systems

Objectives of Lecture 1. Labs and TAs. Class and Office Hours. CMPUT 391: Introduction. Introduction

3. Relational Model and Relational Algebra

Chapter 1 Databases and Database Users

CSE 132A. Database Systems Principles

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

Chapter 1: Introduction

Introduction: Database management system

Overview of Database Management

There are five fields or columns, with names and types as shown above.

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

The Entity-Relationship Model

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

David M. Kroenke and David J. Auer Database Processing 11 th Edition Fundamentals, Design, and Implementation. Chapter Objectives

Objectives of Lecture 1. Class and Office Hours. Labs and TAs. CMPUT 391: Introduction. Introduction

Contents RELATIONAL DATABASES

Foundations of Business Intelligence: Databases and Information Management

SQL NULL s, Constraints, Triggers

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

History of Database Systems

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Winter 2009 Lecture 1 - Class Introduction

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

CSE 233. Database System Overview

2. Background on Data Management. Aspects of Data Management and an Overview of Solutions used in Engineering Applications

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

Introduction to Databases

Fundamentals of Database Design

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

Basic Concepts of Database Systems

SQL - QUICK GUIDE. Allows users to access data in relational database management systems.

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Fall 2007 Lecture 1 - Class Introduction

Topics in basic DBMS course

Database System. Session 1 Main Theme Introduction to Database Systems Dr. Jean-Claude Franchitti

Course Notes on A Short History of Database Technology

Course Notes on A Short History of Database Technology

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Introduction to database management systems

David M. Kroenke and David J. Auer Database Processing 12 th Edition

Database Systems. Session 1 Main Theme Introduction to Database Systems Dr. Jean-Claude Franchitti

Discovering SQL. Wiley Publishing, Inc. A HANDS-ON GUIDE FOR BEGINNERS. Alex Kriegel WILEY

Modern Databases. Database Systems Lecture 18 Natasha Alechina

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Spring 2006 Lecture 1 - Class Introduction

Principles of Database. Management: Summary

Course MIS. Foundations of Business Intelligence

Ursuline College Accelerated Program

Databases and BigData

Chapter 1: Introduction. Database Management System (DBMS)

ETL Tools. L. Libkin 1 Data Integration and Exchange

Associate Professor Northern Virginia Community College

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Introduction to Database Systems CS4320/CS5320. CS4320/4321: Introduction to Database Systems. CS4320/4321: Introduction to Database Systems

Chapter 14: Databases and Database Management Systems

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

Database Management. Chapter Objectives

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Θεµελίωση Βάσεων εδοµένων

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

full file at

Chapter 2 Database System Concepts and Architecture

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

Introduction to IR Systems: Supporting Boolean Text Search. Information Retrieval. IR vs. DBMS. Chapter 27, Part A

CS143 Notes: Views & Authorization

What is Data Virtualization? Rick F. van der Lans, R20/Consultancy

CHAPTER-IV DATABASE MANAGEMENT AND ITS ENVIRONMENT

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

Foundations of Information Management

Transcription:

Database Systems Lecture 1: Introduction

General Information Professor: Leonid Libkin Contact: libkin@ed.ac.uk Lectures: Tuesday, 11:10am 1 pm, AT LT4 Website: http://homepages.inf.ed.ac.uk/libkin/teach/dbs09/index.html

Course Information Email: Use your UoE account Use DBS in the subject line Always sign using your name No attachments Never send me code via email I will try to answer by the end of the next business day Academic offences: Don't!

Course information cont d 3 assignments + exam 1st assignment (5%) - pencil/paper, relational algebra/calculus, SQL 2nd assignment (15%) - use postgresql (available on dice machines). Extensive SQL programming exercise 3rd assignments (5%) - pencil/paper again, database design, query processing, basics of XML Exam - 75% CSC343 4

Textbook Recommended: Database Managament Systems, by R. Ramakrishnan, ( Edition and J. Gehrke, McGraw Hill, 2003 (3rd

The goal: You will learn: General principles of database systems that apply to all (certainly most) products you are likely to deal with. However, you will not learn system-specific issues

What will you learn in this course Database Design Methodology start from a general application description (in ( form verbal abstract and optimize the requirements (ER ( modeling map the requirements into entities that an RDBMS ( relations understands (extract database ( normalization ) optimize the relations

What will you learn in this course (cont'd) Use of an RDBMS write queries in a language that a DBMS ( SQL ) understands implement your application using a language you are familiar with, suitably enhanced with SQL statements with the help of the DBMS Basics of XML Schemas (DTDs), query languages (XPath, XQuery)

What you will not learn in this course System-specific issues what is it that I can do in PostgreSQL but not in DB2 or Oracle, and vice versa what level of query nesting is permitted in the latest version of Sybase the exact syntax of Oracle's connect by prior clause comparison with the with recursive clause in the SQL3 standard etc etc

Why learn about databases? It used to be about boring things: employee records, bank records, etc. Today, the field covers all aspects of working with data: Web search Data mining Scientific and medical databases Integrating information Databases are behind almost everything you do on the Web Google searches Queries at Amazon, ebay, etc. Trip planning (expedia etc)

What is Data Management? ( query Find data (search and Update or modify data Ensure data consistency Protect data ( control from unauthorized access (access ( recovery ) from failures from other programs or users (concurrency ( control

Finding data? Query: Find the average enrollment in database courses at UoE? How could we find this using a conventional search within file system? Do we get what we want? Why is this hard? How could we find this using a Database Management System (DBMS)?

What is a DBMS? Database: A large collection of data. Examples: databases of customers, products,... A database usually models (some part of) a realworld enterprise. ( courses Entities (e.g., students, ( DBS Relationships (e.g., John Doe is taking A Database Management System (DBMS) is a software package designed to store and manage databases. Many vendors: IBM, Sybase, Oracle, Microsoft, etc

Simplified database system environment

Typical DBMS Functionality Define a particular database in terms of its data types, structures, and constraints Construct or Load the initial database contents on a secondary storage device Manipulating the database: Retrieval: Querying, generating reports Modification: Insertions, deletions and updates to its content Accessing the database through Web applications Processing and Sharing by a set of concurrent users and application programs yet, keeping all data valid and consistent

Typical DBMS Functionality Other features: Protection or Security measures to prevent unauthorized access Presentation and Visualization of data Maintaining the database and associated programs over the lifetime of the database application

Why Use a DBMS? Self-describing nature of a database system: A DBMS catalog stores the description of a particular database (e.g. data structures, types, and ( constraints The description is called meta-data. Data independence You don t need to know the implementation of the database to access the data

Why use a DBMS - Data Independence Applications insulated from how data is structured and stored change the order of tuples add or modify other columns add or modify indexes Note that query does not change when physical structure changes One of the most important benefits of using a DBMS

Why Use a DBMS? Efficient access queries are optimized. Reduced application development time Queries can be expressed declaratively, we do not need to indicate how to execute them Data integrity and security Some constraints on the data are enforced automatically.

Why use a DBMS - Data Consistency Data Constraints: ( sid ) All students must have a student ID No two students can have the same sid ( uniqueness ) A student may only have one grade per course Etc.

Why Use a DBMS? Concurrent access, recovery from crashes Many users can access/update the database at the same time without any interference. Speed even when the data is huge, i.e. IRS: 150 TB (1 TB 10 12 B) ( B Yahoo: 2 PB (1 PB 10 15 National Energy Research Scientific Computing Center (USA): 3.5 PB

Why use a DBMS - Concurrency Control Concurrent execution of user programs is essential for good DBMS performance. Because disk accesses are frequent, and relatively slow Interleaving actions of different user programs can lead to inconsistency: A cheque is cleared while account balance is being computed. DBMS ensures that such problems do not arise: users can behave as if they were using a singleuser system.

Why use a DBMS - Data Abstraction Many views, single logical schema and physical schema. Views (external schemas) describe how users see the data. Logical schema defines logical structure. Physical schema describes the files and indexes used. View 1 View 2 View 3 Logical Schema Physical Schema

Example: University Database Conceptual schema: Student(sid: string, name: string, login: string, ( gpa:real age: integer, Course(cid: string, cname:string, credits:integer) ( grade:string Enrolled(sid:string, cid:string, describes data in terms of the data model of the DBMS Physical schema: Relations stored as unordered files. Index on first column of Students. External Schema (View): ( Course_info(cid:string,enrollment:integer

Describing Data: What is a Data Model? Mathematical representation of data relational model = tables; semistructured model = trees/graphs. AND Operations on data Constraints

Describing Data: Data Models A schema is a description of a particular collection of data, using a given data model. The relational model of data is the most widely used model today. Main concept: relation, basically a table with rows and columns. Every relation has a schema, which describes the columns, or fields.

Example Instance of Student Relation sid Name Login Age GPA 53666 Jones Jones@cs 20 3.2 45453 Smith Smith@ai 19 3.1 Columns are attributes Rows are tuples

The SQL Query Language Find all students who are 20 years old SELECT * FROM Students WHERE age = 20 sid Name Login Age GPA 53666 Jones Jones@cs 20 3.2

Database Users Three groups: End users Database administrators Database developers This course prepares you to be end-users of DBMSs. But to be an intelligent end-user you need to know how a DBMS operates.

Historical Development of Database Technology Early Database Applications: The Hierarchical and Network Models were introduced in the mid 1960s and dominated during the 1970s. Relational Model based Systems: Relational model was originally introduced in 1969 (40th anniversary is celebrated this year!) by E.F. Codd at IBM. Relational DBMS Products emerged in the early 1980s.

Historical Development of Database ( cont'd ) Technology Object-oriented and emerging applications: Object-Oriented Database Management Systems (OODBMSs) were introduced in the late 1980s and early 1990s to cater to the need of complex data processing - but failed to take off. Many relational DBMSs have incorporated object database concepts, leading to a new category called ( ORDBMSs ) object-relational DBMSs Extended relational systems add further capabilities ( types (e.g. for multimedia data, XML, and other data

Historical Development of Database ( cont'd ) Technology Data on the Web and E-commerce Applications: Web contains data in HTML with links among pages. This has given rise to a new set of applications and E-commerce is using new standards like XML (extended Markup Language). Script programming languages such as PHP and JavaScript allow generation of dynamic Web pages that are partially generated from a database Also allow database updates through Web pages

Extending Database Capabilities New functionality is being added to DBMSs in the following areas: Scientific Applications ( Language XML (extensible Markup Image Storage and Management Audio and Video Data Management Data Warehousing and Data Mining Spatial Data Management Time Series and Historical Data Management Interoperability, integrating data from different sources