0% found this document useful (0 votes)
12 views61 pages

Dataabse Ch1 PDB 2024

This document provides an overview of database systems, including definitions of databases, database management systems (DBMS), and their characteristics. It discusses the roles of various database users, advantages and disadvantages of using DBMS, and the importance of data integrity and security. Additionally, it outlines different types of databases and their applications in managing large collections of data effectively.

Uploaded by

mohmmadalali172
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views61 pages

Dataabse Ch1 PDB 2024

This document provides an overview of database systems, including definitions of databases, database management systems (DBMS), and their characteristics. It discusses the roles of various database users, advantages and disadvantages of using DBMS, and the importance of data integrity and security. Additionally, it outlines different types of databases and their applications in managing large collections of data effectively.

Uploaded by

mohmmadalali172
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

CHAPTER 1

FUNDAMENTALS OF DATABASE SYSTEMS - sixth edition


Ramez Elmasri and Shamkant B. Navathe
Outlines
▪ What is a Database?
▪ Database Management system
▪ Characteristics of the Database Approach
▪ Database users
▪ Advantages of Using the DBMS Approach
▪ Disadvantages of Using the DBMS Approach
▪ Types of database applications
▪ Types of Databases
 A database : is a collection of logically related data.
 Data: facts that can be recorded and that have implicit
Meaning.
❑ A database has the following implicit properties:

 A database represents some aspect of the real world, sometimes


called the miniworld (changes must be reflected).
 A database is a logically coherent collection of data. A random
data cannot correctly be referred to as a database.
 A database is designed, built, and populated with data for a
specific purpose. It has an intended group of users.

3
 Is a collection of programs 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
 Examples : Microsoft Access , Oracle , SQL Server
and MySql.
 The database definition: descriptive information
such as data types and constraints is stored in
the form of a database catalog or dictionary; it
is called meta-data.

4
Data Dictionary Example :

5
 Constructing the database is the process of
storing the data on some storage medium that
is controlled by the DBMS
 Manipulating a database includes:
• Retrieval: Querying, generating reports
• Modification: Insertions, deletions and updates to its content
• Accessing the database through Web applications
 Sharing a database by a set of concurrent users
and application programs – yet, keeping all data
valid and consistent
 Protectionincludes system protection against
hardware or software malfunction (or crashes)
and security protection against unauthorized or
malicious access.

6
What is data, database, DBMS
Data: Known facts that can be recorded and have an implicit meaning; raw
Database: a highly organized, interrelated, and structured set of data
about a particular enterprise
• Controlled by a database management system (DBMS)
DBMS
• Set of programs to access the data
• An environment that is both convenient and efficient to use

Database systems are used to manage collections of data that are:


• Highly valuable
• Relatively large
• Accessed by multiple users and applications, often at the same
time.

Database system:
The DBMS software together with the data itself. Sometimes, the
applications are also included.

A modern database system: is a complex software system whose task is to


manage a large, complex collection of data.
8
Example of A
database Figure
1.2

9
10
1- Self-describing nature of a database system:
The database system contains the database and
a complete definition or description of the
database structure and constraints. This
definition is stored in the DBMS catalog, 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 information stored in the catalog is called
meta- data, and it describes the structure of
the database.

11
12
2- Insulation between programs and data,
and data abstraction:
 In traditional file processing, the structure of data
files is embedded in the application programs, so any
changes to the structure of a file may require
changing all programs that access that file. By
contrast, DBMS access programs do not require such
changes in most cases. The structure of data files is
stored in the DBMS catalog.We call this property
program-data independence.
 data abstraction: A DBMS provides users with a
conceptual representation of data that does not
include many of the details of how the data is
stored. A data model is used to hide storage details
and present the users with a conceptual view of the
database.

13
14
3- Support of multiple views of the data:
A database typically has many users, each of
whom may require a different perspective or
view of the database. A view may be subset
of the database or it may contain virtual
data that is derived from the database files
but is not explicitly stored.

15
16
4-Sharing of data and multiuser transaction
processing:
A multiuser DBMS must allow multiple users
to access the database at the same time.
 The DBMS must include concurrency control
