Contents. Relational Model Data Definition Language (DDL) Data Manipulation Language (DML) SQL... 19

Similar documents
Chapter 1: Introduction. Database Management System (DBMS)

Introduction to database management systems

Database System Concepts

Chapter 1: Introduction

Chapter 1: Introduction

Introdução às Bases de Dados

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

Lesson 8: Introduction to Databases E-R Data Modeling

ECS 165A: Introduction to Database Systems

CSE 132A. Database Systems Principles

1 File Processing Systems

CSE 233. Database System Overview

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

Overview of Data Management

Author: Abhishek Taneja

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

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

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Overview of Database Management

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

Chapter 2 Database System Concepts and Architecture

DATABASE MANAGEMENT SYSTEMS. Question Bank:

Database Systems Introduction Dr P Sreenivasa Kumar

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

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

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

IT2305 Database Systems I (Compulsory)

INTRODUCTION DATABASE MANAGEMENT SYSTEMS

Relational Database Systems 2 1. System Architecture

Introduction to Databases


Database Management. Chapter Objectives

Introductory Concepts

Foundations of Information Management

Database Systems. Lecture 1: Introduction

IT2304: Database Systems 1 (DBS 1)

COURSE NAME: Database Management. TOPIC: Database Design LECTURE 3. The Database System Life Cycle (DBLC) The database life cycle contains six phases;

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

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

Database Management Systems. Chapter 1

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

Chapter 1 Databases and Database Users

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

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

Databases What the Specification Says

Foundations of Information Management

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

Database Management Systems

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

Introduction: Database management system

DATABASE MANAGEMENT SYSTEM

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

Overview of Database Management Systems

Principles of Database. Management: Summary

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

Introduction to Databases

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

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

A Multidatabase System as 4-Tiered Client-Server Distributed Heterogeneous Database System

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

Introduction to Database Systems

BCA. Database Management System

? Database Management

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

COIS Databases

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

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

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Fragmentation and Data Allocation in the Distributed Environments

Module 3: File and database organization

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

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

Oracle USF

DIRECTORATE OF OPEN & DISTANCE LEARNING DATABASE MANAGEMENT SYSTEMS

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

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

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

DISTRIBUTED AND PARALLELL DATABASE

Basic Concepts of Database Systems

SQL is capable in manipulating relational data SQL is not good for many other tasks

Fundamentals of Database Design

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS

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

City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015

IST659 Database Admin Concepts & Management Syllabus Spring Location: Time: Office Hours:

FROM RELATIONAL TO OBJECT DATABASE MANAGEMENT SYSTEMS

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

Foundations of Business Intelligence: Databases and Information Management

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT

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

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

3. Relational Model and Relational Algebra

Course Notes on Databases and Database Management Systems

Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p.

Chapter 6: Integrity Constraints

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

BCS Higher Education Qualifications. Database Systems Syllabus

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

2. Basic Relational Data Model

Transcription:

Contents What you should know by the end of this session...3 Reference :...3 Textbook...3 Database System Concepts...3 Principles of Distributed Database Systems (2nd Edition)...4 Data Mining : Concepts and Techniques...4 Course Outline...4 Contents of the Course...5 Course Work...6 Introduction to Databases...6 Age of Information Technology (IT)...6 What is a Database Management System?...8 Database...8 Database Management System (DBMS)...9 Why study databases?...9 Why not use file systems?... 10 The three-level architecture... 11 ANSI/SPARC - The three-level architecture... 12 Schemas vs Instances... 12 Schemas and Instances... 13 Levels of database schemas... 14 Data Independence... 15 Introduction... 15 Data Models... 16 Entity-Relationship Model... 17 Relational Model... 17 Data Definition Language (DDL)... 18 Data Manipulation Language (DML)... 19 SQL... 19 1

Database Users... 20 Database Administrator (DBA)... 20 Transaction Management... 21 Storage Management... 21 Overall System structure... 22 Application Architectures... 22 Summary... 25 2

What you should know by the end of this session Text books Marking Course Outline Course Content Expected Course Work An Introduction to DBMS (Review) Reference : 1) Database System Concepts 2010 Silberschatz, Korth, Sudarshan 2) Distributed DBMS -1998 M. Tamer Özsu & Patrick Valduriez 3) Data Mining: Concepts and Techniques 2006 - Jiawei Han and Micheline Kamber Textbook Database System Concepts Silberschatz, Korth, Sudershan 4 th Edition, 2002 5 th Edition, 2005 6 th Edition, 2010 McGraw Hill 3

