CSE 132A. Database Systems Principles



Similar documents
CSE 233. Database System Overview

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

Chapter 1: Introduction

Database System Concepts

Chapter 1: Introduction. Database Management System (DBMS)

Introduction to database management systems

INTRODUCTION DATABASE MANAGEMENT SYSTEMS

Lesson 8: Introduction to Databases E-R Data Modeling

Chapter 1: Introduction

ECS 165A: Introduction to Database Systems

Overview of Data Management

1 File Processing Systems

Overview of Database Management

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

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

History of Database Systems

Database Design and Programming

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

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

Database Management. Chapter Objectives

DATABASE MANAGEMENT SYSTEMS. Question Bank:

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Chapter 1 Databases and Database Users

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

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


DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2

Contents RELATIONAL DATABASES

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

Database Management Systems

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

Introduction: Database management system

Principles of Database. Management: Summary

Database Concepts. Database & Database Management System. Application examples. Application examples

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

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006

Foundations of Information Management

Author: Abhishek Taneja

1. INTRODUCTION TO RDBMS

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

Introduction to Databases

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

Chapter 2 Database System Concepts and Architecture

Database Systems. Lecture 1: Introduction

Foundations of Information Management

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

1/20/11. Outline. Database Management Systems. Prerequisites. Staff and Contact Information. Course Web Site. 645: Database Design and Implementation

Schema Mappings and Data Exchange

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

Overview of Database Management Systems

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

Module 4 Creation and Management of Databases Using CDS/ISIS

CSE 562 Database Systems

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

Lecture 1 Database Systems: An Introduction

CHAPTER-IV DATABASE MANAGEMENT AND ITS ENVIRONMENT

Databases. DSIC. Academic Year

Introductory Concepts

COIS Databases

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

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

BCA. Database Management System

Relational Database Concepts

DBMS / Business Intelligence, SQL Server

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

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

Databases and Information Management

DATABASES AND DATABASE USERS

Relational Database Basics Review

Course Notes on A Short History of Database Technology

Course Notes on A Short History of Database Technology

Foundations of Business Intelligence: Databases and Information Management

Databases and BigData

Scope of this Course. Database System Environment. CSC 440 Database Management Systems Section 1

TIM 50 - Business Information Systems

Chapter 3. Database Environment - Objectives. Multi-user DBMS Architectures. Teleprocessing. File-Server

3. Relational Model and Relational Algebra

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

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY

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

Scheme G. Sample Test Paper-I

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Foundations of Business Intelligence: Databases and Information Management

Introduction to SQL ( )

DATA BASE.

n Assignment 4 n Due Thursday 2/19 n Business paper draft n Due Tuesday 2/24 n Database Assignment 2 posted n Due Thursday 2/26

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Basic Concepts of Database Systems

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

Bachelor of Science in Business Administration - Information Systems and Technology Major

Fundamentals of Database Design

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

Transcription:

CSE 132A Database Systems Principles Prof. Victor Vianu 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric: web knowledge harvesting, crowd sourcing, cloud computing, scientific databases, networks, data mining, streaming sensor monitoring, social networks, bioinformatics, geographic information systems, digital libraries, data-driven business processes Classical database concepts and algorithms continue to provide the core technology this course 2 1

CSE132A: Database Systems Principles Core concepts and techniques in database systems Databases from the viewpoint of user and designer A lot of SQL, but also peeks under the hood: query processing, indexing, schema design, transactions and concurrency control Some basic theory: formal languages underlying SQL relational algebra and relational calculus Basic background for follow-up courses 132B: Database System Applications 135: Server-Side Web Applications 3 Resources Slides, recommended texts, podcast Practice problem sets with solutions (ungraded) Gradiance online practice homeworks and labs Posted practice problems Weekly discussion sections (choose one of the two) TA/tutor daily office hours and instructor office hours Discussion board (Piazza) Everything will be posted on the class website (check often!) http://cseweb.ucsd.edu/classes/wi16/cse132a-a/ 4 2

Requirements Two Gradiance SQL Labs and two written homeworks (14%) Two programming assignments (SQL and JDBC) (33%) Midterm (25%) Final (25%) Class participation via clickers (3%) 5 What is a database? Persistent data Query and update language for accessing and modifying data Query optimization Transactions and concurrency control What kind of data? Emphasis: many instances of similarly structured data Examples: Airline reservations: database (large set of similar records) Computerized library: information retrieval Medication advisor: expert system 6 3

Top Level Goals of a Database System Provide users with a meaning-based view of data shield from irrelevant detail abstract view Support operations on data queries, updates Provide data control integrity, protection concurrency, recovery 7 Database System Tailored to specific application Database Management System Generalized DB system used in variety of application environments common approach to data organization data storage data access data control e.g. Ingres/Postgres, DB2, Oracle, SQL Server, MySQL, etc. 8 4

