FDBS Chapter-1 2017
FDBS Chapter-1 2017
4
1. Introduction
5
1. Introduction…
◦ The rows are called Tuples or
Records in which the data items within
one row may belong to different data
types.
◦ Table or Relation: Collection of
related records.
◦ The columns of this relation are called
Fields, Attributes or Domains that
have the same data type.
6
1. Introduction….
What is Database?
A Database is a collection of interrelated data
items that contains information relevant to an
enterprise.
A database is a collection of related data that is
managed by a DBMS .
Database properties
◦ It represents some aspect of the real world
◦ It is a logically coherent & internally consistent.
◦ It is designed, built, and populated with data for a
specific purpose.
7
1. Introduction….
A database has some source from which data
is
Derived or collected
The degree of interaction with events in the real world.
An audience that is actively interested in its contents.
The end users of a database that perform business
transactions that cause the information in the
database to change.
A database can be of any size and complexity.
A database may be generated and maintained
manually or it may be computerized.
8
1. Introduction…
Database is essential to every
business to
◦ Maintain internal record,
◦ present data to customers on the WWW,
◦ Support many commercial systems
(bank, airline, telecom)
And other institutions like
Health institutions
Education institutions
Research Institutions
9
Purpose of Database Systems
Keeping organizational information in a
file-processing system has a number of
major disadvantages:
◦ Data redundancy and inconsistency.
◦ Data isolation
◦ Integrity problems
◦ Atomicity problems
◦ Concurrent-access anomalies
◦ Security problems
10
Classification of DBSs
Several criteria used to classify DBSs;
distributed.
computer site.
a computer network.
11
Data management
Data management passes through the
different levels of development along
with the development in technology
and services.
Different approaches of data
managements
√ Manual approach
√ Traditional file based approach
√ Database approach
12
Manual data management Approach
Data storage and retrieval is traditional way of
information handling.
Data handling is using cards and papers.
Uses human labor to
◦ File for every event & object in organizations.
◦ Organized each files that containing various kinds of
information that are labeled and stored in one or more
cabinets.
◦ Keep each cabinets in secure places for security
purpose.
◦ Insertion & retrieval(cabinet, file, info) for later use.
◦ Indexing is used to make searching easy
13
Limitations of Manual approach
Prone to error
Difficult to update, retrieve, integrate
Difficult to compile & manage
Time consuming & tiresome
Cross referencing is difficult
Limited to small size information
You have the data but it is difficult to
compile the information.
14
Traditional File-based
File-based approach
◦ It uses a collection of application programs that perform
services for the end-users.
◦ Every application program that provides service to end users
defines and manages its own data.
◦ Each user defines and implements the files needed for a
specific application as part of programming the application.
◦ It is an early attempt to computerize the manual filing
system.
◦ It is the decentralized computerized data handling method.
◦ File in traditional file based approach, is a collection of
records which contains logically related data.
15
File-based approach…
16
File-based approach…
For example,
registrar office - keep a file of students and their
grades.
Programs to print a student’s transcript and to enter
new grades into the file are implemented.
finance office - keep track of students’ payments.
Both users are interested in data about students, But
each user maintains separate files and programs to
manipulate these file.
Limitations of File Based approach
Separation or Isolation of Data
Limited data sharing.
Lengthy development and maintenance time.
Duplication or redundancy of data.
Data dependency on the application
17
Limitations of File Based approach
Inconsistency
◦ various copies of the same data is conflicting.
◦ Incompatible file formats between different
applications.
◦ Fixed query processing
Data Isolation
Deletion Anomalies
Insertion Anomalies
19
Database Approach
21
Database approach…
Characteristics of Database approach
1.Self-Describing nature of a Database System:
It contains the descriptions of data structure and
constraints.
The data about data is called Meta-data
Meta-data is stored in the system catalog
In file-based system data definition is a part of
application programs.
II. Isolation between Program and Data:
In file-based system, if user wants to change the
structure of a file, all the programs access to that files
might need to be changed.
In database approach, data structure is stored in the
system catalog not in the programs so program changes
are not necessarily change the files.
22
Characteristics of Database approach
III. Support multiple views of data:
view is a subset of the database which is defined
and dedicated for particular users of the system.
Multiple users might have different views of the
system.
IV. Sharing of data and Multi-user system:
A database system allow multiple users to access
the database at the same time.
The multi-user DBMS must have concurrency
control strategies to ensure that several user try
to access the same data item at a time do so in
the manner so that the data always be correct.
23
Benefits of Database approach
® Improved accessibility of data: by using structured query
simultaneously.
A collection of programs that enable users to create,
31
… (DBMS)
Types of database commands that are
used in DDL
Create: It is used to create objects in the database
34
Transaction Control Language (TCL).
TCL is used to run the changes made by the
DML commands and manage the transaction of
the database.
Types of TCL commands
36
Functions of a DBMS
A user-accessible catalog
Transaction support
Recovery services
Authorization services
Integrity services
Utility services
37
Components of the DBMS Environment
39
Disadvantages of DBMS
Complexity
Size
Cost of DBMSs
Additional hardware costs
Cost of conversion
Performance
40
Database Users and Their Roles
There are different types of users of the
Database.
I. End users
querying, updating and generating a report.
End users might be one of the following:
Naïve users: are people who use the existing application
41
Casual Users
• Users who access the database
occasionally.
• Need different information from the
database each time.
• Use sophisticated database queries to
satisfy their needs.
• Are most of the time middle to high level
managers.
42
Database Users
II. Application Programmers
◦ Schema definition
requirements.
data.
49
Levels of Data Abstraction
52
… cont.
54
…cont’d
55
Importance of data abstraction
Security: By controlling access to data
at different levels, sensitive
information can be restricted from
unauthorized users.
Simplicity: Allows end-users to interact
with a simplified representation of data,
making it easier to use database system.
It reduce complexity by hiding complex
details.
56
Categories of Data Model…
II. Record-based Data models
• Provide concepts that can be understood by the
user but not too far from the way data is stored in
the computer.
• It used to specify the overall structure of the
database and a higher-level description of the
implementation.
• The database consists of a number of fixed-format
records, possibly of differing types.
• Each record type defines a fixed number of fields.
59
Hierarchical model:
advantages of a hierarchical database :
◦ Efficient representation of hierarchical structures,
◦ Efficient single key search and access time
◦ Fast update performance where locality of
reference exists
disadvantages of a hierarchical
database :
◦ Lack of flexibility (non-hierarchical relationships
are awkward to represent; redundancy may be
required),
◦ Poor performance for non-hierarchical accesses,
◦ Lack of maintainability
(changing R/ship may require physical
change of data).
60
Record based…
b) Network model
Data are represented by
collections of records.
Relationships among data are
represented by links
61
Network model:
Advantages of a network database :
another type)
◦ Update overheads.
62
Record based…
c) Relational data model
◦ Data and relationships are represented by
a collection of tables.
◦ Each table has a number of columns with
unique names, e.g. customer, account
63
Relational data model:
Advantages of RDBMS
◦ Flexible and well-established
◦ used over many years. thus stable,
standardized products available.
◦ Standard data access language
through SQL.
◦ The fundamental structure, i.e., a
table, is easily understood and the
design. 64
Relational data model:
Weakness of RDBMS
◦ Performance problems associated with re-
assembling simple data structures into
their more complicated real-world
representations.
◦ Lack of support for complex base types,
e.g., drawings
◦ SQL is limited when accessing complex
data.
◦ Knowledge of the database structure is65
III. Physical Data Models
Physical data models describe how
data is stored in the computer,
representing information such as
record structures, record
orderings, and access paths.
66
The end…
67