Introduction to database system

advertisement

Data:
◦ Raw facts; building blocks of information
◦ Unprocessed information

Information:
◦ Data processed to reveal meaning


Accurate, relevant, and timely information
is key to good decision making
Good decision making is key to survival in
global environment

Database:
A collection of related data.
Database is involved like everywhere in our
world
 For example:
If we go to bank to deposit or withdraw
Make hotel and airline reservation
Purchase something on line
Buy groceries in supermarkets


Database Management System (DBMS):
A software package/system to facilitate the
Define, Construct, Manipulate and Share functions
of a computerized database.

Database system is a
computerized recordkeeping system. It is a
computerize system whose
overall purpose is to store
information and to allow
users to retrieve and update
that information on demand.
◦ Information is anything
that is significant to the
individual or organization
concerned.
What is database system
Slide 1- 6






Adding new file to database
Inserting data into existing files
Retrieving data from existing files
Deleting data from existing files
Changing data in existing files
Removing existing files from the database

Database System are available on machines
that range from all the way from personal
computers to the largest mainframe
Single User system is a system in which at
most one user can access the database at
any given time.
Multi user system is a system in which many
users can access the database at the same
time.
 Data
 Hardware
 Software
 Users
The data in database – for large systemwill be both integrated and shared.
 Integrated
◦ Mean the database can be thought of as a
unification of several distinct files, with any
redundancy among those files partly or wholly
eliminated

Shared
◦ Mean the database can be shared among
different users, in the sense that different
users can have access to the same data.
The hardware components of the system
consist of

The secondary storage volumes used
to hold the stored data, together with
the associated I/O devices, device
controllers, and so forth.

The hardware processors and
associated main memory that are used
to supported the execution of the
database system software
Database Management System (DBMS)
Data => physically stored
All request for access to the database are
handle by the DBMS
DBMS is thus shielding of database users from
hardware level details
Provides users with a perception of the
database that is elevated somewhat above
the hardware level details.
Support user operations
Users/Programmers
DATABASE SYSTEM
Application Program/Queries
DBMS SOFTWARE
Software to Process Queries/Programs
Software to Access Stored Data
Stored Database
Definition
Stored Database
3. Users
Users/Programmers
2. Software
DATABASE SYSTEM
Application Program/Queries
DBMS SOFTWARE
Software to Process Queries/Programs
Software to Access Stored Data
Stored Database
Definition
4. Hardware
Stored Database
1. Data

DBMS is a general purpose software system
that facilitates the process of definition,
construction, manipulating, and sharing
databases among various users and
applications.
◦ Defining a database involves specifying the data
types, structures, and constrains for the data to be
stored in the database.



Manipulating a database includes such
functions as querying the database to retrieve
specific data, updating the database to reflect
changes, and generating reports from data.
Sharing a database allows multiple users and
programs to access the database concurrently.
Other important functions
◦ Protection both system protection against hardware or
software malfunction (crash) and Security protection
against unauthorized or malicious access.
◦ DBMS must be able to maintain the database System
by allowing the system to evolve as requirements
change over time.

Application Programmer
◦ Responsible for writing database application
programs in some programming language

End User
◦ Access database interactively as just described,
A given user can access the database via online
application program or user query language

Database Designers
◦ Responsible for identifying the data to be stored
in the database and for choosing appropriate
structures to represent and store in database.
◦ It is responsibility of database designers to
communicate with all database user to
understand their requirements, and to come up
with a design that meets users’ requirements.
◦ Designer may be one of staff of Database
Administrator (DBA)

Database Administrators: responsible for authorizing
access to the database, for coordinating and monitoring
its use, and for acquiring software and hardware resource
need
Defining the conceptual schema (Logical/conceptual
Database Design)
Defining the internal schema (Physical Database
design)
Defining security and integrity constraints
Monitoring performance and responding to changing
requirement.
DATABASE SYSTEM
Users/Programmers
Application Programs/Queries
DBMS
Software
Software to Process
Quires/Programs
Software to Access
Stored Data
Stored Database
Definition
(Meta Data)
Stored
Database
ARCHITECTURE
Database
architecture
The
ANSI architecture is divided into three levels— internal,
conceptual, and external
The
external level is the one closest to the users. It
Interacts directly with the user.
 It is the one concerned with the way the data is seen
