CS2005 Database System
Saba Ghani
FAST-NU
Chiniot-Faisalabad campus
Lecture 1.2
Introduction to data and information
File management system
Database
Properties of database
Database Management system
Advantages of Database system
Introduction to Data and Information
Data:
Raw facts and figures
Example: the numbers 10.5, 22, and 119 are data
Information
Process form of data that is meaningful
Introduction to Data and Information
Information: Data Processed to reveal its meaning
Information is meaningful
In today’s world, accurate, relevant and timely information is the
key to good decision making
Good decision making is key to survival in today’s competitive and
global environment
Example: The temperature of room 119 in building 22 is 10.5, is an
information
Data, information and knowledge
Knowledge: is something which is derived or inferred from
available information using some level of intelligence.
Example: Based on experience, the above information can be used
to infer that the room is quite cold and could cause some
inconvenience if we work in that room for a long period of time
with out wearing worm clothes.
Data,
information
and
knowledge
Database
Databases and database technology have had a major impact on the growing
use of computers.
Database Play a critical role in almost all areas where computers are used,
including business, electronic commerce, social media, engineering,
medicine, genetics, law, education, and library science
Database
Collection of logically interrelated data that can be shared
By data, we mean known facts that can be recorded and that have implicit
meaning.
For example, consider the names, telephone numbers, and addresses of the
people you know.
Database
Def 1: Database is an organized collection of logically related
data
Def 2: A database is a shared collection of logically related data
that is stored to meet the requirements of different users of an
organization
Def 3: A database is a self-describing collection of integrated
records
Def 4: A database models a particular real world system in the
computer in the form of data
Properties of Database
A database has the 3 implicit properties:
1. A database represents some aspect of the real world, sometimes
called the miniworld or the universe of discourse (UoD). Changes to
the miniworld are reflected in the database.
2. A database is a logically coherent collection of data with some
inherent meaning. A random assortment of data cannot correctly be
referred to as a database.
3. A database is designed, built, and populated with data for a specific
purpose. It has an intended group of users and some preconceived
applications in which these users are interested.
Why we need Database?
Older/legacy system uses simple file system to stored data
These system have an issue of
1. Data Redundancy
2. Data inconsistency
3. Data integrity issue
4. Security and protection
5. Data Retrieval
6. And Many more……
Database Management System (DBMS)
A database management system (DBMS) is a computerized system that
enables users to create and maintain a database.
The DBMS is a general-purpose software system that facilitates the processes
of defining, constructing, manipulating, and sharing
databases among various users and applications
Database Management System (DBMS)
Defining a database involves specifying the data types, structures, and
constraints of the data to be stored in the database. The database definition
or descriptive information is also stored by the DBMS in the form of a
database catalog or dictionary; it is called meta-data.
Constructing the database is the process of storing the data on some storage
medium that is controlled by the DBMS.
Manipulating a database includes functions such as querying the database to
retrieve specific data, updating the database to reflect changes in the
miniworld, and generating reports from the data.
Sharing a database allows multiple users and programs to access the database
simultaneously.
Example
UNIVERSITY database for maintaining information concerning
students, courses, and grades in a university environment
Define: file (records), data elements, data type ( for each data
element)
Construct: store data in the appropriate files (note that records
may be related between files)
Manipulation: querying, updating
informal queries and updates must be specified precisely in the
database system language before they can be processed.
Sharing: Users from different departments can share same
files
DBMS’s Example
Oracle
IBM DB2
Ingress
Teradata
MS SQL Server
MS Access
MySQL etc.
Functions of DBMS
1. Access & Process:
1. An application program accesses the database by sending queries or requests for
data to the DBMS. A query typically causes some data to be retrieved; a transaction
may cause some data to be read and some data to be written into the database.
2. Protection:
1. includes protecting the database and maintaining it over a long period of time.
Protection includes system protection against hardware or software malfunction (or
crashes) and security protection against unauthorized or malicious access.
Functions of
DBMS
Characteristics of the
Database Approach
1. Self-describing nature of a database
system
2. Insulation between programs and data,
and data abstraction
3. Support of multiple views of the data
4. Sharing of data and multiuser transaction
processing
1. Self-Describing Nature of a
Database System
single repository of data is maintained
Repository is a structure that stores metadata. It is
used to control database operations, integrity and
accuracy.
contains not only the database itself but also a
complete definition or description of the database
structure and constraints (system catalogue).
information stored in the catalog is called meta-data
catalog used by the DBMS and users.
The DBMS software work equally well with any
number of database applications.
Meta Data
Meta Data
Data about data
OR
Data that describe the properties or characteristics of
end-user data and the context of those data.
metadata contains data item name, the data type,
length, minimum and maximum allowable values
(where appropriate), a brief description of each data
item, and the source of the data.
Meta Data is store in a file called repository, data
dictionary or catalog.
2. Insulation between Programs
and Data, and Data Abstraction
In traditional file system , the program and data are
dependent on each others.
Changes in data causes to change whole program/
structure
But In DBMS the program and data are independent.
Change in data does not causes to change the whole
program.
This concepts is known as data abstraction
The data abstraction is achieved through transparency
by separating the user level from conceptual level
2. Insulation between Programs
and Data, and Data Abstraction
In database system, users can define operations
on data as part of the database definitions.
An operation (also called a function or method) is
specified in two parts.
User level operation: The interface (or signature)
of an operation includes the operation name and
the data types of its arguments (or parameters).
Conceptual Level: The implementation (or
method) of the operation is specified separately
and can be changed without affecting the
interface.
3. Support of Multiple Views
of the Data
A database typically has many types of users,
each of whom may require a different
perspective or view of the database.
A database view is a subset of a database and is
based on a query that runs on one or more database
tables.
3. Support of Multiple Views
of the Data
A view may be a subset of the database, or it
may contain virtual data (derived from the
database files but is not explicitly stored).
A multiuser DBMS whose users have a variety
of distinct applications must provide facilities
for defining multiple views
Examples: Flex, Facebook view etc
4. Sharing of Data and Multiuser
Transaction Processing
In multiusers database system, multiple user
can access same/different content
To ensure integrity, the database must include
concurrency control mechanism and different
type of constraints to ensure correct execution
of program and maintain correct state of
database.
Advantages of DBS
Controlling Redundancy
Problems:
University System
Student Registration Fee department Library
Advantages of DBS
Registration
Fee
Library
Advantages of DBS
1. Controlling Redundancy
2. Reduce data inconsistency
3. Restricting Unauthorized Access
4. Providing Multiple User Interfaces
5. Representing Complex Relationships Among
Data
6. Enforcing Integrity Constraints
7. Providing Backup and Recovery
Advantages of DBS
Reduce data inconsistency
Data is not duplicated so need to apply only single update.
This causes consistent data.
As no row is duplicated so record of each instance is consistent
and accurate.
Advantages of DBS
Restricting Unauthorized Access
users or user groups are given account numbers protected by
passwords, which they can use to gain access to the database
through security and authorization subsystem
Providing Multiple User Interfaces
a DBMS provides a variety of user interfaces: query languages for
casual users; programming language interfaces for application
programmers; forms and command codes for parametric users;
and menu-driven interfaces and natural language interfaces for
stand-alone users.
Capabilities for providing World Wide Web access to a database
Advantages of DBS
Representing Complex Relationships Among Data
Enforcing Integrity Constraints
Data integrity refers to correctness and accuracy of data
The simplest type involves specifying a data type for each data item
A more complex type involves specifying that a record in one file must
be related to records in other files.
Another type specifies uniqueness on data item values
It is the database designers’ responsibility to identify integrity
constraints during database design.
Providing Backup and Recovery
provide facilities for recovering from hardware or software
failures.(The backup and recovery subsystem )
Are there any DISADVANTAGES of DBMS?