Introduction: Database Concepts Slides by: Ms. Shree Jaswal

Similar documents
Database Management System. Fundamental Database Concepts

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

Introduction: Databases and. Database Users

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

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

Database System Concepts and Architecture

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

Copyright 2004 Pearson Education, Inc.

Databases and Database Management Systems

Course Logistics & Chapter 1 Introduction

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

UNIT I. Introduction

Databases & Database Users

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

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

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

Database System Concepts

Chapter 1: Introduction. Chapter 1: Introduction

LECTURE1: PRINCIPLES OF DATABASES

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

DBMS (FYCS) Unit - 1. A database management system stores data in such a way that it becomes easier to retrieve, manipulate, and produce information.

Database System Concepts and Architecture

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

Chapter 1: Introduction

Chapter 1: Introduction

Database Management Systems (CPTR 312)

Database Management System

Chapter 1: Introduction

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

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

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

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

Introduction Database Concepts

CSE2004 Database Management Systems

Chapter 1: Introduction

Chapter 1 Introduction

Chapter 1 Chapter-1

DATABASE MANAGEMENT SYSTEM ARCHITECTURE

Fundamentals of Database Systems (INSY2061)

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

Database Management System (15ECSC208) UNIT I: Chapter 1: Introduction to DBMS and ER-Model

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

CS 338 Databases and Database Users INTRODUCTION

Database Systems Concepts *

Database systems. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

The functions performed by a typical DBMS are the following:

Database Technology Introduction. Heiko Paulheim

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

SYLLABUS (R15A0509) DATABASE MANAGEMENT SYSTEMS

Introduction to Databases

MIS Database Systems.

BIS Database Management Systems.

Databases and Database Systems

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Data Modeling using ER Model

Introduction. Example Databases

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

DATABASTEKNIK - 1DL116

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

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

John Edgar 2

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


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

DB Basic Concepts. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

Course Introduction & Foundational Concepts

Database Management Systems. Chapter 1

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

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

Module-01 Introduction to Database Concepts

Chapter 1: Introduction

Database Systems Introduction SL01

Database Principle. Zhuo Wang Spring

Overview of Data Management

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

Database Systems Overview. Truong Tuan Anh CSE-HCMUT

A database management system (DBMS) is a software package with computer

Chapter Two. DBMS Architecture How should DBS be organized?

Chapter 1 Database System Concepts and Architecture. Nguyen Thi Ai Thao

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

CAS CS 460/660 Introduction to Database Systems. Fall

4/28/2014. File-based Systems. Arose because: Result

Introduction to Database Systems. Motivation. Werner Nutt

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 1 Database Systems

Chapter 11 Database Concepts

Database Systems. Sven Helmer. Database Systems p. 1/567

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Introduction to Database Management Systems

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

DATABASE MANAGEMENT SYSTEM COURSE CONTENT

Basant Group of Institution

Unit I. By Prof.Sushila Aghav MIT

Mahathma Gandhi University

Databases 1. Daniel POP

Course Introduction & Foundational Concepts

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

These are all examples of relatively simple databases. All of the information is textual or referential.

Lecture 02. Fall 2017 Borough of Manhattan Community College

Transcription:

Introduction: Database Concepts Slides by: Ms. Shree Jaswal

Topics: Introduction Characteristics of databases File system V/s Database system Users of a Database system Data Models, Schemas, and Instances Three-Schema Architecture and Data Independence Database Administrator (DBA) Role of a DBA Module 1 Slides by: Shree J. 2

Which Chapter? Which Book? Chapter 1: Introduction to Databases, Elmasri and Navathe, Fundamentals of Database Systems, 6th Edition, PEARSON Education Chapter 1: Overview of Database Systems, Raghu Ramkrishnan and Johannes Gehrke, Database Management Systems,TMH Chapter 1: Introduction, Korth, Slberchatz,Sudarshan, Database System Concepts, 6th Edition, McGraw Hill Module 1 Slides by: Shree J. 3

