Database Management Systems: Overview and Benefits, Lecture notes of Relational Database Management Systems (RDBMS)

An introduction to Database Management Systems (DBMS), their role in Computer-based Information Systems (CIS), and the advantages of using DBMS over traditional file-processing systems. It discusses the disadvantages of file-processing systems, such as data redundancy, difficulty in accessing data, data isolation, integrity problems, and atomicity problems. The document also introduces the concept of data abstraction and the benefits of using a database approach, including data independence and the capacity to change schemas without affecting external systems.

Typology: Lecture notes

2019/2020

Uploaded on 12/17/2020

yogenz-maharjan
yogenz-maharjan ๐Ÿ‡ณ๐Ÿ‡ต

1 document

1 / 35

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter1
Introduction
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download Database Management Systems: Overview and Benefits and more Lecture notes Relational Database Management Systems (RDBMS) in PDF only on Docsity!

Chapter 1

Introduction

Introduction

Database is a collection of interrelated data that are

used by application. It contains information

relevant to an enterprise.

DatabaseManagementSystem(DBMS) is a collection

of interrelated data and a set of programs to

access those data.

PrimarygoalofDBMS is to provide a way to store and

retrieve database information conveniently and

efficiently.

Database Management Systems

as Part of a CIS

DBMS: A tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time, safely. (Garcia- Molina et. al., 2002 ) Databases today are essential to every business, in order to: o present data to customers o present data on the World-Wide-Web o support commercial processes Some important capabilities: o Persistent storage for large amounts of data o Programming interface for users and applications o Transaction management

Purpose of Database System

To see why database management systems are necessary, let's consider typical file-processing system supported by a conventional operating system. Consider an application in SAVING BANK o Information of saving account and customer records are kept in permanent system files. o Application programs are written to manipulate files to perform following tasks

  • Debit or credit an account
  • Add a new account
  • Find an account balance
  • Generate monthly balance Development of the system proceeds as follows o SAVING + CURRENT Account Bank o New application program must be written as needed o New permanent files are created as required o But over a long period of time files may be in different format o Application programs may be in different languages.

Disadvantages of using file-processing system ( 2 ) (Purpose of Database System)

4. Integrity problem

โ€” Data may be required to satisfy constraints. โ€” E.g. no account balance below $25. 00. โ€” Again, difficult to enforce or to change constraints with the file- processing approach.

5. Atomicity problems

โ€” Data need to be restored to the consistent state if a failure occurs. โ€” E.g. a program to transfer $5 0 from account A to account B โ€” If a system failure occurs, it is possible that the $5 0 is removed from account A and is not credited to B, resulting into inconsistent state. โ€” It is essential that either both debit and credit occurs or none. โ€” Difficult to ensure atomicity in file-processing system.

Disadvantages of using file-processing system ( 3 ) (Purpose of Database System)

6. Concurrent-access anomalies

โ€” Want concurrency for faster response time. โ€” Need protection for concurrent updates. โ€” E.g. two customers withdrawing funds from the same account at the same time. Account has $50 0 in it, and they withdraw $10 0 and $50. The result could be $350, $40 0 or $45 0 if no protection.

7. Security Problem

โ€” Every user of the system should be able to access only the data they are permitted to see. โ€” E.g. payroll people only handle employee records, and cannot see customer accounts; tellers only โ€” access account data and cannot see payroll data. โ€” Difficult to enforce this with application programs.Security problem These difficulties have prompted the development of database system.

View of Data

10 ViewofData o Data Abstraction o Instances and Schemas o Data Independence The major purpose of a database system is o to provide users with an abstract view of the system o i.e. the system hides certain details of how data is stored and maintained

11

Data Abstraction

Data abstraction refers to hiding of certain details

of how the data are stored and maintaned.

That means hiding complexity of the database

system from database users with several levels of

abstraction.

13

Example of three levels

Note: Refer Date, C. J. An introduction to Database Systems

14

Analogy to Data Types concept

Following code defines a new record type, customer with four fields. //In Pascel Programming type customer=record customer-id:string; customer-name:string; customer-street:string; customer-city:string; end; At physical level, //In C++ Programming typedef struct customer{ string customer-id; string customer-name; string customer-street; string customer-city; } o Block of consecutive storage (Words or bytes) o The compiler hides the level of details from programmer. At logical level, o Records described by a type definition as above and o interrelationship of these records. o Programmers and Database adminsitrators. At View level, o Computer users see a set of applicaton programs that hides details of the data types.

16

Instances and Schemas

103 Med c ne (^1233) SchemaDiagramofDatabase FACULTY FacultyNumber FacultyName Dean STUDENT Name StudentNumber FacultyNumber BeginDate COURSE CourseNumber CourseName CreditHours Instance(State) FACULTY FacultyNumber FacultyName Dean 101 Business 1231 102 Engineering 1232 STUDENT Name StudentNumber (^) FacultyNiumi ber BeginDate Smith 112321 101 01 - 09 - 2009 John 823431 102 01 - 09 - 2009

17

Three-Schema Architecture ( 1 )

(ANSI/SPARC Architecture)

External Schema/Subschema (userโ€™s view):

o Describes severals schemas at view level. o Describes the part of the database, that a particular user group is interested in.

Conceptual Schema (logical system view):

o Describes the database design at logical level. o Describes the structure of the whole database for a community of users o Data Definition Language (DDL)

Internal Schema (physical system view):

o Describes the database design at the physical level. o Determines the physical storage structure of the database (e.g. formats of physical records, access path) o Storage Structure Language (SSL)

19

Three-Schema Architecture ( 3 )

(ANSI/SPARC Architecture) The three schemas are only descriptions of data The only data that actually exists is at the physical level. In a DBMS based on the three-schema architecture, o each user group refers only to its own external schema. o Hence, the DBMS must transform a request specified on an external schema into a request against the conceptual schema, and then into a request on the internal schema for processing over the stored database. If the request is a database retrieval, the data extracted from the stored database must be reformatted to match the userโ€™s external view. o The processes of transforming requests and results between levels are called mappings.

Data Independence

20

the capacity to change the schema at one level of

database system without having to change the

schema at next higher level.

Two types of data independence

LogicalDataIndependence is the capacity to change the conceptual schema without having to change external schema or application program. PhysicalDataIndependence is the capacity to change the internal schema without having to change the conceptual schema (or external schema). *Modificaton at this level is usually to improve performance.