software to ensure that several users trying
to update the same data do so in controlled
manner so that the result of the updates is
correct.

17
 transaction is a process that includes one or more database
accesses, such as reading or updating of database records
 Properties of database transaction(ACID):
 The Atomicity property ensures that either all the database
operations in a transaction are executed or none are.
 Consistency: The transaction must be fully compliant with the
state of the database as it was prior to the transaction. In other
words, the transaction cannot break the database’s constraints.
For example, if a database table’s Phone Number column can
only contain numerals, then consistency dictates that any
transaction attempting to enter an alphabetical letter may not
commit.
 The Isolation property ensures that each transaction appears to
execute in isolation from other transactions, even though
hundreds of transactions may be executing concurrently

 Durability: Transaction data changes must be available, even in


the event of database failure.

18
 File based approach: A collection of
application programs that perform services
for the end-users such as the production of
reports .Each program defines and manages
its own data .
 A file: is an object on a computer that stores
data
 File types:
 Sequential
 Indexed

https://www.ukessays.com 19
 Separation and isolation of data
When data is isolated in separate files, it is more difficult for us to
access data that should be available. The application programmer is
required to synchronize the processing of two or more files to ensure
the correct data is extracted.

 Duplication of data
With the use of the decentralized file-based approach, the uncontrolled
duplication of data used to occur which can lead to loss of data
integrity as well as is wasteful as it occupies unnecessary space in
memory storage area.

 Data dependence
Using file-based system, the physical structure and storage of the data
files and records are defined in the application program code. This
makes the file to be program-data dependent. If the user want to make
any change in the existing structure it was a difficult a task and will
lead to a modification of program. Such maintenance activities are
time-consuming and subject to error.
https://www.ukessays.com 20
 Incompatible file formats
The structures of the file are dependent on the application
programming language. However file structure provided in one
programming language such as direct file, indexed-sequential file which
is available in COBOL programming, may be different from the
structure generated by other programming language such as C. The
direct incompatibility makes them difficult to process jointly.

 Fixed queries / proliferation of application programs


File-based systems are very dependent upon the application
programmer. Any required queries or reports have to be written by the
application programmer.

https://www.ukessays.com 21
22
File Environment
Data
User 1
Transactions
Program 1
A,B,C

User 2
Transactions
Program 2
X,B,Y

User 3
Transactions
Program 3
L,B,M

23
Database
User 1
Transactions
Program 1
A,
D B,
User 2 B C,
Transactions M X,
Program 2 S Y,
L,
M
User 3
Transactions
Program 3

24
1. Database Administrators
2. Database Designers
3. End Users
4. System Analysts and Application
Programmers

25
 database administrator (DBA) is responsible for
administrating the database itself, the DBMS and
related software.
 A person responsible for installing, administering, and
maintaining the database.

 The DBA is responsible for :


▪ Authorizing access to the database,
▪ Coordinating and monitoring its use
▪ Acquiring software and hardware resources
as needed.
▪ Dealing with problems such as security
considerations and poor system response
time.

26
 Database designers are responsible for
▪ identifying the data to be stored in the database
, choosing appropriate structures to represent and
store this data.
▪interact with each potential group of users and
develop views of the database that meet the data
and processing requirements of these groups.
▪Each view is then analyzed and integrated with the
views of other user groups. The final database
design must support the requirements of all user
groups.

27
 End users :are the people whose jobs require access to the database for
querying, updating, and generating reports; the database primarily exists
for their use.
 There are several categories of end users:
1 Casual end users :occasionally access the database, but they may need
different information each time. They use a sophisticated database query
language to specify their requests and are typically middle- or high-level
managers .

2 Naive end users make up a sizable portion of database end users. Their
job is constantly querying and updating the database, using standard
types of queries and updates .
The tasks that such users perform are varied:
▪ Bank tellers check account balances and post withdrawals and deposits.
▪ Reservation agents for airlines, hotels, and car rental companies check
availability for a given request and make reservations.

