0% found this document useful (0 votes)
10 views74 pages

Chapter 1 Introduction To Databases For Students

Chapter 1 introduces databases, emphasizing their role in organizing, securing, and efficiently retrieving data for multiple users. It contrasts traditional file-based systems with the database approach, highlighting the advantages of using Database Management Systems (DBMS) such as data integrity, minimal redundancy, and support for concurrent access. Key characteristics of databases include data independence, multiple views, data sharing, and security measures to protect against unauthorized access.

Uploaded by

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

Chapter 1 Introduction To Databases For Students

Chapter 1 introduces databases, emphasizing their role in organizing, securing, and efficiently retrieving data for multiple users. It contrasts traditional file-based systems with the database approach, highlighting the advantages of using Database Management Systems (DBMS) such as data integrity, minimal redundancy, and support for concurrent access. Key characteristics of databases include data independence, multiple views, data sharing, and security measures to protect against unauthorized access.

Uploaded by

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

Chapter 1

Introduction to Databases

1
DB course is about:
– How to organize data
– Supporting multiple users
– Efficient and effective data retrieval
– Secured and reliable storage of data
– Maintaining consistent data
– Making information useful for decision making

2
Chapter 1 Topics
• Introduction to database
1.1.Traditional File-Based Systems
1.2.Database Approach
1.3.Characteristics of the Database Approach
1.4.Advantages of Using the DBMS Approach
1.5.Roles in the Database Environment
1.6.History of Database Management Systems
1.7.Advantages and Disadvantages of DBMSs

3
Basic Terms

• Data : is a collection of raw facts.

• Information : is a processed data in the form that is


meaningful to the user.

• Information System is a system that:


– Receives data and instruction

– Processes the data as per the instruction

– Produces output

– Stores data/information for future use 4


Basic Terms cont…

• A database system is basically a computerized


record keeping system.
• Users of the database can perform a variety of
operations. Such as:
– Adding new data to empty file
– Adding new data to an existing file
– Retrieving data from an existing file
– Modifying data to an existing file
– Deleting data from an existing file
– Searching for target information
5
Data handling approaches

• There are three main data processing approaches –


– Manual Approach
– File based Approach
– Database Approach

6
Manual Approach
– data storage and retrieval follows the primitive
and traditional way of data/information handling
where cards and papers are used for the purpose.
– Typing the data on paper and put in a file cabinet
– storage and retrieval will be performed using
human labour.
– Works well if the number of items to be stored is
small
7
Limitations of the Manual approach
– Prone to error
– Data loss: due to damaged papers or unable to locate it.

– Redundancy: multiple copies of the same data within the


organization.
– Inconsistency: Modifications are not reflected on all multiple
copies
– Difficult to update, retrieve, integrate

– You have the data but it is difficult to compile the information

– Limited to small size information

– Cross referencing is difficult 8


Personal Calendar
• W e might start by building a file with the
following structure:
What Day Time with_whom Where

Lunch 10/24 1pm Abebe Bole


CS123 10/25 9am Seble Room 234
shop 10/26 9am Ayele Piassa
Dinner 10/26 6PM Elfinesh Café

• This calendar is easy to deal with.

9
File based Approach
– an early attempt to computerize the manual filing system.

– There were, and still are, several computer applications with


file based processing for the purpose of data handling

– In such systems, every application program that provides


service to end users define and manage its own data.

– Such systems have a number of programs for each of the


different applications in the organization. And this approach
is the decentralized computerized data handling method.

10
F ile-B ased A pproac h

14

11
Limitations of the File Based approach
– Inconsistency: Logical mismatch of data in files especially
caused due to changes
– Redundancy: Repeated occurrences of the same date in
different files.
• Problems: Wastage of memory, increased management,
increased processing time and cost
– Data Program dependence: Changes in program structure
required to Incorporate new data type. Changes in file
structure lead to changes in the application program
structure 12
Limitations of the File Based approach Cont..

• Incompatible file formats


• Limited data sharing: Difficult lo obtain data from several in
compartible files from separate systems.
• Security problems: It is difficult to enforce security system

