Database Management Systems MIT Introduction By S. Sabraz Nawaz

Similar documents
Database Management Systems MIT Lesson 01 - Introduction By S. Sabraz Nawaz

MIT Database Management Systems Lesson 01: Introduction

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Database Management Systems. Chapter 1

CS275 Intro to Databases. File Systems vs. DBMS. Why is a DBMS so important? 4/6/2012. How does a DBMS work? -Chap. 1-2

BBM371- Data Management. Lecture 1: Course policies, Introduction to DBMS

Database Applications (15-415)

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

Database Systems ( 資料庫系統 ) Practicum in Database Systems ( 資料庫系統實驗 ) 9/20 & 9/21, 2006 Lecture #1

Database Management System. Fundamental Database Concepts

Introduction and Overview

9/8/2018. Prerequisites. Grading. People & Contact Information. Textbooks. Course Info. CS430/630 Database Management Systems Fall 2018

Introduction and Overview

Introduction to Database Systems

Lecture 2 08/26/15. CMPSC431W: Database Management Systems. Instructor: Yu- San Lin

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

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

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

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

CMPUT 291 File and Database Management Systems

Quick Facts about the course. CS 2550 / Spring 2006 Principles of Database Systems. Administrative. What is a Database Management System?

CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris

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

Introduction to Data Management. Lecture #2 Intro II & Data Models I

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement

Introduction to Data Management. Lecture #4 (E-R Relational Translation)

Introduction to Database Concepts. Department of Computer Science Northern Illinois University January 2018

CS430/630 Database Management Systems Spring, Betty O Neil University of Massachusetts at Boston

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

CAS CS 460/660 Introduction to Database Systems. Fall

Chapter 1: Introduction

Database Systems Introduction

Introduction to Database Management Systems

Data about data is database Select correct option: True False Partially True None of the Above

Databases and Database Management Systems

Chapter 1. Introduction of Database (from ElMasri&Navathe and my editing)

Big Data Processing Technologies. Chentao Wu Associate Professor Dept. of Computer Science and Engineering

Introduction: Databases and. Database Users

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

Introduction to Database Systems. Chapter 1. Instructor: . Database Management Systems, R. Ramakrishnan and J. Gehrke 1

Introduction to Data Management. Lecture #5 Relational Model (Cont.) & E-Rà Relational Mapping

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

COMP3311 Database Systems

DATABASTEKNIK - 1DL116

MIT Database Management Systems Lesson 03: Entity Relationship Diagrams

Database Applications (15-415)

Announcements. PS 3 is out (see the usual place on the course web) Be sure to read my notes carefully Also read. Take a break around 10:15am

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

Introduction: Databases and Database Users. Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1

Introduction to Data Management. Lecture #4 (E-R à Relational Design)

Conceptual Design. The Entity-Relationship (ER) Model

Page 1. Goals for Today" What is a Database " Key Concept: Structured Data" CS162 Operating Systems and Systems Programming Lecture 13.

Introduction to Database Systems CS432. CS432/433: Introduction to Database Systems. CS432/433: Introduction to Database Systems

COMP Instructor: Dimitris Papadias WWW page:

Introduction to Data Management. Lecture #4 E-R Model, Still Going

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

The Relational Model Constraints and SQL DDL

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

Chapter 1. Types of Databases and Database Applications. Basic Definitions. Introduction to Databases

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

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Chapter 1: Introduction

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

CS 146 Database Systems

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

Introduction: Database Concepts Slides by: Ms. Shree Jaswal

LECTURE1: PRINCIPLES OF DATABASES


The Relational Model. Chapter 3. Database Management Systems, R. Ramakrishnan and J. Gehrke 1

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

CMPT 354 Database Systems I. Spring 2012 Instructor: Hassan Khosravi

CIS 330: Web-driven Web Applications. Lecture 2: Introduction to ER Modeling

LAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD

Introduction to Database Systems. Motivation. Werner Nutt

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang

Introduction. Example Databases

The Relational Data Model. Data Model

Database Technology Introduction. Heiko Paulheim

Data! CS 133: Databases. Goals for Today. So, what is a database? What is a database anyway? From the textbook:

Database Management Systems Chapter 1 Instructor: Oliver Schulte Database Management Systems 3ed, R. Ramakrishnan and J.

Data Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau

Database Systems. Lecture2:E-R model. Juan Huo( 霍娟 )

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

Modeling Your Data. Chapter 2. cs542 1

CMPSCI445: Information Systems