Computer System Structure Computer system can be divided into four components Hardware provides basic computing resources CPU, memory, I/O devices Operating system Controls and coordinates use of hardware among various applications and users Application programs define the ways in which the system resources are used to solve the computing problems of the users Word processors, compilers, web browsers, database systems, video games Users People, machines, other computers Module 1 Slides by: Shree J. 4

Layers and Views Module 1 Slides by: Shree J. 5

What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals: Execute user programs and make solving user problems easier. Make the computer system convenient to use. Use the computer hardware in an efficient manner. Module 1 Slides by: Shree J. 6

OS as Resource Manager Module 1 Slides by: Shree J. 7

Files Module 1 Slides by: Shree J. 8

Files Module 1 Slides by: Shree J. 9

Introduction to data processing Definition from Webopedia Refers to a class of programs that organize and manipulate data, usually large amounts of numeric data. Accounting programs are the prototypical examples of data processing applications. Definition from Wikipedia Computer data processing is any process that uses a computer program to enter data and summarise, analyse or otherwise convert data into usable information. The process may be automated and run on a computer. It involves recording, analysing, sorting, summarising, calculating, disseminating and storing data. Module 1 Slides by: Shree J. 10

Overview of Files & File Systems One way to keep the information is to store it in operating system files. To manipulate such information, system has a no. of application programs. New application programs are needed as the need arises. Thus, as time goes by, the system acquires more files and more application programs. Keeping the organizational information in file processing system has following disadvantages: Data Redundancy & Inconsistency: Multiple file formats Duplication of information in different files Change in one file may not reflect the change in other file. Module 1 Slides by: Shree J. 11

Disadvantages of File Processing System Difficulty in accessing the data: Conventional File processing system do not allow the convenient & efficient way of retrieving the data. Need to write a new program to carry out each new task. Data isolation : Data are scattered in various files of different formats, so writing new programs to retrieve the appropriate data is difficult. Integrity Problems: In this system, it is difficult to add new constraints, as it need to change each file program code. Atomicity Problems: Mechanical or electrical failure may leave database in an inconsistent state with partial updates carried out. So it is difficult to ensure atomicity in this system. Module 1 Slides by: Shree J. 12

File Processing System Disadvantages of File Processing System -cont: Concurrent Access anomalies: For the sake of overall performance of the system and faster response, many systems allow multiple users to update data simultaneously. But it is difficult for file system to ensure concurrency as data may be accessed by many different application programs that have not been coordinated previously. Security Problem: Not every user of the database system should be able to access all the data. So, for file system it is difficult to enforce such security constraint. Module 1 Slides by: Shree J. 13

File System Vs. Database System Database Systems offers solutions to all File system Problems Controlled Redundancy: Storing the data multiple times (Redundancy) avoided through database approach. It stores each logical data item in only one place while designing the database. This saves storage space, time for multiple updates and ensures consistency. Restricting the unauthorized access: DBMS provides a security & authorization subsystem through which DBS staff grant privileges to another user. Module 1 Slides by: Shree J. 14

File System Vs. Database System Providing Storage Structures for efficient Query processing: DBMS provides specialized data structures to speed up disk search for desired record. It provides facility of Indexes which are typically based on tree or hash data structures. Providing Back up & Recovery: By introducing save point, it gives the back up& recovering facility. Providing Multiple user interfaces: Casual Users - Query Language interface Application Programmer - Programming language interface Naïve users Menu-Driven interfaces Module 1 Slides by: Shree J. 15

File System Vs. Database System Advantages of Database system Representing Complex Relationships among data: With the help of nested queries and Join concept, DBMS has capacity to represent complex relationships among the data. Enforcing the integrity constraints: While designing the database, designer defines the integrity constraints. Module 1 Slides by: Shree J. 16

Overview of file systems Case Study A company has a large collection (say 500 GB) of data on employees, departments, products, sales and so on. Business constraints:- 1. The data has to be accessed concurrently by several employees. 2. Queries should be answered quickly 3. Changes made to data by different users must be applied consistently 4. Access to certain parts of the data must be restricted. Module 1 Slides by: Shree J. 17