13
Database Approach

• A Database is shared collection of logically related data (and a

description of this data), designed to meet the information

needs of an organization. (Centralized System).


– Shared collection – can be used simultaneously by many departments

and users.

– Logically related - comprises the important objects and the

relationships between these objects.

– Description of the data – the system catalog (data dictionary or meta-

data) provides description of data to enable data independence

(program–data independence). 14
• Database is a collection of logically related data where these

logically related data comprises entities, attributes,

relationships, and business rules of an organization's

information.

• In addition to containing data required by an organization,

database also contains a description of the data which called as

“Metadata” or “Data Dictionary” or “Systems Catalogue” or

“Data about Data”.

15
Requirements of database systems:
• Minimal data redundancy: Redundancy is carefully controlled by
availed duplicate copies of the same data by an integrated view
on data.
• Data independence: Application programms are independent of
representation of data and data storage (Abstract view)
• Efficient data Access: DBMS uses a variety of techniques to store
and retrieve data efficiently.
• Concurrent data access: System lo allow simultaneous access to
the same data by different users.

16
Requirements of database systems Cont..

• Consistency of data: Caused by lack of redundancy. DBMS must

ensure consistency of data after each transaction.

• Integrity of data: correctness and completeness of data

(Semantic aspects), formulation of integrity constraints and

Integrity rules.
– DBMS checks constraints for each insertion, change and deletion of

data.

• Data Security: Protection of the database against un

authorized access (view on data)Access control with


17
authentication and encoding as the possible protection
The advantages of a database approach
– Compactness
– Speed
– Accuracy
– Data can be shared
– Redundancy can be reduced
– Inconsistency can (to some extent)be avoided
– Standards can be enforced
– Security restrictions can be applied
– Integrity can be maintained
– Conflicting requirements can be balanced
– Transaction support can be provided

18
Components of a Database System

Four major components of a database System,


– data
– hardware
– software
– users and designers of database

19
Data:
Issues

• stored as a single database or distributed

• Is the system a single-user or multi-user one?

• How are we going to achieve the utmost possible

performance concerning the data storage and

maintenance?

• What other benefits or drawbacks do we expect as

the result of placement or structure of the database?


20
Hardware:

– secondary storage media (disks, tapes and optical media)


– controllers (hard disk controller, etc.); and
– the processor(s) and associated main memory

21
Software: Database Management System (DBMS)
– A database management system (DBMS) is a collection of
programs that enables users to create and maintain a
database.
– The DBMS is hence a general-purpose software system that
facilitates the processes of defining, constructing,
manipulating, and sharing databases among various users
and applications.

22
• Defining a database involves specifying the data types, structures,
and constraints for the data to be stored in the database.
• Constructing the database is the process of storing the data itself
on some storage medium that is controlled by the DBMS.
• Manipulating a database includes such functions 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 concurrently.

23
What does a database system do?
• Manages Very Large Amounts of Data
• Supports efficient access to Very Large Amounts of Data
• Supports concurrent access to Very Large Amounts of Data
• Supports secure, atomic access to Very Large Amounts of
Data

24
Characteristics of the Database Approach

25
1. Self-Describing Nature of a Database System

• Database system contains not only the database itself but also
a complete definition or description of the database structure
and constraints.
• The definition contains information like
– the structure of each file, the type and storage
– format of each data item, and
– various constraints on the data.

• These information are called meta-data and stored in the

catalog. 26
• The catalog is used by the DBMS software and also by database
users who need information about the database structure.
• A general-purpose DBMS software package is not written for a
specific database application.
– Therefore, it must refer to the catalog to know the structure
of the files in a specific database, such as the type and format
of data it will access.
– The DBMS software must work equally well with any number
of database applications—for example, a university database,
a banking database, or a company database—as long as the
database definition is stored in the catalog. 27
• In traditional file processing, data definition is typically part of
the application programs themselves. Hence, these programs
are constrained to work with only one specific database,
whose structure is declared in the application programs.

