Introduction to Databases CS348

Similar documents
Overview of Data Management

Overview of Data Management

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

Chapter 1 Introduction

Database Fundamentals Chapter 1

DISCUSSION 5min 2/24/2009. DTD to relational schema. Inlining. Basic inlining

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Chapter 1: Introduction

Introduction Database Concepts

Outline. Quick Introduction to Database Systems. Data Manipulation Tasks. What do they all have in common? CSE142 Wi03 G-1

Outline. Database Management Systems (DBMS) Database Management and Organization. IT420: Database Management and Organization

Introduction. Random things to do after this course. Course roadmap. CPS 116 Introduction to Database Systems

The Relational Model

Chapter 1: Introduction

Introduction. Example Databases

Introduction. Who wants to study databases?

Databases and Database Management Systems

The functions performed by a typical DBMS are the following:

Why are you here? Introduction. Course roadmap. Course goals. What do you want from a DBMS? What is a database system? Aren t databases just

A bit of Databases history

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

An Introduction to Databases and Database Management Systems.

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Chapter 1: Introduction. Chapter 1: Introduction

CSE 544 Principles of Database Management Systems. Lecture 4: Data Models a Never-Ending Story

Database System Concepts and Architecture

Outline. Definitions History Basic concepts of DBMS Data Models Relational database Normalization

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Introduction to Database Systems

Fundamentals of Information Systems, Seventh Edition

COSC 304 Introduction to Database Systems. Database Introduction. Dr. Ramon Lawrence University of British Columbia Okanagan

DATABASE TECHNOLOGY - 1DL124

Chapter 1: Introduction

CSE 544 Principles of Database Management Systems. Fall 2016 Lecture 4 Data models A Never-Ending Story

Introduction to Databases

Part I: Structured Data

Chapter 1: Introduction

What is database? Types and Examples

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Question Bank. 4) It is the source of information later delivered to data marts.

Part I What are Databases?

Review for Exam 1 CS474 (Norton)

1. Data Model, Categories, Schemas and Instances. Outline

Introduction to Data Management. Lecture #1 (Course Trailer ) Instructor: Chen Li

CS630. Object-Oriented DBMS Fundamentals. Les Waguespack, Ph.D. LJW 2014 : OODBMS::

MaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK

Department of Information Technology B.E/B.Tech : CSE/IT Regulation: 2013 Sub. Code / Sub. Name : CS6302 Database Management Systems

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Relational Databases Fall 2017 Lecture 1

Fundamentals of Physical Design: State of Art

Database Technology Introduction. Heiko Paulheim

Fundamentals of. Database Systems. Shamkant B. Navathe. College of Computing Georgia Institute of Technology PEARSON.

Bottom line: A database is the data stored and a database system is the software that manages the data. COSC Dr.

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1

The Relational Data Model. Data Model

Relational Database Systems Part 01. Karine Reis Ferreira

Practical Database Design Methodology and Use of UML Diagrams Design & Analysis of Database Systems

Introduction to Data Management. Lecture #2 (Big Picture, Cont.) Instructor: Chen Li

CSE 544 Data Models. Lecture #3. CSE544 - Spring,

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

745: Advanced Database Systems

Data, Databases, and DBMSs

Upon completion of this Unit, the students will be introduced to the following

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Outline. Databases and DBMS s. Recent Database Applications. Earlier Database Applications. CMPSCI445: Information Systems.

UNIT I. Introduction

Goals for Today. CS 133: Databases. Final Exam: Logistics. Why Use a DBMS? Brief overview of course. Course evaluations

Database Applications (15-415)

Fundamentals of Design, Implementation, and Management Tenth Edition

CS 146 Database Systems

Introduction to Database Systems. Fundamental Concepts

Lecture 1: Introduction

BIS Database Management Systems.

Chapter 2. DB2 concepts

MIS Database Systems.

EECS 647: Introduction to Database Systems

DBM/500 COURSE NOTES

Introduction to Data Management. Lecture #1 (Course Trailer )

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

Database Principle. Zhuo Wang Spring