Principles of Distributed Database Systems (2nd Edition) by M. Tamer Ozsu (Author), Patrick Valduriez (Author) Data Mining : Concepts and Techniques Jiawei Han and Micheline Kamber Morgan Kaufmann Publishers, 2006. Course Outline Review 4

XML Technology Data warehouse & Data mining - Distributed Databases - Database System Contents of the Course Review o DBMS o ER model and Relational model o Relational Algebra and SQL Technologies and Concepts o Web and Databases o XML o DDBMS o Distributed databases Knowledge Discovery o DataWare house o Data Mining DataBase System o Query processing, Query Optimization, o Concurrency, Transaction, Recovery, Parallel DBs 5

Course Work Design + Implement a web based DB XML and DBMS Data mining and Dataware House DDBMS Paper Review + Translation What you should know? Database Design Introduction to Databases What is a database management system? Why study databases? Why not use file systems? The three-level architecture Schemas and instances Data models, E-R model, Relational model Data Definition Language, Data Manipulation Language SQL Transaction Management, Storage Management User types, database administrator System Structure Age of Information Technology (IT) Organizations need good managers 6

Good managers need good information to make good decisions Good decisions require good information Good information rests on good database design Good information is derived from raw facts known as raw data Raw data require good efficient data management Efficient data management requires the use of a computer database system Data management focuses on o Data collection o Storage o Retrieval 7

What is a Database Management System? A DBMS is a : History o Collection of data Interrelated data + Meta data Relevant to some purpose o A Software to access the data Convenient Efficient o 1950s-60s: magnetic tape and punched cards o 1960s-70s: hard disks, random access, file systems o 1970s-80s: relational model becoming competitive o 1980s-90s: relational model dominant, object-oriented databases o 1990s-00s: web databases and XML Database Database resembles a very well organized electronic filing cabinet in which powerful software, known as a Database Management System (DBMS), helps manage the cabinet s content. More formally: o A database is a structure that houses a collection of data as well as data about data known as metadata 8

The metadata provides a description of data characteristics and the set of relationships that link the data found within the database Thus hiding much of the database s internal complexity from the database user Database Management System (DBMS) DBMS is a collection of programs that manages the database (DB) structure and controls access to the data stored in the DB DBMS is the database software bought commercially, thus can not make design changes in the DBMS DBMS is the intermediary-translating user requests into the complex code required to fulfill those requests Why study databases? They touch every aspect of our lives Applications: o Banking: all transactions o Airlines: reservations, schedules 9

o Universities: registration, course enrolment, grades o Sales: customers, products, purchases o Manufacturing: production, inventory, orders, supply chain o Human resources: employee records, salaries, tax deductions o Telecommunications: subscribers, usage, routing o Computer accounts: privileges, quotas, usage o Records: climate, stock market, library holdings Why not use file systems? Data redundancy and inconsistency o Multiple file formats o Duplication of information in different files Difficulty in accessing data o Need to write a new program to carry out each new task Data isolation o Multiple files and formats Integrity problems o Integrity constraints (e.g. account balance > 0) become part of program code o Hard to add new constraints or change existing ones Maintenance problems 10

o When we add a new field, all existing applications must be modified to ignore it Atomicity of updates o Failures may leave database in an inconsistent state with partial updates carried out o E.g. transfer of funds from one account to another should either complete or not happen at all Concurrent access by multiple users o Concurrent accessed needed for performance o Uncontrolled concurrent accesses can lead to inconsistencies E.g. two people reading a balance and updating it at the same time o Security problems Database systems offer solutions to all the above problems The three-level architecture Internal level: how a record is stored on disk Conceptual/Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end; 11

External/View level: application-specific selections and arrangements of the data hide details of data types Views can also hide information for security reasons ANSI/SPARC - The three-level architecture Schemas vs Instances Schema o the logical structure of the database o e.g., the database consists of information about a set of customers and accounts and the relationship between them o Analogous to type information of a variable in a program Instance o the actual content of the database at a particular point in time o Analogous to the value of a variable 12