History of Database Systems 1950s and early 1960s: Data processing using magnetic tapes for storage Tapes provide only sequential access Punched cards for input Late 1960s and 1970s: Hard disks allow direct access to data Network and hierarchical data models in widespread use Ted Codd defines the relational data model Would win the ACM Turing Award for this work IBM Research begins System R prototype UC Berkeley begins Ingres prototype High-performance (for the era) transaction processing 9 History (cont.) 1980s: Research relational prototypes evolve into commercial systems SQL becomes industrial standard Parallel and distributed database systems Object-oriented database systems 1990s: Large decision support and data-mining applications Large multi-terabyte data warehouses Emergence of Web commerce 2000s: XML and XQuery standards Automated database administration Today: tremendous expansion across computer science 10 5

Purpose of Database Systems database: leap of abstraction from file systems In the early days, database applications were built directly on top of file systems Drawbacks of using file systems to store data: Data redundancy and inconsistency Multiple file formats, duplication of information in different files Difficulty in accessing data Need to write a new program to carry out each new task Integrity problems Integrity constraints (e.g. account balance > 0) become buried in program code rather than being stated explicitly Hard to add new constraints or change existing ones 11 Purpose of Database Systems (Cont.) Drawbacks of using file systems (cont.) No guaranteed atomicity of updates Failures may leave database in an inconsistent state with partial updates carried out Example: Transfer of funds from one account to another should either complete or not happen at all Concurrent access by multiple users Concurrent access needed for performance Uncontrolled concurrent accesses can lead to inconsistencies Example: Two people reading a balance and updating it at the same time Security problems Hard to provide user access to some, but not all, data Database systems offer solutions to all the above problems 12 6

Levels of Abstraction Logical level: describes data stored in database in terms close to the application type customer = record customer_id : string; customer_name : string; customer_street : string; customer_city : integer; end; Physical level: describes how the data is stored. View level: customized, restructured information. Views can also hide information (such as an employee s salary) for security purposes. 13 Basic Architecture of a Database System Data Independence logical and physical levels are independent 14 7

Data Models A collection of concepts and tools for describing the data relationships, semantics, constraints + A language for querying and modifying the data Relational model Entity-Relationship data model (mainly for database design, no query language) Object-based data models (Object-oriented and Object-relational) Semi-structured data model (XML) Other older models: Network model Hierarchical model 15 Schemas and Instances Similar to types and values of variables in programming languages Schema the logical structure of the database Example: The database consists of information about a set of customers and accounts and the relationship between them) Analogous to type of a variable in a program Instance the actual content of the database at a particular point in time Analogous to the value of a variable 16 8

Example: Entity-Relationship Model Models an application as a collection of entities and relationships Entity: a thing or object in the enterprise that is distinguishable from other objects Described by a set of attributes Relationship: an association among several entities Represented diagrammatically by an entity-relationship diagram: 17 Example: Relational Model Schema 18 9

Example: Relational Model Instance 19 Data Definition Language (DDL) Specification language for defining the database schema Example: create table account ( account-number char(10), balance integer) DDL compiler generates a set of tables stored in a data dictionary Data dictionary contains metadata (i.e., data about data) Database schema Integrity constraints Domain constraints Referential integrity (references constraint in SQL) Assertions Authorization information 20 10

Data Manipulation Language (DML) Language for accessing and modifying data DML also known as query/update language Two classes of languages Procedural user specifies what data is required and how to get that data Declarative (nonprocedural) user specifies what data is required without specifying how to get it SQL is the most widely used query language primarily declarative 21 Database Architecture Different architectures for different settings: Centralized Parallel (multi-processor) cloud computing/map-reduce Client-server Distributed 22 11

Centralized DBMS Site 1 Site 2 Site 5 Site 4 Site 3 23 Distributed DBMS Site 1 Site 2 Site 5 Site 4 Site 3 24 12

Client/Server DBMS SQL requests Answers Client Server 25 Map-reduce 26 13

Core database issues Data models, query languages Database design Query processing Storage management Transaction management Concurrency control 27 Beyond the Core Deductive databases Temporal databases Multimedia databases Geographic information systems Data warehouses Real-time and active databases XML databases Database-driven Web applications/services Data analytics (aka Big Data) 28 14

Databases at UCSD Prof. Alin Deutsch Prof. Yannis Papakonstantinou Prof. Victor Vianu Database group Web site: http://db.ucsd.edu/ papers, seminars, bragging. Intersections with other CSE groups storage multimedia machine learning IR/ data mining networks 29 This course 1. Database Management Systems overview 2. Relational databases --The relational model --Commercial query languages: SQL (and some QBE) --Formal query languages: relational algebra and calculus --Query processing --Indexing (sequential files, B-trees) --Schema design: normal forms and the ER model 3. Concurrency control 4. Other topics, as time allows: object databases, XML 30 15