What can be the problems? Is there sufficient main memory for holding all data? How do we identify all data items? How r we going to retrieve the required data? Is the data protected against inconsistent changes? How r security policies enforced? How the data can be restored to a consistent state after a system crash? Module 1 Slides by: Shree J. 18

Concept of a database Database: A collection of related data. Data: Known facts that can be recorded and have an implicit meaning. Mini-world: Some part of the real world about which data is stored in a database. For example, student grades and transcripts at a university. Database Management System (DBMS): A software package/ system to facilitate the creation and maintenance of a computerized database. Database System: The DBMS software together with the data itself. Sometimes, the applications are also included. Module 1 Slides by: Shree J. 19

DBMS is a general-purpose software System, that facilitates the processes of Defining, constructing, manipulating, Sharing databases among various users And applications. Module 1 Slides by: Shree J. 20

When not to use a DBMS Main inhibitors (costs) of using a DBMS: High initial investment and possible need for additional hardware. Overhead for providing generality, security, concurrency control, recovery, and integrity functions. When a DBMS may be unnecessary: If the database and applications are simple, well defined, and not expected to change. If there are stringent real-time requirements that may not be met because of DBMS overhead. If access to data by multiple users is not required. Module 1 Slides by: Shree J. 21

Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data Set of programs to access the data Database Applications: Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Online retailers: order tracking, customized recommendations Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions Module 1 Slides by: Shree J. 24

Typical DBMS Functionality Define a database : in terms of data types, structures and constraints Construct or Load the Database on a secondary storage medium Manipulating the database : querying, generating reports, insertions, deletions and modifications to its content Concurrent Processing and Sharing by a set of users and programs yet, keeping all data valid and consistent Protection or Security measures to prevent unauthorized access Presentation and Visualization of data Module 1 Slides by: Shree J. 25

Main Characteristics of the Database Approach Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data). This allows the DBMS software to work with different databases. Insulation between programs and data: Called program-data independence. Allows changing data storage structures and operations without having to change the DBMS access programs. Module 1 Slides by: Shree J. 26

Self describing nature Module 1 Slides by: Shree J. 27

Main Characteristics of the Database Approach Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database. Support of multiple views of the data: Each user may see a different view of the database, which describes only the data of interest to that user. Module 1 Slides by: Shree J. 28

Example Module 1 Slides by: Shree J. 29

Views Module 1 Slides by: Shree J. 30

Main Characteristics of the Database Approach Sharing of data and multiuser transaction processing : allowing a set of concurrent users to retrieve and to update the database. Concurrency control within the DBMS guarantees that each transaction is correctly executed or completely aborted. OLTP (Online Transaction Processing) is a major part of database applications. Module 1 Slides by: Shree J. 31

Database Users Users may be divided into those who actually use and control the content (called Actors on the Scene ) and those who enable the database to be developed and the DBMS software to be designed and implemented (called Workers Behind the Scene ). Module 1 Slides by: Shree J. 32

Users of database systems Actors on the Scene Database administrators (DBA) are responsible for: Authorizing access to the database Coordinating and monitoring its use Acquiring software and hardware resources Database designers are responsible for: Identifying the data to be stored Choosing appropriate structures to represent and store this data Module 1 Slides by: Shree J. 33

Users of database systems End users People whose jobs require access to the database Types Casual : access database occasionally when needed Naïve or Parametric : they make up a large section of the end-user population. They use previously well-defined functions in the form of canned transactions against the database. Examples are bank-tellers or reservation clerks who do this activity for an entire shift of operations. Module 1 Slides by: Shree J. 34

Users of database systems End users types cont d Sophisticated : these include business analysts, scientists, engineers, others thoroughly familiar with the system capabilities. Many use tools in the form of software packages that work closely with the stored database. Stand-alone : mostly maintain personal databases using ready-to-use packaged applications. An example is a tax program user that creates his or her own internal database. Module 1 Slides by: Shree J. 35

Users of database systems System analysts Determine requirements(specifications) of end users Application programmers Implement these specifications as programs Module 1 Slides by: Shree J. 36

Workers behind the Scene DBMS system designers and implementers Design and implement the DBMS modules and interfaces as a software package Tool developers Design and implement tools Operators and maintenance personnel Responsible for running and maintenance of hardware and software environment for database system Module 1 Slides by: Shree J. 37