28
3 Sophisticated end users include engineers, scientists, business
analysts, and others who thoroughly familiarize themselves with the
facilities of the DBMS in order to implement their own applications to meet
their complex requirements.

29
 System analysts determine the requirements
of end users, especially naive end users, and
develop specifications for standard
transactions that meet these requirements.
 Application programmers implement these
specifications as programs; then they test,
debug, document, and maintain these
transactions.
 Such analysts and programmers—commonly
referred to as software developers or
software engineers

30
1- Controlling Redundancy
 In file Based systems redundancy leads to
several problems:
1. Entering data for a new client—multiple
times this leads to duplication of effort.
2. storage space is wasted
3. Files that represent the same data may
become inconsistent. This may happen
because an update is applied to some of
the files but not to others.

31
 In Databases :Database design should store
each logical data item—such as a client’s name
or birth date—in only one place in the
database. This is known as data
normalization, and it ensures consistency
and saves storage space.
 It is sometimes necessary to use controlled
redundancy to improve the performance of
queries. For example, we may store
Student_name and Course_number redundantly
in a GRADE_REPORT file.

32
33
 When multiple users share a large database, it is
likely that most users will not be authorized to
access all information in the database.
 some users may only can retrieve data, others
are allowed to retrieve and update.
 users are given account numbers protected by
passwords, which they can use to gain access to
the database .
 DBMS should provide a security and
authorization subsystem, which the DBA uses
to create accounts and to specify account
restrictions.
34
 Combining all the organization’s data into
one database ,and creating a set of
applications that works on it results in cost
saving .
 This enables the whole organization to invest
in more powerful processors, storage devices
rather than having each department
purchase its own (lower performance)
equipment. This reduces overall costs of
operation and management.

35
 The database approach permits the DBA to
define and enforce standards among
database users in a large organization. This
facilitates communication and cooperation
among various departments and users within
the organization. (Standards can be defined
for names and formats of data elements,
display formats, report structures and so on).

36
 Itmay be necessary to change the structure of
a database as requirements change.
 Modern DBMSs allow certain types of changes
to the structure of the database without
affecting the stored data and the existing
application programs.

37
A DBMS must provide facilities for recovering
from hardware or software failures.
 The backup and recovery subsystem of the
DBMS is responsible for recovery.

38
 Integrity is represented in terms of
constraints ,which are rules that the
database is not permitted to violate .
 DBA should use the DBMS to enforce integrity
constraints .

39
 The DBMS provides many of the standard
functions that the programmer would have to
write using the file_based application .
 Programmer focus on specific functions .

40
 DBMS provides a query language that allows
to ask questions to obtain required
information immediately with out the need
to write extra software .

Meta data is separated from application


programs

41
1 Size(memory).
2 cost(hardware, software, programming,
training users).
3 Performance(generality).
4 Higher impact of a failure(centralization).

42
 Traditionaldatabases:
 Which are that applications have existed for
half a century. However the need of them is
continuous and their techniques are
developing . Such as Numeric and textual
databases where text and numbers are
manipulated and reports are generated.
 Examples:
 Multimedia databases
 Geographic Information Systems (GIS)
 Biological and genome databases
 Data warehouses
 Mobile databases
 Real-time and active databases
Types of Databases
 There are various types of databases used for
storing different varieties of data:

Source: https://www.javatpoint.com/types-of-databases
Types of Databases
1) Centralized Database
It is the type of database that stores data at a
centralized database system. It comforts the
users to access the stored data from different
locations through several applications. These
applications contain the authentication process
to let users access data securely. An example of
a Centralized database can be Central Library
that carries a central database of each library in
a college/university.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
Advantages of Centralized Database
• Data consistency is maintained as it manages
data in a central repository.
• It provides better data quality, which enables
organizations to establish data standards.
• It is less costly because fewer vendors are
required to handle the data sets.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
Disadvantages of Centralized Database
• The size of the centralized database is large,
which increases the response time for
fetching the data.
• It is not easy to update such an extensive
database system.
• If any server failure occurs, entire data will
be lost, which could be a huge loss.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
2) Distributed Database
 Unlike a centralized database system, in