COMP 3400 Mainframe Administration 1

Databases. Jörg Endrullis. VU University Amsterdam

CSE2004 Database Management Systems

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

Introduction to CS 4604

Introduction to Data Management. Lecture #2 (Big Picture, Cont.)

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 1-1

UVA. Database Systems. Need for information

SE352b: Roadmap. SE352b Software Engineering Design Tools. W5: Database Technology. Database Technology

U1. Data Base Management System (DBMS) Unit -1. MCA 203, Data Base Management System

CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I

Course Book Academic Year

Part III. Data Modelling. Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1

1/19/2012. Finish Chapter 1. Workers behind the Scene. CS 440: Database Management Systems

Databases: Why? Databases: What? Databases: How? DATABASE DESIGN I - 1DL300

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Assignment Session : July-March

A REVIEW OF BASIC KNOWLEDGE OF DATABASE SYSTEM

Transcription:

Introduction to Databases CS348 University of Waterloo Winter 2007 University of Waterloo () Introduction to Databases 1 / 20

Course Outline Why do we use Databases? How do we use a DBMS? Functionality provided by a DBMS. Models of databases: Network, Relational, OO. Relational model, logic-based query languages. SQL Embedding of query languages and applications. Relational algebra and query execution. Transactions and Recovery. How do we design databases? Data Modeling: The Entity-Relationship (ER) model. Data anomalies and Normal forms. Basic physical design. University of Waterloo () Introduction to Databases 2 / 20

What is a Database? Definition (Database) A large and persistent collection of (more-or-less similar) pieces of information organized in a way that facilitates safe and efficient retrieval and modification. a file cabinet a library system a personnel management system... Definition (Database Management System (DBMS)) A program (or set of procedures) that does the above. University of Waterloo () Introduction to Databases 3 / 20

Application of Databases Original More recent inventory control payroll banking and financial systems reservation systems computer aided design (CAD) software development (CASE) telecommunication systems e-commerce University of Waterloo () Introduction to Databases 4 / 20

Common Circumstances There is lots of data (mass storage) Data is formatted (lots of similar records)... and important persistence and reliability efficient and concurrent access Note the data maintained by the system are much much more important and valuable then the system itself. Issues: many files with different structure shared files or replicated data need to exchange data (translation programs) University of Waterloo () Introduction to Databases 5 / 20

Common Circumstances There is lots of data (mass storage) Data is formatted (lots of similar records)... and important persistence and reliability efficient and concurrent access Note the data maintained by the system are much much more important and valuable then the system itself. Issues: many files with different structure shared files or replicated data need to exchange data (translation programs) University of Waterloo () Introduction to Databases 5 / 20

Database Management Systems Idea Abstracts common functions and creates a uniform well defined interface for applications accessing data. 1 Uniform Data Model all data stored in a well defined way 2 Access control only authorized people get to see/modify it 3 Concurrency control manage concurrent access the database 4 Database recovery nothing gets accidentally lost 5 Database maintenance University of Waterloo () Introduction to Databases 6 / 20

Data Independence Idea Applications do not access data directly but, rather through an abstract data model provided by the DBMS. Indirect access supports: advanced data structures data restructuring distribution and load balancing... all without changes to applications. University of Waterloo () Introduction to Databases 7 / 20

Three Level Schema Architecture Definition (Schema) A schema is a description of the data interface to the database (i.e., how the data is organized). 1 External schema (view): what the application programs and user see. May differ for different users of the same database. 2 Conceptual schema: description of the logical structure of all data in the database. 3 Physical schema: description of physical aspects (selection of files, devices, storage algorithms, etc.) Definition (Instance) A database instance is a database (real data) that conforms to a given schema. University of Waterloo () Introduction to Databases 8 / 20

Three-level Schema Architecture (cont.) App 1 App 2... App n D B M S VIEW 1... VIEW k CONCEPTUAL SCHEMA PHYSICAL DATABASE University of Waterloo () Introduction to Databases 9 / 20