D.Hemavathi & R.Venkatalakshmi, Assistant Professor, SRM University, Kattankulathur

Course Logistics & Chapter 1 Introduction

Overview of Data Management

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

Concepts Of Database Management 7th Edition Pratt

CS275 Intro to Databases

Introduction to SET08104

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald

Review. The Relational Model. Glossary. Review. Data Models. Why Study the Relational Model? Why use a DBMS? OS provides RAM and disk

Chapter 1 Chapter-1

Database Applications (15-415)

Page 1. Quiz 18.1: Flow-Control" Goals for Today" Quiz 18.1: Flow-Control" CS162 Operating Systems and Systems Programming Lecture 18 Transactions"

COSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1

DBMS and its Architecture

Introduction to Database Systems (1)

Transcription:

Database Management Systems MIT 22033 Introduction By S. Sabraz Nawaz

Recommended Reading Database Management Systems 3 rd Edition, Ramakrishnan, Gehrke Murach s SQL Server 2008 for Developers Any book that is on SQL Server development as well as any book that is on database 2

Introduction What is a database? A database is a collection of related data (examples???) A database management system (DBMS) is a software package designed to create and maintain databases (examples?) 3

Introduction (contd ) The DBMS is a general-purpose software system facilitates the processes of Defining Specifying the data types, structures, and constraints for the data to be stored in the database. Constructing The process of storing the data itself on some storage medium that is controlled by the DBMS. Manipulating Manipulating a database includes such functions as querying the database to retrieve specific data, updating the database to reflect changes, and generating reports from the data. 4

Examples Today, DBMSs are an essential part of any Enterprise Information System University Database Credit Card Processing Systems Airline Reservation Systems Banking System 5

Example: University DB University database maintaining information concerning: Students, Courses, and Grades 6

Example: University DB (contd ) It shows the database structure and a few sample data. It is organized as five files. The STUDENT file data on each student, The COURSE file data on each course, The SECTION file data on each section of a course, The GRADE_REPORT file data on grades that students receive in the various sections they have completed, and The PREREQUISITE file data on prerequisite of each course. 7

Need for a DBMS Traditional File System provided by the Operating System is insufficient to meet the requirements of enterprise applications scenario: A company has a large collection (500 GB) of data on database. This data is accessed concurrently by several employees. Questions about the data must be answered quickly, changes made to the data by different users must be applied consistently, and access to certain parts of the data must be restricted. 8

Advantages of using a DBMS Data independence Efficient data access Data integrity and security Easy data administration Concurrent access, recovery from crashes Reduced application development time 9

Levels of Abstraction in a DBMS(contd) DBMS is described at three levels of abstraction: External Schema many views describe how users see the data Conceptual Schema View 1 View 2 View 3 defines logical structure Physical Schema describes the files and indexes used Conceptual Schema Physical Schema Note: Information about the schemas is stored in the system catalog DISK 10

Levels of Abstraction in a DBMS(contd) Conceptual schema describes the stored data in terms of the data model of the DBMS in a relational DBMS, the conceptual schema describes all relations that are stored in the database 11

Levels of Abstraction in a DBMS(contd) Physical schema describe storage details summarizes how the relations described in the conceptual schema are actually stored on secondary storage devices such as disks and tapes decide what file organizations used to store the relations create indexes to speed up data retrieval operations 12

Levels of Abstraction in a DBMS(contd) External schemas allow data access to be customized (and authorized) at the level of individual users or groups of users any given database has exactly one conceptual schema and one physical schema because it has just one set of stored relations, but it may have several external schemas 13

Data independence Application programs are independent of data representation and storage details. The structure of data files is stored in the DBMS catalog separately from the access programs. E.g. a file access program may be written in such a way that it can access only STUDENT records of the structure. 14

Data independence (cont) To add another piece of data to each STUDENT record, say Birthdate, need to change the description of STUDENT records in the catalog to reflect the inclusion of the new data item Birthdate; no program changed. The next time a DBMS program refers to the catalog, the new structure of STUDENT records will be accessed and used. 15

Efficient data access DBMS utilises sophisticated techniques to store and retrieve data efficiently, including support for very large files, index structures and query optimisation. Storage methods can be improved without changing the application programs 16

Data integrity and security DBMS can enforce integrity constraints on the data e.g., checking salary increase against dept budget Access controls govern what data is visible to different class of users 17

Easy data administration Centralising administration of data shared among many users - data managed by professionals Organise data to - meet user needs - minimise redundancy Fine tuning of storage for efficient retrieval 18

