Dbms Boiii
Dbms Boiii
Basic Definitions
Data:
Known facts that can be recorded and have an implicit meaning.
Database:
A collection of related data.
Database Management System (DBMS):
Collection of programs that enables users to create and maintain
a database.
A software package/ system to facilitate the creation and
maintenance of a computerized database.
Types of Databases and Database Applications
Numeric and Textual Databases
Multimedia Databases
Geographic Information Systems (GIS)
Data Warehouses
Real-time and Active Databases
File System and Drawbacks of using file
system
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
Integrity problems
Integrity constraints - provide a way of ensuring that changes
made to the database by authorized users do not result in a
loss of data consistency.
Hard to add new constraints or change existing ones
Drawbacks of using File system
Atomicity of updates
Failures may leave database in an inconsistent state with partial
updates carried out
E.g. 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
E.g. two people reading a balance and updating it at the same time
Security problems
Database System:
The DBMS software and the database.
Characteristics of the Database Approach
Self-describing nature of a database system:
A DBMS catalog stores the description of the database. Which
contains information such as the structure of each file, the type
and storage format of each data item, and various constraints on
the data. The description is called meta-data.
This allows the DBMS software to work with different
databases.
Insulation between programs and data:
Called program-data independence.
Allows changing data storage structures and operations without
having to change the DBMS access programs.
Characteristics of the Database Approach
Data Abstraction:
A data model is used to hide storage details and present the
users with a conceptual view of the database.
Slide 1-9
Typical DBMS Functionality
Other features:
Protection or Security measures to prevent unauthorized
access
“Active” processing to take internal actions on data
Presentation and Visualization of data
Example of a Database
(with a Conceptual Data Model)
Slide 1-
11
Example of a Database
(with a Conceptual Data Model)
Some mini-world relationships:
SECTIONs are of specific COURSEs
STUDENTs take SECTIONs
COURSEs have prerequisite COURSEs
INSTRUCTORs teach SECTIONs
COURSEs are offered by DEPARTMENTs
STUDENTs major in DEPARTMENTs
Slide 1-
12
Database Users
Users may be divided into
those who actually use and control the content (called
“Actors on the Scene”) and
those who enable the database to be developed and the
DBMS software to be designed and implemented (called
“Workers Behind the Scene”).
Slide 1-
13
Database Users
Actors on the scene
Database administrators: responsible for authorizing
access to the database, for coordinating and monitoring
its use, acquiring software and hardware resources,
controlling its use and monitoring efficiency of
operations.
Database Designers: responsible to define the
content, the structure, the constraints, and functions or
transactions against the database. They must
communicate with the end-users and understand their
needs.
End-users: they use the data for queries, reports and
some of them actually update the database content. Slide 1-
14
Categories of End-users
Casual : access database occasionally when needed
Naive or Parametric : they make up a large section of the
end-user population. They use previously well-defined
functions in the form of “canned transactions” against the
database.
Examples are bank-tellers or reservation clerks who do this activity
for an entire shift of operations.
Slide 1-
15
Categories of End-users
Sophisticated : these include business analysts, scientists,
engineers, others thoroughly familiar with the system
capabilities. Many use tools in the form of software packages
that work closely with the stored database.
Slide 1-
16
Workers Behind the Scene
DBMS system Designers and Implementers
Design and implement the DBMS modules and
interfaces as a software package.
Tool Developers
Design and implement tools
Operators and Maintenance Personnel
Responsible for the actual running and maintenance of
the hardware and software environment for the database
system.
Slide 1-
17
Advantages of Using the Database Approach
Controlling redundancy
Slide 1-
21
When not to use a DBMS
When no DBMS may suffice:
If the database system is not able to handle the complexity of
data because of modeling limitations
If the database users need special operations not supported by
the DBMS.
Slide 1-
22
Data Models
Data Model:
A collection of concepts to describe the structure of a database,
the operations for manipulating these structures, and certain
constraints that the database should obey.
Data Model Structure and Constraints:
Constructs are used to define the database structure
Constructs typically include elements (and their data types) as
well as groups of elements (e.g. entity, record, table), and
relationships among such groups
Constraints specify some restrictions on valid data; these
constraints must be enforced at all times
Categories of Data Models
Conceptual (high-level, semantic) data models:
Provide concepts that are close to the way many users perceive
data. (Also called entity-based or object-based data models.)
Physical (low-level, internal) data models:
Provide concepts that describe details of how data is stored in the
computer.
These are usually specified through DBMS design and
administration manuals
Implementation (representational) data models:
Provide concepts that fall between the above two, used by many
commercial
DBMS implementations (e.g. relational data models used in many
commercial systems).
Schemas versus Instances
Database Schema:
The description of a database.
Includes descriptions of the database structure, data types, and
the constraints on the database.
Slide 1-25
Database State:
The data stored in a database at a particular moment in time. This
includes the collection of all the data in the database.
Refers to the content of a database at a moment in time.
Also called database instance (or occurrence or snapshot).
The term instance is also applied to individual database
components, e.g. record instance, table instance, entity instance
Initial Database State:
Refers to the database state when it is initially loaded into the
system.
Valid State:
A state that satisfies the structure and constraints of the
database.
Distinction
The database schema changes very infrequently.
The database state changes every time the database is updated.
Schema is also called intension.
Slide 1-50
A database system being a complex software
system is partitioned into several software
components that handle various tasks such as
data definition and manipulation, security and
data integrity, data recovery and concurrency
control, and performance optimization
Data definition:
DBMS provides functions to define the structure of the data.
functions include defining and modifying the record structure, the
data type of fields, and the various constraints to be satisfied by the
data in each field.