by individual users( external schema)
It Change the data coming from the conceptual level to a
format and view that are familiar to the users.
The conceptual level defines the logical view of the
data.
 The main functions of DBMS are in this level. It
defines what data are to be stored and mentions
the relationship that exist between the data

The
internal level is the one closest to physical storage.
It is the one concerned with the way the data is stored
inside the system.(internal schema). It determines where
and how the data are actually stored on the storage device. It
deals with the Low-level access method
External level
(individual user views)
External
schema
Conceptual level
(community user views)
External
schema
Conceptual
Schema
Internal level
(storage views)
The three levels of the architecture
Internal
Schema
External
schema
Detailed
system
architecture
Sales Officer
External
Level
Conceptual
Level
Physical
Level
View 1
Item_Name
Price
Inventory Controller
View 2
Item_Name
Stock
Conceptual
Item_Number
Item_Name
Price
Stock
Character (6)
Character(30)
Numeric(5,2)
Numeric(4)
Physical
Stored_Item
Item #
Name
Price
Stock
Length=50
Type = Byte(6), offset = 0, Index = Ix
Type = Byte(30), offset = 6
Type = Byte(8), offset = 36
Type = Byte(4), offset = 44
continue…
This level is closest to the users and is concerned with
the way in which the data is viewed by individual
users. Most of the users are not concerned with all
the information contained in the database. Instead
they need only a part of the database relevant to
them. The system provides many views for the same
database.
continue…




It is the highest level of abstraction of
database.
It allows to see only the data of interest to the
users.
Users can be – Application programmers or
end-users.
Any no. of external views can be viewed from
the – external schema.
continue…

It contains the methods for deriving the
objects such as entities, attributes and
relationships in the external view from the
Conceptual View.
30
This level of abstraction describes what data are actually stored in
the database. It also describes the relationships existing among
data. At this level, the database is described logically in terms
of simple data-structures. The users of this level are not
concerned with how these logical data structures will be
implemented at the physical level, rather they just are
concerned about what information is to be kept in the
database.
continue…

It is the sum total of DBMS users view.

It describes what data are actually stored in the
database (ie,all the records and relationships
included in the database).
continue…

The conceptual view is a representation of the
entire information content of the database in a
form that is some what abstract in comparison
with the way in which the data is physically
stored.
continue…

The conceptual view is defined by means of the
conceptual schema, which includes the
definition of each of the various types of
conceptual records and the mapping between
the conceptual schema and the internal
schema.

It is the lowest level of abstraction.

It describes how the data are physically
stored.

Internal view is represented by internal
schema (internal schema defines the various
types of stored record ,specifies what
indexes exists, how files are represented,
etc.)
The internal level is closest to physical storage.
This level is also termed as physical level. It
describes how the data are actually stored on
the storage medium. At this level, complex
low-level data structures are described in
detail.

conceptual/internal mapping and several
external/conceptual mappings:
1.the conceptual/internal mapping defines the correspondence between
the conceptual view and the stored database; it specifies how conceptual
records and fields are represented at the internal level.
2.an external/conceptual mapping defines the correspondence between a
particular external view and the conceptual view.
External
schema
External
schema
external/conceptual
Conceptual
Schema
conceptual/internal mapping
Internal
Schema
External
schema

Data independence:
1.physical data independence is the ability to modify the physical schema
without causing application programs to be rewritten. (conceptual/internal
mapping)
2.logical data independence is the ability to modify the logical schema
without causing application programs to be rewritten. (external/conceptual)
The collection of information stored in the database at a particular
moment is called an instance of the database.


The overall design of the database is called the database schema.
database schema
instance of the database
Student={sn,name,sex}
student
sn
01
name
carol
sex
female
03
bob
male
Download