Sie sind auf Seite 1von 42

1.

Database Management System, McGrawHill

Text Book Ramakrishna R and J Gerke ;

1.

Fundamentals of Database Systems


Seema Agarwal Deputy Registrar

Reference Book R Elmasri & S B Navate;

Topics: 1. Introduction to Database Systems 2. File Systems Vs DBMS 3. Advantages of DBMS

Data: raw facts

Being stored and retrieved Not to be processed to reveal their meaning to the user

Information: processed data


Key to good decision making

Data constitute building blocks of information Information produced by processing data Information reveals meaning of data Good, timely, relevant information is key to decision making Good decision making key to organizational survival
4

A set of information held in a computer One or more large structured sets of persistent data, usually associated with software to update and query the data
A collection of data arranged for ease and speed of search and retrieval
Introduction to Database Systems

A very large, integrated collection of data

A collection of information stored in a computer in a systematic way


DBMS (= Database Management System) - A software used to manage and query a database

Data: Known facts that can be recorded and that have implicit meaning Database: Collection of related data Ex. the names, telephone numbers and addresses of all the people you know Database Management System: A computerized record-keeping system
Introduction to Database Systems

Introduction to Database Systems

Introduction to Database Systems

Library catalogues Medical records Bank accounts Stock market data Personnel systems Product catalogues Telephone directories

Train timetables Airline bookings Credit card details Student records Customer histories Stock market prices Discussion boards and so on

Introduction to Database Systems

data modeling capacity

Object-oriented model (mid 90s)

Object-relational model (late 90s)

Relational model (late 80s) Hybrid model (mid 80s)


Network Data Model (mid 70s) File System (before 70s)
* adapted from the material in http://www.ktdata.co.kr/ktdata/kthome7/zeus_5.htm

data management facilities

Database is a collection of data describing objects and their relationships However a DBMS is software designed to assist in maintaining and utilizing large collection of data. Database Management System = DBMS A collection of files that store the data A big C program written by someone else that accesses and updates those files for you

Relational DBMS = RDBMS Data files are structured as relations (tables)

A very large, integrated collection of data.


Models real-world enterprise. Entities (e.g., students, employee) Attributes (e.g., student-roll,name,age,address,class etc.) Relationships (e.g., Teacher is teaching student)

A Database Management System (DBMS) is a software package designed to store and manage databases.
Introduction to Database Systems

Database Management System (DBMS): software system (collect of software) help to manage the data contents Manages Database structure Controls access to data Contains query language
Application software DBMS

Database

Introduction to Database Systems

Goals of a Database Management System:


To provide an efficient as well as a convenient environment for accessing data in a database

Enforce information security: database security, concurrency control, crash recovery

It is a general purpose facility for:


Defining database Constructing database

Manipulating database

Backend

for traditional database applications

Backend for large Websites Backend for Web services Amazon

Introduction to Database Systems

Sure we can! Start by storing the data in files:


students.txt courses.txt professors.txt

Now write C or Java programs to implement specific tasks

18

Enroll Ram in BBA108:

Write a C/Java program to do the following:

Read students.txt Read courses.txt Find&update the record Ram Find&update the record BBA108 Write students.txt Write courses.txt
19

System crash:

Read students.txt Read courses.txt Find&update the record Mary Johnson Find&update the record CSE444 Write students.txt Write courses.txt

CRASH !

Large data sets (say 50GB) Simultaneous access by many users


Why is this a problem ?

What is the problem ?

Lock students.txt what is the problem ?

20

program-1 data description-1 program-2 data description-2 program-3 data description-3 File-1 File-2 File-3

File System approach

Application program-1 with data semantics Description Application program-2 with data semantics Application program-3 with data semantics Manipulation Control

Queries .

Database

DBMS approach

Data
Raw Facts

Field
Group of characters with specific meaning

Record
Logically connected fields that describe a person, place, or thing

File and file folder


Collection of related records

22

record

field

23

24

Figure 1.5

25

Each application must move large datasets between main memory and secondary storage (must deal with, e.g., buffering, page-oriented access, etc).

Each application must deal with some method of identifying all data items in case the available addressing mode is not sufficient (e.g., 32-bit addressing cannot directly access more than 4GB).

Need special code for different queries


Requires extensive programming in thirdgeneration language (3GL): COBOL, Basic, and Fortran (what must be done and how it is to be done) Time consuming depends on physically store data Makes ad hoc queries impossible Make difficult to modify file system (each file has its own system) Leads to islands of information
27

Data Dependence Change in files data characteristics requires modification of data access programs Must tell program what to do and how to do Makes file systems cumbersome from programming and data management views Structural Dependence Change in file structure requires modification of related programs

28

Field

Definitions and Naming Conventions


Flexible record definition anticipates reporting requirements Selection of proper field names important Attention to length of field names Use of unique record identifiers

29

Data

Redundancy

Different and conflicting versions of same data Results of uncontrolled data redundancy Data anomalies
Modification Insertion Deletion

Data inconsistency
Lack of data integrity
30

Must protect data from inconsistency due to multiple concurrent users changing it. Must ensure consistent crash recovery. Must provide more security and access control than the password mechanism offered by operating systems.

advantages
FMS

disadvantages

Simpler to use Less expensive

Typically no multi-user access Limited to smaller databases Limited functionality Decentralization of data
Redundancy and integrity issues

Crash Recovery

DBMS

Greater flexibility Greater processing power Ensures data integrity Supports simultaneous access Provides backup and recovery controls Advanced security Supports Transaction

Difficult to learn Packaged separately from the OS Slower processing speeds Requires skilled administrators Expensive

Two tier system or client-server

connection (ODBC, JDBC)

Data files

Database server (someone elses C program)

Applications
33

Databases are useful

Databases for you

Many computing applications deal with large amounts of information Database systems give a set of tools for storing, searching and managing this information

Databases are a core topic in computer science and IT Basic concepts and skills with database systems are part of the skill set you will be assumed to have as a BBA graduate

Introduction to Database Systems

A large amount of data, Concurrent access by many users, Fast access, Consistent data update, Role-based security, Robust against hardware failures and OS crashes.

Introduction to Database Systems

Data independence

*Application programs no details of data representation & storage Efficient data access * High-quality data compression schemes, * Fast data retrieval and search algorithms. Data integrity and security * Programs can prevent invalid queries from being executed, * Access control can be enforced.
Introduction to Database Systems

Centralized data administration * The DBA can optimize the organization of the data to facilitate its uses. Concurrent access

Crash recovery

Reduced application development time

Introduction to Database Systems

Advantages of DBMS

Redundancy can be reduced Inconsistency can be avoided Data can be shared Standards can be enforced

Security restrictions can be applied


Integrity can be maintained Data independence can be provided Backup and Recovery

High startup cost (time and effort) Relatively high maintenance Big central database doesnt work in practice - Though still better than file systems Finish up with dozens/hundreds of little data bases - Physically separate - All incomplete - Different data formats - Different concepts of data

Introduction to Database Systems

Slow Response- need to update data in real time. - Can be slow & complex to extract data for reports
Application may need to manipulate the data in ways not supported by query Language. Eg flexible analysis of text data

But still DBMS have become indispensible tool


today's scenario

in

Introduction to Database Systems

Open source Databases MySQL PostgreSQL Commercial Databases

MS SQL Server
ORACLE

MS Access

DB2
Informix
David Kim April 28, 2005 42

Das könnte Ihnen auch gefallen