Sei sulla pagina 1di 21

Database Management System

(CSE249)
UNITS
UNIT 1 INTRODUCTION TO DATABASES

UNIT 2 RELATIONAL DATABASE LANGUAGE & INTEFACES

UNIT 3 NORMALIZATION IN DESIGN OF DATABASES

UNIT 4 TRANSACTION MANAGEMENT


UNIT 5 CONCURRENCY CONTROL
Contents – UNIT 1
Introduction to Databases
Unit 1 Topic 1 Introduction of DBMS, Characteristic of DBMS, Data
Models, Database languages, Database Administrator,
Database Users

Unit 1 Topic 2 Three Schema architecture of DBMS, Data Models,


Hierarchical, Network ,Data independence and
database language, DDL, DML, Data Modeling using
Entity Relationship Model
Unit 1 Topic 3 Strong Entity, Weak entity, Specialization and
generalization, converting ER Model to relational
tables
Recommended Book
• Korth , Silberschatz&Sudarshan, Data base Concepts, Tata
McGraw-Hill, Latest Edition
• Elmasri, Navathe, Fundamentals of Database Systems,
Pearson Education Inc.
• Thomas Connolly, Carolyn Begg, Database Systems: A
Practical Approach to design, Implementation and
Management, Pearson Education, Third Edition.
• Jeffrey D. Ullman, Jennifer Windon, A first course in
Database Systems, Pearson Education.
• Date C.J., An Introduction to Database Systems, Addison
Wesley.
Introduction To Databases
• Introduction of DBMS
• Characteristic of DBMS
• Data Models
• Database languages
• Database Administrator
• Database Users.
Basic Definitions
• Data:
– Raw and isolated facts that can be recorded
• Information:
– Processed, meaningful, usual data
• Database:
– A collection of related / similar data.
• Database Management System (DBMS):
– Software used to create, manipulate and delete database
– Or A software package/ system used to facilitate the
creation and maintenance of a computerized database.
Database Management System (DBMS)
• DBMS contains information about a particular enterprise
– Collection of interrelated data
– Set of programs to access the data
– An environment that is both convenient and efficient to use
• 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
• Databases touch all aspects of our lives
Database Management System (DBMS)
• A software system (a collection of
programs) that enables users to
define, create, maintain, and
control access to the database.
• (Database) application program:
a computer program that
interacts with database by issuing
an appropriate request (SQL
statement) to the DBMS.
• DBMS is a general-purpose
software that facilitates the
process of defining constructing
and manipulating databases for
various applications.
Database vs DBMS
• A database is a collection of organized data and the system
that manages a collection of databases is called a Database
Management System.
• The database holds the records, fields and cells of data.
• The DBMS is the tool used to manipulate the data inside the
database.

• However, the term database is increasingly used as


shorthand for Database Management System.

• To make the distinction simple, consider an operating system


and the individual files stored in the system. Just like you
need an operating system to access and modify files in the
system, you need a DBMS to manipulate databases stored in
the database system.
File Processing System
• In this System, data is stored in permanent system files
(secondary Storage).
• Different application programs are written to extract data from
these files and to add record to these files.

A file with the DAT file extension is usually a generic data file that stores
information specific to the application it refers to.
File-Based Processing
Purpose of Database Systems
• In the early days, database applications were built directly
on top of file systems
• Drawbacks of using file systems to store data:
– Data redundancy and inconsistency
• Multiple file formats, duplication of information in
different files
– Difficulty in accessing data
• Need to write a new program to carry out each new
task
– Data isolation — multiple files and formats
– Integrity problems
• Integrity constraints (e.g. account balance > 0)
become “buried” in program code rather than being
stated explicitly
• Hard to add new constraints or change existing ones
Purpose of Database Systems (Cont.)

• Drawbacks of using file systems (cont.)


– Atomicity of updates
• Failures may leave database in an inconsistent state with
partial updates carried out
• Example: Transfer of funds from one account to another
should either complete or not happen at all
– Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to
inconsistencies
– Example: Two people reading a balance and updating
it at the same time
– Security problems
• Hard to provide user access to some, but not all, data

• Database systems offer solutions to all the above problems


Database Management System (DBMS)
Main Characteristics of the Database
Approach
• Self-describing nature of a database system:
– A DBMS catalog stores the description of a particular
database (e.g. data structures, types, and constraints)
– The description is called meta-data.
– This allows the DBMS software to work with different
database applications.
• Insulation between programs and data:
– Called program-data independence.
– Allows changing data structures and storage organization
without having to change the DBMS access programs.
Main Characteristics of the Database
Approach (continued)
• Data Abstraction:
– A data model is used to hide storage details and present the
users with a conceptual view of the database.
– Programs refer to the data model constructs rather than data
storage details
• 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.
Main Characteristics of the Database
Approach (continued)
• Sharing of data and multi-user transaction processing:
– Allowing a set of concurrent users to retrieve from and to
update the database.
– Concurrency control within the DBMS guarantees that each
transaction is correctly executed or aborted
– Recovery subsystem ensures each completed transaction has
its effect permanently recorded in the database
– OLTP (Online Transaction Processing) is a major part of
database applications. This allows hundreds of concurrent
transactions to execute per second.
Components of DBMS Environment

• Hardware
– Can range from a PC to a network of computers.
• Software
– DBMS, operating system, network software (if necessary) and also
the application programs.
• Data
– Used by the organization and a description of this data called the
schema.
• Procedures
– Instructions and rules that should be applied to the design and use
of the database and DBMS.
• People
DBMS vs File Processing System
DBMS File Processing System
A database management system coordinates File-processing system coordinates only the physical access.
both the physical and the logical access to the
data
A database management system reduces the amount of Data written by one programming a file-processing system
data duplication by ensuring that a physical piece of may not be readable by another program.
data is available to all programs authorized to have
access to it
A database management system is designed to allow File-processing system is designed to allow predetermined
flexible access to data (i.e., queries) access to data (i.e., compiled programs).

A database management system is designed to A file-processing system is usually designed to allow one or
coordinate multiple users accessing the same more programs to access different data files at the same time.
data at the same time.  In a file-processing system, a file can be accessed by two
programs concurrently only if both programs have read-only
access to the file.
Redundancy is control in DBMS Not in file system

Unauthorized access is restricted in DBMS Not in file system

DBMS provide back up and recovery When data is lost in file system then it not recover.

DBMS provide multiple user interfaces Data is isolated in file system


DBMS RDBMS

DBMS applications store data as file. RDBMS applications store data in a tabular form.

In DBMS, data is generally stored in either a hierarchical In RDBMS, the tables have an identifier called primary key
form or a navigational form. and the data values are stored in the form of tables.

Normalization is not present in DBMS. Normalization is present in RDBMS.


DBMS does not apply any security with regards to data RDBMS defines the integrity constraint for the purpose of
manipulation. ACID (Atomocity, Consistency, Isolation and Durability)
property.

DBMS uses file system to store data, so there will be no in RDBMS, data values are stored in the form of tables, so
relation between the tables. arelationship between these data values will be stored in the
form of a table as well.

DBMS has to provide some uniform methods to access the RDBMS system supports a tabular structure of the data and a
stored information. relationship between them to access the stored information.

DBMS does not support distributed database. RDBMS supports distributed database.

DBMS is meant to be for small organization and deal with RDBMS is designed to handle large amount of data. it
small data. it supports single user. supportsmultiple users.

Examples of DBMS are file systems, xmletc. Example of RDBMS are mysql, postgre, sql


server, oracle etc.

Potrebbero piacerti anche