Concurrent access and Crash recovery Concurrent accesses are scheduled by DBMS - users can think of the data as being accessed by one user at a time DBMS protects users from the effects of system failure 19

Reduced application development time DBMS supports many functions common to applications that access the database These applications are likely to be more robust than applications developed from scratch because many important tasks are handled by DBMS instead of being implemented by the application 20

When NOT to use a DBMS High initial investment (DBMS is an expensive software package) Applications use small amounts of data Lack of resources (disk space, memory, etc.) to support a database Single-user applications Overhead for flexible querying, security, concurrent access & crash recovery is not required 21

Describing & Storing Data in a DBMS A data model is a collection of high-level data description constructs used to model the application domain Data model hides the low-level storage details Most commercial database systems are based on the relational data model 22

Describing & Storing Data in a DBMS However, it is easier to use a semantic data model to model an application domain. A well-known semantic data model is the Entity Relationship (ER) Model 23

Describing & Storing Data in a DBMS In relational data model, the main construct is a relation. A relation has fields that belong to it which contain the name & data type of each field A description of data in terms of a data model is called the schema. Every relation has a schema, which describes the name of the relation, name of each attribute (field or column), and the type of each column. e.g. Students(sid: string, name: string, login: string, age: integer, gpa: real) 24

An example instance of the Students relation SID Name Login Age GPA 53666 SaNa sana@email.com 33 3.9 53668 Kumar kumar@fmail.com 29 3.2 53670 Sanath sanath@matara.com 41 3.8 25

Describing & Storing Data in a DBMS In addition to relational data model Hierarchical model Network model Object oriented model Object relational model 26

Queries In A DBMS With reference to a fictitious university database 1. What is the name of the student with student ID 123456? 2. What is the average salary of lecturers who teach the course with course ID CS564? 3. How many students are enrolled in course CS564? 4. Is there any student with a GPA less than 3.0 enrolled in course CS564? These questions involving the data stored in a DBMS are called queries 27

Queries In A DBMS A DBMS provides a specialized language, called the query language in which queries can be posed Relational calculus is a formal query language based on mathematical logic Relational algebra is another formal query language, based on a collection of operators for manipulating relations, which is equivalent in power to the calculus 28

Database Design Process 29

Database Design Process Database design process can be divided into 6 major steps: (given in Raghu s text book) Requirements Analysis Security Design Conceptual Database Design Physical Database Design Logical Database Design Schema Refinement 30

Requirements Analysis This step answers the following question: What users want from the database? - what is going to be stored in the database - what applications are going to be built on top the database - what are the most frequently asked queries Requirements Analysis 31

Requirements Analysis Result: A well-written concise document enumerating the user s requirements Requirements Analysis 32

Requirements Analysis For example: a library database Data to be stored can be Record of all books in the library Record of members of the library o o o Students Faculty Other members Record members borrowing information Requirements Analysis 33

Requirements Analysis Some applications on top of the database can be Renewal service (may be online) Borrowing-Lending service Resource reservation system (may be on-line) Resource request service (may be on-line) Requirements Analysis 34

Conceptual Database Design The information gathered in the requirements analysis phase is used to create a high-level description of the data in a conceptual data model. (Semantic Data Model, e.g. E-R Diagram ) Requirements Analysis Conceptual Database Design 35

Logical Database Design In this step, we determine the DBMS to implement the database & also the data model We utilize the conceptual schema created in the previous step and convert it into a schema of a particular data model (e.g. Relational Database Schema) Logical Database Design Requirements Analysis Conceptual Database Design 36

Schema Refinement The schema created by the logical database design phase is further refined for potential problems such as redundancies (e.g. Normalization) Schema Refinement Requirements Analysis Conceptual Database Design Logical Database Design 37

Physical Database Design In this step, performance criteria are taken into consideration and further enhancements to the schema & creation of indexes are considered Physical Database Design Requirements Analysis Conceptual Database Design Schema Refinement Logical Database Design 38

Security Design In this step, different user groups and their roles are identified. Appropriate levels of access are then provided to the data ensuring that users have access to only the necessary data. Security Design Requireme nts Analysis Conceptual Database Design Physical Database Design Logical Database Design Schema Refinement 39

The story is Requirements Analysis Security Design Conceptual Database Design ER Diagram Physical Database Design Logical Database Design Conceptual Schema or Logical Schema Schema Refinement 40

Assignment #01 1. What is a data model? Describe the data models with example 2. Clearly explain the architecture of a DBMS Submission Deadline 07/12/2012 Use IEEE Referencing Style 41

Questions? 42