28
2. Insulation between Programs and Data, and Data Abstraction
• In DBMS, the structure of data files is stored in the DBMS
catalog separately from the access programs.
– We call this property program-data independence.
• The characteristic that allows program-data is called data
abstraction.
• A DBMS provides users with a conceptual representation of
data
• This does not include many of the details of how the data is
stored or how the operations are implemented.
29
• Database users and application programs refer to the
conceptual representation of the files, and the DBMS extracts
the details of file storage from the catalog when these are

needed by the DBMS file access modules.

30
3. Data Independence
• One of the most important characteristics of the database
approach is data independence.
• This refers to the ability to change the structure of the
database without affecting the programs that access the data.
• This is achieved by separating the logical and physical aspects
of the database, which allows the database administrator to
make changes to the physical structure without affecting the
logical structure.

31
For example, imagine a database that stores information about
employees.
The logical structure of the database may include information
such as employee name, employee ID, and employee salary.
The physical structure of the database, on the other hand, may
include information such as the location of the data on disk and
the specific file format used to store the data. By separating
these two aspects of the database, the database administrator
can change the physical structure of the database, such as
moving the data to a new disk or changing the file format,
without affecting the programs that access the data.
32
4. Support of Multiple Views of the Data
• A view may be a subset of the database or it may contain virtual
data that is 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.

33
Example
• Assume we have data about
– course
– section
– grade_report
– Prerequisite
• One user of the database may be interested only in
accessing and printing the transcript of each student;

34
• A second user, who is interested only in checking that
students have taken all the prerequisites of each
course for which they register,

35
5. Data Sharing

• Another important characteristic of the database


approach is data sharing.
• This refers to the ability of multiple users to access
and update the data in the database at the same
time.
• The database approach uses a variety of techniques
to ensure data sharing, such as locking and
concurrency control
36
• Locking is the process of preventing other users from

accessing a specific piece of data while it is being updated.


For example, if a user is updating an employee's salary,
the database may lock the employee's record to prevent
other users from also updating the employee's salary at
the same time.

• Concurrency control is the process of managing access to


the data in the database by multiple users.

37
6. Multiuser Transaction Processing
• A transaction is an executing program or process that includes
one or more database accesses, such as reading or updating of
database records.
• 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 a
controlled manner so that the result of the updates is correct.

38
7. Data Integrity
• Another important characteristic of the database approach is
data integrity.
• This refers to the accuracy and consistency of the data in the
database.
• The database approach uses a variety of techniques to ensure
data integrity, such as data validation, data constraints, and
data normalization.

39
Data validation is the process of checking the data entered into
the database to ensure that it is correct and consistent. For
example, if a program is designed to input employee information
into the database, the program may check that the employee ID
is a unique number and that the employee's salary is a number
between $0 and $1000000.

40
• Data constraints are used to ensure that the data in the
database follows specific rules.
• For example, a constraint may be used to ensure that an
employee's salary is greater than $0 and less than
$1000000.

41
Data normalization is the process of organizing the data in the
database to reduce data redundancy and increase data consistency.
For example, if the database stores information about employees
and departments, the data may be normalized by storing the
department information in a separate table and creating a
relationship between the employee and department tables.

42
8.Backup and Recovery
• Another important characteristic of the database approach is
the ability to back up and recover data. This is important in
case of system failures or other unexpected events that may
cause data loss. The database approach uses a variety of
techniques to ensure that data can be backed up and
recovered, such as database backups, transaction logs, and
replication.
• Database backups are copies of the entire database or specific
parts of the database that can be used to restore the data in
case of data loss.
43
9. Scalability
• Another important characteristic of the database approach is
scalability. This refers to the ability of the database to handle a
large amount of data and a large number of users without
performance degradation.
• The database approach uses a variety of techniques to ensure
scalability, such as horizontal scaling and vertical scaling

• Horizontal scaling is the process of adding more servers to the database