Transactions Idea Every application may think they are the sole application accessing the data. The DBMS guarantees correct execution. Example: withdraw(ac,1000) Bal := getbal(ac) if (Bal>1000) <give-money> setbal(ac,bal-1000) withdraw(ac,500) Bal := getbal(ac) if (Bal>500) <give-money> setbal(ac,bal-500) University of Waterloo () Introduction to Databases 10 / 20

Recovery Idea Whenever the DBMS acknowledges a data item was stored in the database, then it won t disappear due to crash/power failure/... Synchronous writes to permanent storage? too inefficient buffer cache (not completely safe) what needs to be written and in what order What happens after, e.g., power failure? logs and recovery restarting transactions University of Waterloo () Introduction to Databases 11 / 20

Users of DBMS Three types of users: 1 end user/application developer queries/updates data in a database or develops applications for doing that 2 database administrator (DBA) designs/maintains database schema decides on physical layout of the DB monitors and tunes DBMS performance sets access policies 3 database implementor (e.g., at IBM) implements a (parts of) a DBMS University of Waterloo () Introduction to Databases 12 / 20

A Brief History of DBMS: 1960s and 1970s hierarchical data model IBM s Information Management System (IMS) data organized as a tree edges (pointers) represent relationships access by following (next) pointers queries are difficult to write low level of data independence COBOL Conference On DAta Systems Languages (CODASYL) model, a.k.a. the network model Codd s relational data model proposal (1970) and ensuing debate Chen s E-R model (1976) Initial development of transaction concepts IBM s System R and UC Berkeley s Ingres systems demonstrate feasibility of relational DBMS (late 1970s) University of Waterloo () Introduction to Databases 13 / 20

A Brief History of DBMS: 1980s development and deployment of commercial relational technology DB2 (IBM) Informix Oracle Sybase SQL standardization efforts through ANSI and ISO object-oriented database management systems persistent objects object id s, methods, inheritance navigational interface reminiscent of the network model University of Waterloo () Introduction to Databases 14 / 20

A Brief History of DBMS: 1990s-present continued expansion of SQL standard and DBMS feature sets new application domains, e.g., On-Line Analytic Processing (OLAP), data warehousing object-relational capabilities user-defined types within relational framework World Wide Web information retrieval (keywords, ranked results) extensible Markup Language (XML), XPath, XQuery semantic web (RDF, OWL,...) University of Waterloo () Introduction to Databases 15 / 20

Relational Databases Idea all information is organized in (flat) relations. This provides an abstract interface to the stored data. elements (data items): without preassigned meaning A relation is a set of records of data items information is captured solely by membership in relations the database doesn t understand the data, it has to be interpreted by the user A database is a (finite) set of (finite) relations. University of Waterloo () Introduction to Databases 16 / 20

A Relation Department DeptNo DeptName MgrNo AdmrDept A00 Planning 000020 A00 E01 Support Services 000050 A00 E11 Operations 000090 E01 E21 Software Support 000100 E01 University of Waterloo () Introduction to Databases 17 / 20

Schema and Instance The schema of a relational database includes the schemas of its relations. The schema of a relation includes the relation s name, the names of its attributes, and their associated domains. Schemas may also include additional integrity constraints, which constrain possible the database instances. An instance of a relation is a set of tuples conforming to the schema. A database instance is a set of relation instances conforming to the schema. University of Waterloo () Introduction to Databases 18 / 20

Constraints a constraint is a rule that restricts the tuples that may appear in a database instance common examples: primary key constraints, foreign key constraints a primary key constraint for a relation R specifies a set of attributes of R whose values can be used to uniquely identify any tuple in R, i.e., no two tuples in R can have the same values for the key attribute(s) a foreign key constraint specifies that values found in foreign key columns in a referencing relation R 1 must appear as primary keys in a referenced relation R 2 University of Waterloo () Introduction to Databases 19 / 20

Relational Languages Idea Relations describe what items are related. Queries are questions about such relationships. Features: independent (logic based) semantics closure: results of queries are relations different ways to implement queries query optimization data definition and modification have similar features University of Waterloo () Introduction to Databases 20 / 20