A Brief History of Database Applications Early database applications using hierarchical and network systems Large numbers of records of similar structure Providing data abstraction and application flexibility with relational databases Separates physical storage of data from its conceptual representation Provides a mathematical foundation for data representation and querying Module 1 Slides by: Shree J. 38

Hierarchical model and network model Module 1 Slides by: Shree J. 39

Relational model Module 1 Slides by: Shree J. 40

A Brief History of Database Applications (cont'd.) Object-oriented applications and the need for more complex databases Used in specialized applications: engineering design, multimedia publishing, and manufacturing systems Interchanging data on the Web for e-commerce using XML Extended markup language (XML) primary standard for interchanging data among various types of databases and Web pages Module 1 Slides by: Shree J. 41

Object Oriented model Module 1 Slides by: Shree J. 42

XML Module 1 Slides by: Shree J. 43

Differences between OODB and RDB Module 1 Slides by: Shree J. 44

A Brief History of Database Applications (cont'd.) Extending database capabilities for new applications Extensions to better support specialized requirements for applications Enterprise resource planning (ERP) Customer relationship management (CRM) Databases versus information retrieval Information retrieval (IR) Deals with books, manuscripts, and various forms of library-based articles Module 1 Slides by: Shree J. 45

Data Models, Schemas, instances Categories of Data Models Schemas, Instances and Database State Module 1 Slides by: Shree J. 46

Data Models Data Model: A set of concepts to describe the structure of a database, and datatypes, relationships, and constraints that should hold for the data. Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model. Operations on the data model may include basic operations and user-defined operations. Module 1 Slides by: Shree J. 47

Categories of data models Conceptual (high-level, semantic) data models: Provide concepts that are close to the way many users perceive data. (Also called entity-based or object-based data models.) Physical (low-level, internal) data models: Provide concepts that describe details of how data is stored in the computer. Implementation (representational) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details. Module 1 Slides by: Shree J. 48

Schemas, Instances, and Database State The overall design of the database, description of database is called Database Schema. (Intension) Each object in the schema is called Schema Construct Database change over time as information is inserted or deleted. The collection of the information stored in the database at a particular moment is called an Instance of the database, database state, snapshot (Extension) DBMS Catalog stores the descriptions of the schema constructs and constraints-also called as meta-data Occasional changes made to the schema is called as schema evolution. Module 1 Slides by: Shree J. 49

Schema diagram of employees working in a company Module 1 Slides by: Shree J. 50

Abstraction Abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically to retain only information which is relevant for a particular purpose. Module 1 Slides by: Shree J. 51

Data Abstraction Need of Data Abstraction A major purpose of a database system is to provide user with an abstract view of the data. Since many DBS users r not computer trained, developer hides the complexity from users through several levels of abstraction, to simplify the user interaction with the system. The system hides the details of how the data is stored and maintained. Module 1 Slides by: Shree J. 52

Three-schema Architecture Internal level (internal schema) which describes the physical structure of the database Conceptual level (Conceptual Schema) which describes the structure of the whole database (entities, data types, relationships, user operations, constraints) External or View level (External schemas or User Views Displays to the user group his topic of interest only Module 1 Slides by: Shree J. 53

Three-schema Architecture Module 1 Slides by: Shree J. 54

Data Independence Data Independence: The ability to modify a schema definition in one level without affecting a schema definition in the next higher level. Physical Data Independence: It is the ability to modify the physical schema without causing application programs to be rewritten. Modifications at the physical level are occasionally necessary to improve performance. Logical Data Independence: It is ability to modify the logical schema without causing application programs to be rewritten. Modifications at the Logical level are necessary whenever the logical structure of the database is altered. Module 1 Slides by: Shree J. 56

Data Abstraction Levels Physical Level (Internal Level): The Lowest level of abstraction describes how data are actually stored. At physical level, complex low level data structures are described in detail. Logical Level or conceptual level: The next-higher level of abstraction describes what data are stored in the database, and what relationships exists among the data. Hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations and constraints. View Level: The highest level of abstraction describes only part of the database. Many users of the database do not need all the info in DB, instead they need to access only a part of the database. Concept of Views is used. Module 1 Slides by: Shree J. 57

External View in C language Struct Student { Char stud_name(10); Int matriculation_number(6); Char sex(1); Conceptual View STUDENT STUD_NAME CHARACTER(10); MATRICULATION_NUMBER INT(6); SEX CHARACTER(1); Internal view STORED_STUDENT BYTES=20 PREFIX BYTES=6,OFFSET=0 MATRICULATION# BYTES=6,OFFSET=6,INDEX=MATRIC# STUDNAME BYTES=4,OFFSET=12 SEX BYTES=1, OFFSET=16 Module 1 Slides by: Shree J. 58

DBMS Languages and Interfaces Data Definition Language (DDL): Used by the DBA and database designers to specify the conceptual schema of a database. In many DBMSs, the DDL is also used to define internal and external schemas (views). In some DBMSs, separate storage definition language (SDL) and view definition language (VDL) are used to define internal and external schemas. In RDBMS, SQL is used in the role of VDL. Module 1 Slides by: Shree J. 59

DBMS Languages Data Manipulation Language (DML): Used to specify database retrievals and updates. DML commands (data sublanguage) can be embedded in a general-purpose programming language (host language), such as COBOL, C or an Assembly Language. Alternatively, stand-alone DML commands can be applied directly (query language). Module 1 Slides by: Shree J. 60

DBMS Languages DML is of two types:- High Level or Non-procedural Languages: e.g., SQL, are set-oriented and specify what data to retrieve than how to retrieve. Also called declarative languages. Low Level or Procedural Languages: record-at-a-time; they specify how to retrieve data and include constructs such as looping. A query in a high-level DML specifies which data to retrieve and called as declarative DML commands can be either Standalone Query language embedded in host language - data sublanguage Module 1 Slides by: Shree J. 61

DBMS Interfaces Stand-alone query language interfaces. Programmer interfaces for embedding DML in programming languages: Pre-compiler Approach Procedure (Subroutine) Call Approach User-friendly interfaces: Menu-based, popular for browsing on the web Forms-based, designed for naïve users Graphics-based (Point and Click, Drag and Drop etc.) Natural language: requests written in English Combinations of the above Module 1 Slides by: Shree J. 62

Architectures for DBMSs Centralized Client/server Module 1 Slides by: Shree J. 63

Centralized DBMS Architecture Module 1 Slides by: Shree J. 64

Centralized DBMS Centralized DBMS: combines everything into single system including- DBMS software, hardware, application programs and user interface processing software. Module 1 Slides by: Shree J. 65

A Physical Centralized Architecture Module 1 Slides by: Shree J. 66

Client Server architecture Specialized Servers with Specialized functions File server, printer server, web servers e-mail servers Clients - interfaces to utilize these servers, local processing Server hardware, software and provide services like file access, printing, archiving, database access. Module 1 Slides by: Shree J. 67

Logical two-tier Client/Server Architecture Client Client Client Print Server File Server DBMS Server Module 1 Slides by: Shree J. 68

Physical two-tier client/server architecture Diskless Client Client with Disk Server Server and Client Site1 Site2 Server Server Client Client Site3 Client Site n Communication Network Module 1 Slides by: Shree J. 69

Clients Provide appropriate interfaces and a client-version of the system to access and utilize the server resources. Clients maybe diskless machines or PCs or Workstations with disks with only the client software installed. Connected to the servers via some form of a network. (LAN: local area network, wireless network, etc.) Module 1 Slides by: Shree J. 70

DBMS Server Provides database query and transaction services to the clients Sometimes called query and transaction servers Module 1 Slides by: Shree J. 71

Two-tier architecture Advantages:- Simplicity, compatibility Module 1 Slides by: Shree J. 72

Two Tier Client-Server Architecture User Interface Programs and Application Programs run on the client side Interface called ODBC (Open Database Connectivity) provides an Application program interface (API) allow client side programs to call the DBMS. Most DBMS vendors provide ODBC drivers. Module 1 Slides by: Shree J. 73

Two Tier Client-Server Architecture A client program may connect to several DBMS. Other variations of clients are possible: e.g., in some DBMS, more functionality is transferred to clients including data dictionary functions, optimization and recovery across multiple servers, etc. In such situations the server may be called the Data Server. Module 1 Slides by: Shree J. 74

Three-tier client-server architecture Module 1 Slides by: Shree J. 75

Three-tier Architecture Common for Web applications Intermediate Layer called Application Server or Web Server: stores the web connectivity software and the rules and business logic (constraints) part of the application used to access the right amount of data from the database server acts like a conduit for sending partially processed data between the database server and the client. Additional Features- Security: encrypt the data at the server before transmission decrypt data at the client Module 1 Slides by: Shree J. 76

Transaction Management ACID Properties A Transaction is a collection of operations that performs a single logical function in a database application. Several operations on the database form a single logical unit of work. To ensure integrity of the data, the database system maintains the following properties of transaction: Atomicity: Either all operations of the transaction are reflected properly or none are. Consistency : execution of a transaction in isolation (i.e. no other transaction executing concurrently) preserves the consistency of the database. Isolation: Even though multiple transactions execute concurrently, each transaction is unaware of other transactions executing concurrently in the system. Durability: After a transaction completes successfully, the changes it has made to the database persist, even if there are system failures. Module 1 Slides by: Shree J. 77

Overall System Structure S S Y S T E M T R U C T U R Module 1 Slides by: Shree J. 78 E

Overall System Structure The design of Database System must include the considerations of the interface between the database system and the operating system. Functional Components of a database system are: Query Processor Components DML compiler: Translates DML statements into low level instructions that query evaluation engine can understand. Embedded DML precompiler: Converts DML statements embedded in an application program to normal procedure calls in the host language. DDL interpreter : interprets DDL statements and records them in a set of tables containing metadata. Query Evaluation Engine: Executes low-level instructions generated by DML compiler Module 1 Slides by: Shree J. 79

Overall System Structure Storage Manger Components Authorization & Integrity Manager: Test satisfaction of integrity constraints and checks authority of users to access data. Transaction Manager: Ensures that the database remains in a consistent state despite the system failures, and concurrent transaction execution without confliction. File Manager: Manages the allocation of space on disk storage and data structures used to represent information. Buffer Manager: Responsible for fetching data from disk storage into main memory and decide what data to cache in memory. Module 1 Slides by: Shree J. 80

Storage Management A storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and the queries submitted to the system. A storage manager is responsible for the interaction with the file manager. The storage manager translates the various DML statements into low level file system commands. Thus storage manager is responsible for storing, retrieving, and updating data in the database. Module 1 Slides by: Shree J. 81

Overall System Structure In addition, several data structures are required as part of physical system implementation Data Files : which stores the database itself Data Dictionary : which stores metadata about the structure of the database. Indices : which provide fast access to data items that hold particular values. Statistical Data: which stores statistical information about the data in the database. This info is used by query processor to select efficient ways to execute a query. Module 1 Slides by: Shree J. 82

Overall System Structure Module 1 Slides by: Shree J. 83

Database Administrator (DBA) The person who has the central control of both the data and the programs that access those data is called Database Administrator. The functions of the DBA are: Schema Definition: By writing DDL commands, a set of tables i.e. design of database get stored in a data dictionary. Storage structure and access method definition: By writing a set of definitions DBA provides appropriate storage structures and access methods, which is translated by the data-storage manager and data-definition language(ddl) compiler. Schema and physical-organization modification Module 1 Slides by: Shree J. 84

Database Administrator The functions of the DBA are: (cont:) Granting authorization for data access: Users can be granted permission to access only certain views and relations Integrity Constraint Specification: The data values stored in the database must satisfy certain consistency constraints. The integrity constraints are kept in a special system structure that is consulted by the database system whenever an update takes place in the system. Module 1 Slides by: Shree J. 85

Crossword Module 1 Slides by: Shree J. 86

Activity Module 1 Slides by: Shree J. 87