system to handle the increased load. This can include techniques such as
sharding, which divides the data across multiple servers, and load balancing,
which distributes the load across multiple servers.
44
•Horizontal scaling is the process of adding more servers to the
database system to handle the increased load. This can include
techniques such as sharding, which divides the data across
multiple servers, and load balancing, which distributes the load
across multiple servers.
Vertical scaling is the process of adding more resources, such as
memory and CPU, to a single server to handle the increased
load. This can include techniques such as upgrading the
hardware or adding more CPU cores.
Encryption is the process of converting data into a coded format
that can only be read by authorized users. This can include
techniques such as symmetric key encryption or asymmetric key
encryption. 45
10 .Security
• Security is another important characteristic of the database
approach, as it ensures that the data is protected from
unauthorized access, modification, or deletion.
• The database approach uses a variety of techniques to ensure
security, such as authentication, authorization, and encryption.

46
Authentication is the process of verifying the identity of a user who
is trying to access the database. This can include techniques such
as username and password, or biometric authentication.

Authorization is the process of granting access to specific resources


in the database based on the user's role or permissions. This can
include techniques such as access control lists or role-based access
control.

47
Database Actors

• A primary goal of a database system is to retrieve information


from and store new information in the database. People who
work with a database can be categorized as database actors
( users ).
1. Actors on the Scene
2. workers behind the scene

48
Actors on the Scene
• People whose jobs involve the day-to-day use of a large
database; we call them the actors on the scene.

workers behind the scene

• Peoples whose work is to maintain the database system


environment but who are not actively interested in the
database contents---are called workers behind the scene

49
Actors On the Scene:

– System Analysts

– Database Administrator

– Application Programmers

– Database Designer

– End Users

Workers behind the Scene


– DBMS system designers and implementers

– Tool developers

50
Database Actors

1- System Analysts:

• System analysts determine the requirements of end users,


especially naive and parametric end users, and develop
specifications for transactions that meet these
requirements.

51
Database Actors

2- Database Designers:
• Identifying the data to be stored in the database.
• Choosing appropriate structures to represent and store this
data undertaken before the database is actually implemented
and populated with data.
• Communicate with all prospective database users.
• Develop a view of the database that meets the data and
processing requirements for each group of users

52
Database Actors
3 - Application Programmers:

• Application programmers implement these specifications as

programs; then they test, debug, document, and maintain

these transactions

53
Database Actors

4- Database Administrators:
• Authorizing access to the database.
• Coordinating and monitoring its use.
• Acquiring software and hardware resources as needed
• Accountable for problems like poor security, poor performance
of the system

54
Database Actors

5- End Users:
• Access to the database for querying, updating, and generating
reports.
5.1- Casual end users:
• Occasionally access the database.
• Need different information each time.
• Learn only a few facilities that they may use repeatedly.
• Typically middle-level or high-level managers or other
occasional browsers.

55
Database Actors

5.2- Naive or parametric end users:


• Constantly querying and updating the database, using standard
types of queries and updates called canned transactions that
have been carefully programmed and tested.
• Need to learn very little about the facilities provided by the
DBMS.

56
Database Actors

5.3- Sophisticated end users:


• Engineers, scientists, business analysts, and others who
thoroughly familiarize themselves with the facilities of the
DBMS so as to implement their applications to meet their
complex requirements.
• Try to learn most of the DBMS facilities in order to achieve
their complex requirements.

57
Database Actors

6- Operators and maintenance personnel:


• System administration personnel who are responsible for the
actual running and maintenance of the hardware and software
environment for the database system.

58
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
– software packages that facilitate database modeling and
design, database system design, and improved
performance.

59
Database System Utilities

• help the DBA manage the database system.


– Loading: A loading utility is used to load existing data files
—such as text files or sequential files—into the database.
– Backup: A backup utility creates a backup copy of the
database, usually by dumping the entire database onto
tape or other mass storage medium.

60
Database System Utilities cont..

– Database storage reorganization: used to


reorganize a set of database files into different file
organizations, and create new access paths to
improve performance.
– Performance monitoring: Such a utility monitors
database usage and provides statistics to the DBA.

61
Advantages of Database Management System

Data Integrity
• Data integrity means data is consistent and accurate in
the database.