Physical Data Independence o the ability to modify the physical schema without changing the logical schema o Applications depend on the logical schema o Database engines take care of efficient storage and query processing Schemas and Instances Schema is the structure of a database o intention or meaning of the data o data models are schemas o table definitions are schemas o class definitions are schemas Instances are the contents of a database o extension or values of the data o objects are instances o objects in a database are typically rows in a table This is another important distinction for students to make. In particular, models are schemas and databases are full of instances. 13

Levels of database schemas Different schemas are presented to different users External View 1 External View 2 External View 3 External level logical to external mappings Logical Schema Logical level disk internal to logical mapping Internal Schema Internal level The pictures at the top level indicate that some views are for users, some for reports and some for application programs. The logical level is where the data is seen as being composed of tables. At the physical level, files are stored on disk. The mappings are specified by developers and because of the capabilities of DBMSs, no programs must be written to support these levels. 14

Data Independence Logical data independence o Change in conceptual schema does not require change in external schemas o Expand or contract database with no change to external applications o View mappings must be changed Physical data independence o Change in internal schema does require change in conceptual schema o Reorganize the file and index structure, especially for improved performance o Conceptual mapping must be changed o the ability to modify the physical schema without changing the logical schema Emphasizing the importance of the previous diagram. Changes in one level are isolated to the interfaces between levels and don t have to be propagated. Introduction Overview of Database Technology o What is a database management system? o Why study databases? Why not use file systems? 15

o The three-level architecture o Schemas and instances o Data models, E-R model, Relational model o Data Definition Language, Data Manipulation Language o SQL o Transaction Management, Storage Management o User types, database administrator o System Structure Data Models A collection of tools for describing o data o data relationships o data semantics o data constraints Entity-Relationship model Relational model Other models: o object-oriented model o semi-structured data models (XML) o Older models: network model and hierarchical model 16

Entity-Relationship Model Example of schema in the entity-relationship model Relational Model Example of tabular data in the relational model 17

A Sample Relational Database Data Definition Language (DDL) Specification notation for defining the database schema o E.g. create table account ( account-number char(10), balance integer) 18

DDL compiler generates a set of tables stored in a data dictionary: o Database schema o Specification of storage structures and access methods Data Manipulation Language (DML) Language for accessing and manipulating the data organized by the appropriate data model o DML also known as query language Two classes of languages o Procedural user specifies what data is required and how to get those data o Nonprocedural user specifies what data is required without specifying how to get those data SQL is the most widely used query language SQL SQL: widely used non-procedural language o E.g. find the name of the customer with customer-id 192-83-7465 select customer.customer-name from customer where customer.customer-id = 192-83-7465 o E.g. find the balances of all accounts held by the customer with customer-id 192-83-7465 select account.balance from depositor, account 19

where depositor.customer-id = 192-83-7465 and depositor.account-number = account.account-number Application programs generally access databases through: o Language extensions to allow embedded SQL (e.g. PHP) o Application program interface (e.g. ODBC) which allow SQL queries to be sent to a database Database Users Users are differentiated by the way they expect to interact with the system Application programmers interact with system through DML calls Sophisticated users form requests in a database query language Specialized users write specialized database applications that do not fit into the traditional data processing framework ( GIS) Naïve users invoke one of the permanent application programs that have been written previously o E.g. people accessing database over the web, bank tellers, clerical staff Database Administrator (DBA) Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise s information resources and needs. Database administrator's duties include: o Schema definition 20

o Storage structure and access method definition o Schema and physical organization modification o Granting user authority to access the database o Specifying integrity constraints o Acting as liaison with users o Monitoring performance and responding to changes in requirements Transaction Management A transaction is a collection of operations that performs a single logical function in a database application o E.g. transfer funds from one account to another Transaction-management component ensures that the database remains in a consistent state despite system failures Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database. o E.g. simultaneous withdrawals Storage Management Storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible to the following tasks: o interaction with the file manager 21

o efficient storing, retrieving and updating of data Overall System structure Application Architectures 22

Two-level architecture: E.g. client programs using ODBC/JDBC to communicate with a database Three-level architecture: E.g. web-based applications, and applications built using middleware 23

24

Summary Overview of Database Technology o What is a database management system? o Why study databases? Why not use file systems? o The three-level architecture o Schemas and instances o Data models, E-R model, Relational model o Data Definition Language, Data Manipulation Language o SQL o Transaction Management, Storage Management o User types, database administrator o System Structure 25