distributed systems, data is distributed among
different database systems of an organization.
These database systems are connected via
communication links. Such links help the end-
users to access the data easily. Examples of
the Distributed database are Apache
Cassandra, HBase, Ignite, etc.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
We can further divide a distributed
database system into:

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
•Homogeneous DDB: Those database
systems which execute on the same
operating system and use the same
application process and carry the same
hardware devices.
•Heterogeneous DDB: Those database
systems which execute on different
operating systems under different
application procedures, and carries
different hardware devices.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
Advantages of Distributed Database
•Modular development is possible in
a distributed database, i.e., the
system can be expanded by
including new computers and
connecting them to the distributed
system.
•One server failure will not affect
the entire data set.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
3) Relational Database
•This database is based on the relational
data model, which stores data in the form
of rows(tuple) and columns(attributes),
and together forms a table(relation). A
relational database uses SQL for storing,
manipulating, as well as maintaining the
data. Each table in the database carries a
key that makes the data unique from
others.
•Examples of Relational databases are
MySQL, Microsoft SQL Server, Oracle, etc.
Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
4) NoSQL Database
Non-SQL/Not Only SQL is a type of database
that is used for storing a wide range of data
sets. It is not a relational database as it
stores data not only in tabular form but in
several different ways. It came into
existence when the demand for building
modern applications increased. Thus, NoSQL
presented a wide variety of database
technologies in response to the demands.
We can further divide a NoSQL database into
the following four types:
Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
1.Key-value storage: It is the simplest
type of database storage where it stores
every single item as a key (or attribute
name) holding its value, together.
2.Document-oriented Database: A type
of database used to store data as JSON-
like document. It helps developers in
storing data by using the same document-
model format as used in the application
code.
3.Graph Databases: It is used for storing
vast amounts of data in a graph-like
structure. Most commonly, social
networking websites use the graph
database.
4.Wide-column stores: It is similar to
the data represented in relational
databases. Here, data is stored in large
columns together, instead of storing in
rows.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
Advantages of NoSQL Database
• It is a better option for managing and
handling large data sets.
• It provides high scalability.
• Users can quickly access data from the
database through key-value.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
5) Cloud Database
A type of database where data is stored in a virtual environment
and executes over the cloud computing platform. It provides users
with various cloud computing services (SaaS, PaaS, IaaS, etc.) for
accessing the database. There are numerous cloud platforms, but
the best options are:
• Amazon Web Services(AWS)
• Microsoft Azure
• Kamatera Cloud computing: Allows on demand
• PhonixNAP network access to a shared computer
• ScienceSoft recourses.
• Google Cloud SQL, etc. Managing, storing and processing data
online

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
6) Object-oriented Databases
The type of database that uses the object-
based data model approach for storing data in
the database system. The data is represented
and stored as objects which are similar to the
objects used in the object-oriented
programming language.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
7) Hierarchical Databases
• It is the type of database that stores data in the form
of parent-children relationship nodes. Here, it
organizes data in a tree-like structure
• Data get stored in the form of records that are
connected via links. Each child record in the tree
will contain only one parent. On the other hand,
each parent record can have multiple child records.

Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
8) Network Databases
It is the database that typically follows the network data
model. Here, the representation of data is in the form of
nodes connected via links between them. Unlike the
hierarchical database, it allows each record to have multiple
children and parent nodes to form a generalized graph
structure.

9) Personal Database
Collecting and storing data on the user's system defines a
Personal Database. This database is basically designed for a
single user.
Advantage of Personal Database
• It is simple and easy to handle.
• It occupies less storage space as it is small in size.
Source: https://www.javatpoint.com/types-of-databases
Types of Databases(Cont.)
10) Enterprise Database
Large organizations or enterprises use this
database for managing a massive amount of
data. It helps organizations to increase and
improve their efficiency. Such a database allows
simultaneous access to users.
Advantages of Enterprise Database:
• Multi processes are supportable over the Enterprise database.
• It allows executing parallel queries on the system.

Source: https://www.javatpoint.com/types-of-databases

You might also like