Data Security
• Data security is a vital concept in a database. Only users authorized must
be allowed to access the database and their identity must be
authenticated using username and password. Unauthorized users
shouldn’t be allowed to access the database under any circumstances as it
violets the integrity constraints.

62
Better data integration
• Due to the database management system, we have access to
well managed and synchronized form of data making it easy to
handle. It also gives an integrated view of how a particular
organization is working and keeps track of how one segment of
the company affects another segment.

63
Minimized Data Inconsistency
Data inconsistency occurs between files when various versions of
the same data appear in different places. Data consistency is
ensured in the database; there is no data redundancy. Besides,
any database changes are immediately reflected by all users, and
there is no data inconsistency.

Faster Data Access


The database management system helps the users to produce
quick answers to queries making data accessing accurate and
faster.
64
Simplicity
• DBMS allows us to understand data better with a clear and simple logical view.
With dbms, many operations like deletion, insertion or creation of file or data,
are easy to implement.

Recovery and Backup


• DBMS automatically takes care of recovery and backup. The users are not
required to take periodical backup as this is taken care of by DBMS. Besides, it
also restores a database after a system failure or crash to prevent its previous
condition.

65
• advantages and disadvantages of DBMS

The Database Management System (DBMS) is defined as a


software system that allows the user to define, create and
maintain the database and provide control access to the data.

It is a collection of programs used for managing data and


simultaneously it supports different types of users to create,
manage, retrieve, update and store information.

66
Advantages of DBMS
The advantages of the DBMS are explained below −

Redundancy problem can be solved.

In the File System, duplicate data is created in many places


because all the programs have their own files which create data
redundancy resulting in wastage of memory. In DBMS, all the files
are integrated in a single database. So there is no chance of
duplicate data.

For example: A student record in a library or examination can


contain duplicate values, but when they are converted into a
single database, all the duplicate values are removed.

67
Has a very high security level.

Data security level is high by protecting your precious data


from unauthorized access. Only authorized users should have
the grant to access the database with the help of credentials.

Presence of Data integrity.

Data integrity makes unification of so many files into a single


file. DBMS allows data integrity which makes it easy to
decrease data duplicity Data integration and reduces
redundancy as well as data inconsistency.
68
Support multiple users.

DBMS allows multiple users to access the same database at a


time without any conflict

Avoidance of inconsistency.
DBMS controls data redundancy and also controls data
consistency. Data consistency is nothing but if you want to update
data in any files then all the files should not be updated again.

In DBMS, data is stored in a single database so data becomes


more consistent in comparison to file processing systems.

69
Shared data

• Data can be shared between authorized users of the database in


DBMS. All the users have their own right to access the database. Admin
has complete access to the database. He has a right to assign users to
access the database.

Enforcement of standards
• As DBMS have central control of the database. So, a DBA can ensure that all the
applications follow some standards such as format of data, document
standards etc. These standards help in data migrations or in interchanging the
data.

70
Any unauthorized access is restricted

• Unauthorized persons are not allowed to access the


database because of security credentials.

Provide backup of data

Data loss is a big problem for all the organizations. In the file system users
have to back up the files in regular intervals which lead to waste of time
and resources.

DBMS solves this problem of taking backup automatically and recovery of


the database
71
Disadvantages of DBMS
• The disadvantages of DBMS are as follows:

• Complexity
• The provision of the functionality that is expected of a good DBMS
makes the DBMS an extremely complex piece of software. Database
designers, developers, database administrators and end-users must
understand this functionality to take full advantage of it.

• Failure to understand the system can lead to bad design decisions,


which leads to a serious consequence for an organization.

72
Size
The functionality of DBMS makes use of a large piece of software which
occupies megabytes of disk space.

Performance
Performance may not run as fast as desired.

Higher impact of a failure


The centralization of resources increases the vulnerability of
the system because all users and applications rely on the
availability of DBMS, the failure of any component can bring
operation to halt.

73
Cost of DBMS

The cost of DBMS varies significantly depending on


the environment and functionality provided. There
is also the recurrent annual maintenance cost.

74

You might also like