Está en la página 1de 33

DBMS

Lecture 2

Database
Database System
DBMS
Hitesh Mahapatra
Introduction to Database
 Collection of data related to a particular topic

 Single large file that contains all the data

 Series of Rows and Columns

 Collection of Tables, Forms, Reports etc

2
Database

A database is a computerized record


keeping system

 Database itself can be regarded as a kind


of electronic filing cabinet

 Itis a repository for the collection of


computerized data files
3
 More completely, it is a system involving data,
the hardware that physically stores that data, the
software that utilizes the hardware's file system
in order to:
1) store the data and
2) provide a standardized method for retrieving
or changing the data, and finally, the users
who turn the data into information

4
A database might be as complex and
demanding as an account tracking system
used by a bank to manage the constantly
changing accounts of thousands of bank
customers, or it could be as simple as a
collection of electronic business cards on
your laptop
5
 The important thing is that a database
allows you to store data and get it or
modify it when you need to easily and
efficiently regardless of the amount of data
being manipulated

6
Elmasri says:

A Database (DB) is collection of related


data - with the following properties:
A DB has some relevant meaning

A DB is designed, built and populated with data


for a specific purpose

A DB represents some aspect of the real world

7
Kroenke says:
 An integrated, self-describing collection of
related data
 Integrated: Data is stored in a uniform way, typically all in one
place (a single physical computer for example)
 Self-Describing: A database maintains a description of the data
it contains (Catalog)

 Related: Data has some relationship to other data. In a


University we have students who take courses taught by
professors

8
 We can also say that the database is a model of what the
users perceive

 Three main categories of models:


 User Models: How users perceive the world and / or the
business
 Logical Models: Represent the logic of how a business
operates. For example, the relationship between different
entities and the flow of data through the organization. Based on
the User's model
 Physical Models: Represent how the database is
actually implemented on a computer system. This is based on
the logical model

9
What
WhatisisininaaDatabase?
Database?

A database contains information about


a particular enterprise or a particular
application
 E.g., a database for an enterprise may
contain everything needed for the planning
and operation of the enterprise: customer
information, employee information, product
information, sales and expenses, etc
10
 You don’t have to be a company to use a database:
you can store your personal information, expenses,
phone numbers in a database (e.g., using Access on
a PC)
 As a matter of fact, you could store all data
pertinent to a particular purpose in a
database
 This usually means that a database stores data that
are related to each other

11
Examples

 Credit card shopping – it automatically checks


the balance and updates the amount in the card
after deduction

 Scanner used to read Universal Product Code

 Online Air Reservation System

12
Example Soft wares
 Traditionally,
databases ran on large, powerful
mainframes for business applications. You will
probably have heard of such packages as
Oracle or SQL Server
 However with the advent of small, powerful
personal computers, databases have become
more readily usable by the average computer
user. Microsoft's Access and Borland's
Paradox are two popular PC-based engines
around
13
Database System

 Database system is basically a


computerized record keeping system; that
is a computerized system whose overall
purpose is to maintain information and to
make that information available on
demand

14
A collection of software programs that are
used to define, construct, maintain and
manipulate data in a database

15
Who
Who Needs
Needs Database
Database Systems
Systems

Typical Applications:
Corporate databases Personnel management
Inventory and purchase order
Insurance policies
……
Web data Typical Applications
management Web page management
Personalize web pages
……
16
 The user of the system will be given facilities
to perform a variety of operations on such
files :
 Adding new empty files to database
 Inserting new data into existing files
 Retrieving data from existing files
 Updating data in existing files
 Deleting data from existing files
 Removing existing files, empty or otherwise, from the
database
17
 Now we will refer these files in the
database as Tables
 The
rows of such tables are referred to as
Records of that file/table
 The columns can be regarded as
representing the Fields

18
DBMS
 Allaccess to the database is controlled by a
sophisticated software called Data Base
Management System

 Software that defines a database, stores the


data, supports a query language, produces
reports, and creates data entry screens

 Microsoft Access is an example of DBMS


19
What is the goal of real DBMS
 Electronic record-keeping
 Fast and convenient access to information

20
Example

E.g. students, taking classes, obtaining


grades;

 Find my GPA

 <and other queries>

21
Solution: paper-based

 Advantages?

 Disadvantages?

22
Solution: paper-based

 Advantages?
 cheap

 Disadvantages?

23
Solution: paper-based

 Advantages?
 cheap

 Disadvantages?
 no queries
 no sharing

 large physical foot-print

24
Next solution
 computer-based (flat) files +
 C (Java, ...) programs to access them

e.g., one (or more) UNIX/DOS files,


with student records and their courses

25
Next solution

your layout for the student records?

26
Next solution

your layout for the student records?


(eg., comma-separated values ‘CSV’)

1,Sarfraza,Chattha,Lahore
50,Tompson,Peter,NewYork
151,Shazia,Qayyum,Lahore

27
Next solution

your layout for the student records?

(many other layouts are also possible)


eg.:
Smith,John,1,London
Tompson,Peter,234
Atkinson,Mary,345,03009449449,Lahore

28
Problems?
 Inconvenient access to data (need ‘C++’
expertise, plus knowledge of file-layout)

 Data redundancy

 Integrity problems

29
Problems? (cont’d)
 ...

 Concurrent-access anomalies

 Security problems

30
Problems? (cont’d)

why?
because of two main reasons:
 file-layout description is buried within the C
programs and
 there is no support for transactions (concurrency
and recovery)

DBMS handle exactly these two problems

31
Main Products
Commercial
 Oracle
 IBM/DB2
 MS SQL-Server
 Sybase
 Informix
 MS Access

32
Big
BigNames
NamesininDatabase
DatabaseSystems
Systems

Company Product Remarks


Oracle Oracle 8i, 9i, etc. World’s 2nd largest software company CEO,
Larry Ellison, world’s 2nd richest

IBM DB2, Universal Server World’s 2nd largest after Informix acquisition

Microsoft Access, SQL Server Access comes with MS Office

Sybase Adaptive Server CEO John Chen, grown up in HK


Informix Dynamic Server Acquired by IBM in 2001

33

También podría gustarte