ECS 165A: Introduction to Database Systems



Similar documents
Chapter 1: Introduction

Chapter 1: Introduction. Database Management System (DBMS)

Introduction to database management systems

Database System Concepts

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

Database Management Systems. Chapter 1

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

1 File Processing Systems

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

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

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

Chapter 1: Introduction

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

CSE 132A. Database Systems Principles

Lesson 8: Introduction to Databases E-R Data Modeling

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

Introduction to Database Systems CS4320. Instructor: Christoph Koch CS

Overview of Data Management

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

COMP5138 Relational Database Management Systems. Databases are Everywhere!

CSE 233. Database System Overview

Introduction to Databases

Chapter 1 Databases and Database Users

Principles of Database. Management: Summary

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

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

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

Database Systems Introduction Dr P Sreenivasa Kumar

Database Systems. Lecture 1: Introduction

Author: Abhishek Taneja

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

Chapter 2 Database System Concepts and Architecture

Overview of Database Management

Database Management. Chapter Objectives

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

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

DATABASE MANAGEMENT SYSTEM

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

COIS Databases

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

Introduction: Database management system

BCA. Database Management System

Course Notes on Databases and Database Management Systems

Overview of Database Management Systems

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Outline. We ll learn: Faloutsos CMU SCS

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

Module 4 Creation and Management of Databases Using CDS/ISIS

Introductory Concepts

3. Relational Model and Relational Algebra

Database Management Systems

Database Systems. 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?

Basic Concepts of Database Systems

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

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

B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

DATABASES AND DATABASE USERS

CC414 Database Management Systems

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

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

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

B.Sc (Computer Science) Database Management Systems UNIT-V

Databases and BigData

Introduction to Database Systems

DATABASE MANAGEMENT SYSTEMS. Question Bank:

Relational Database Basics Review

The Relational Model. Why Study the Relational Model?

Course Notes on A Short History of Database Technology

Course Notes on A Short History of Database Technology

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

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

DATABASE DESIGN AND IMPLEMENTATION USING VISUAL BASIC

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

IT2304: Database Systems 1 (DBS 1)

Data Modeling Basics

Introduction to Object-Oriented and Object-Relational Database Systems

Data Modeling and Databases I - Introduction. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich

2. Basic Relational Data Model

Oracle Data Integrator: Administration and Development

COMPONENTS in a database environment

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

Relational Database Systems 2 1. System Architecture


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

Foundations of Business Intelligence: Databases and Information Management

Foundations of Information Management

CHAPTER. Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION. Database Planning and Database Architecture

Oracle Database 10g: Introduction to SQL

Objectives. Distributed Databases and Client/Server Architecture. Distributed Database. Data Fragmentation

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

Fundamentals of Database Design

SQL Tables, Keys, Views, Indexes

Overview RDBMS-ORDBMS- OODBMS

How To Manage Data In A Database System

Master of Science (M.S.), Major in Software Engineering

IT2305 Database Systems I (Compulsory)

Transcription:

ECS 165A: Introduction to Database Systems Todd J. Green based on material and slides by Michael Gertz and Bertram Ludäscher Winter 2011 Dept. of Computer Science UC Davis

ECS-165A WQ 11 1 1. Introduction to Relational Databases What is a Database System? In this class we will learn about Databases (DBs) and Database Management Systems (DBMSs) A Database is a (typically very large) integrated collection of interrelated data which are stored in a persistent format (files). Data describe information and activities about one or more related organizations (portion of the real world). For example, a university database might contain information about entities (e.g., students, courses, faculties,... ) relationships among entities (e.g., Bill is taking ECS 165A ) A Database Management System is a collection of software packages designed to store, access, and manage databases. It provides users and applications with an environment that is convenient, efficient, and reliable.

ECS-165A WQ 11 2 File System versus DBMS File processing approach: prominent approach supported by conventional Operating Systems for data intensive application programs in the 60 s and 70 s (and even sometimes today). In the file processing approach, each application uses its own files: Applications Applications Products Customers Products Suppliers Drawbacks: Data are stored redundantly in many files using different formats ( = inconsistencies among data, because changes are not coordinated) No transaction management and concurrency control to support multiple users Difficult to access data (no high-level query languages) No security mechanisms (OS file permissions are not enough!) No recovery mechanisms Program data dependence ( = high maintenance costs) Poor data modeling concepts...

ECS-165A WQ 11 3 Purpose of a Database System Data Integration All data are uniformly managed. Efficient Data Access Database languages are provided to store, access and manage data. Data Dictionary Contains all data about objects and structures of the database (metadata) User/Application-Views Different views for different users and applications Integrity Constraints are enforced by the DBMS. Security Mechanisms to protect data from security threats Transactions combine sets of operations on data into logical atomic units Synchronization of concurrent user transactions Recovery of data after system crash ad-hoc queries, report generation, interfaces to other database systems, interfaces for application programming,...

ECS-165A WQ 11 4 Trends in Database Systems Some Database Application Settings EOS NASA s Earth Observation System: Petabyte-sized databases, thousands of customers and applications E-Commerce and Financial Applications: Integration of heterogeneous information sources (e.g., catalogs) Health-Care Information Systems and Electronic Patient Record: Integration of heterogeneous forms of legacy data Digital Libraries & Digital Publishing: Management and delivery of large bodies of textual and multimedia data Collaborative Work and Design: Integration of heterogeneous information sources, concurrency control, workflows Trends that Affect Database Management Systems Record-based data has been joined by various kinds of semistructured and multimedia data Information Superhighway: Web = Constantly growing collection of heterogeneous information sources High bandwidth, more storage capacity, high performance computing... Challenges Data management in sensor networks (e.g., RFID) Grid computing Integration of multimedia objects and standard data User interfaces development, information visualization Distribution, heterogeneity, complexity of data; security and privacy; data integration and conversion; data quality,...

