5 Unnamed 03 05 2023
5 Unnamed 03 05 2023
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
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
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
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/Database instance :
Slide 1-50
A database system being a complex software
system is partitioned into several software
components that handle various tasks such as
Slide 1-76
Relational model
Slide 1-78
Slide 1-79