data: ◦ raw facts; building blocks of information ◦ unprocessed information information: ◦...
TRANSCRIPT
Introduction to Database Management System
Data vs. Information
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 Examples 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 reservationPurchase something on lineBuy groceries in supermarkets
Database System Database Management System
(DBMS):A software package/system to facilitate theDefine, Construct, Manipulate and Share
functions of a computerized database.
Database System
What is database system
Database system is a computerized record-keeping 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.
Slide 1- 6
Database Systems: Then
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
Operations
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 base system
DataHardwareSoftwareUsers
Database System Components
The data in database – for large system- will 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
Hardware
Database Management System (DBMS)Data => physically stored All request for access to the database are
handle by the DBMSDBMS is thus shielding of database users
from hardware level detailsProvides users with a perception of the
database that is elevated somewhat above the hardware level details.
Support user operations
Software
DATABASE SYSTEM
Application Program/Queries
DBMS SOFTWARE
Software to Process Queries/Programs
Software to Access Stored Data
Stored Database Definition
Stored Database
Users/Programmers
DATABASE SYSTEM
Application Program/Queries
DBMS SOFTWARE
Software to Process Queries/Programs
Software to Access Stored Data
Stored Database Definition
Stored Database
Users/Programmers
1. Data
2. Software
3. Users
4. Hardware
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.
Database Management System
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
User
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.
Users/Programmers
Application Programs/Queries
Software to Process Quires/Programs
Software to Access Stored
Data
DBMS Software
Stored Database
Stored Database Definition
(Meta Data)
DATABASE SYSTEM
ARCHITECTUREARCHITECTURE
Database architecture
The three levels
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 ANSI architecture is divided into three levels— internal, conceptual, and external
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
The three levels
External level
(individual user views)
Conceptual level
(community user views)
Internal level
(storage views)
The three levels of the architecture
Internal Schema
Conceptual Schema
External schema
External schema
External schema
The three levels
Detailed system architecture
Three Level Architecture of DBMS
continue…
View 1Item_NamePrice
Conceptual Item_Number Character (6)Item_Name Character(30)Price Numeric(5,2)Stock Numeric(4)
PhysicalStored_Item Length=50Item # Type = Byte(6), offset = 0, Index = IxName Type = Byte(30), offset = 6Price Type = Byte(8), offset = 36Stock Type = Byte(4), offset = 44
ExternalLevel
Conceptual Level
PhysicalLevel
View 2Item_NameStock
Sales Officer Inventory Controller
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.
External or View Level
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.
External or View Levelcontinue…
30
It contains the methods for deriving the
objects such as entities, attributes and
relationships in the external view from the
Conceptual View.
External or View levelcontinue…
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.
Conceptual Level
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).
Conceptual Levelcontinue…
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.
Conceptual Levelcontinue…
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.
Conceptual Levelcontinue…
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.)
Internal or Physical Level
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.
Internal or Physical Level
Mappings
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.
1.5.2 Mappings
Internal Schema
Conceptual Schema
External schema
External schema
External schema
conceptual/internal mapping
external/conceptual
Mappings
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)
Instances and schemas
The overall design of the database is called the database schema.
The collection of information stored in the database at a particular moment is called an instance of the database.
database schema instance of the database
sn name sex
01 carol female
03 bob malestudent
Student={sn,name,sex}