ECS-165A WQ 11 5 Why Study Database Systems? Shift from DBS as a specialized application to central component of modern computing environments ( Data and Information Science ) Shift from computation to information at the low end, we have a very messy Web space containing hundreds of thousands of information sources at the high end, we have various needs for scientific applications Datasets are increasing in diversity, complexity, and volume Digital Libraries, E-, Human Genome Project,... The need for (advanced) DBMS is exploding...!!! Database Systems encompass most of CS topics Operating Systems (file management, process management,... ) Theory (languages, algorithms, computation, complexity,... ) Artificial Intelligence (knowledge based systems, intelligent search,.. Software Engineering (application development, GUIs,... ) Multimedia (video on demand, audio, movies,... ) Logic (query languages, query optimization,... )

ECS-165A WQ 11 6 Databases are Ubiquitous

ECS-165A WQ 11 7 Different Views of Data A major purpose of a DBMS is to provide users with an abstract view of data, i.e. it hides details of how data are stored and maintained on a computer. View 1 View 2... View n Logical (or Conceptual ) Level Physical Level degree of abstraction Levels of Abstraction in a DBMS Physical Level describes how data records are actually stored and how files and indexes are organized and used Logical Level (sometimes also called Conceptual Level) describes what data are stored in the DBS in terms of entities and relationships; emphasis on logical structure of the database View Level describes how users and applications see the data Abstraction is achieved by describing each level in terms of a database schema, which, in turn, is based on a data model

ECS-165A WQ 11 8 Data Models, Schemas, and Instances A Data Model is a collection of concepts for describing data and relationships among data data semantics and data constraints Object-Based logical Models Entity-Relationship (ER) Model Object-Oriented (OO) Model Record-Based logical Models Relational Model Network Model Hierarchical Model A database schema is a description of a particular collection of data, using a given data model. An instance of a database schema is the actual content of the database at a particular point in time. Schemas exist at different levels of abstraction Conceptual (or Logical) Schema: typically builds the basis for designing a database (main focus in this course) View (or External) Schemas: typically determined during requirements analysis (often require integration into one conceptual schema) Physical Schema: storage structures associated with relations

ECS-165A WQ 11 9 Example: University Database Conceptual Schema: can be based on Entity-Relationship, Object-Oriented, or Relational Model. Example of an Entity-Relationship schema: major address sid name dob grade cid cname credits Students Enrolled Courses Relational schema: Students(sid : integer, name : string, major : string, address : string, dob : date) Courses(cid : integer, cname : string, credits : integer) Enrolled(sid : integer, cid : integer, grade : string) Physical Schema: Relations are stored as unordered files Index on first column of Students External Schemas (Views): Course Info(cid : integer, enrollment : integer)

ECS-165A WQ 11 10 Data Independence Ability to modify definition of schema at one level without affecting a schema definition at a higher level Achieved through the use of three levels of data abstraction (also called three level schema architecture) Logical Data Independence: Ability to modify logical schema without causing application programs to be rewritten Physical Data Independence: Ability to modify physical schema without causing logical schema or applications to be rewritten (occasionally necessary to improve performance)

ECS-165A WQ 11 11 Database Languages A Database Management System offers two different types of languages Data Definition Language (DDL) Specification language (notation) for defining a database schema; includes syntax and semantics DDL compiler generates set of tables stored in the DBMS s data dictionary (contains metadata, i.e. data about data ) Data storage and definition language special type of DDL in which storage structures and access methods used by the DBS are specified Data Definition in SQL (Structured Query Language): create table students( sid number, name char(70), major char(50), dob date, address char(100)); Data Manipulation Language (DML) Language for accessing and manipulating the data that is organized according to underlying data model Two classes of languages Procedural user specifies how required data is retrieved Declarative user specifies what data is required without specifying how to get those data (declarative ˆ= non-procedural)

ECS-165A WQ 11 12 Transaction Management A transaction is an atomic sequence of database operations that perform a logical function in a database application. Transaction-management component of DBMS ensures that the DB remains in a consistent (correct) state despite system failures (e.g., system crash, power failure) and transaction failures. Concurrency control manager controls interaction among concurrent user transactions to ensure the (read) consistency of the database. Storage Management The storage manager is a DBMS software component that implements interface between low-level data stored in a database (files) and the application programs and queries submitted to the system. The storage manager is responsible for the following tasks: interaction with the operating system s file manager efficient storage, retrieval, and update of the data

ECS-165A WQ 11 13 Database Administrator Coordinates all the activities with respect to the design and implementation of the database on a DBMS; has a good understanding of the enterprise s information resources and needs. Database administrator s (sometimes designer s) duties include: Schema definition (conceptual schema, external schema) Specifying integrity constraints Specifying storage structures and access method (physical schema) Modifying the schema and physical organization Granting user privileges and managing user roles (security) Monitoring performance and responding to changes in requirements Database Users Users are differentiated by the way they interact with the system Application programmers: interact with system through DML and DDL calls Sophisticated users: formulate requests in a database query language Specialized users: write specialized database applications that do not fit into the traditional data processing framework Naive users: invoke one of the permanent application programs that have been written previously

ECS-165A WQ 11 14 Anatomy of a DBMS