0% found this document useful (0 votes)
11 views31 pages

fDF1 PDF

The document provides an overview of database systems, emphasizing their importance in managing large datasets for organizations. It explains the role of Database Management Systems (DBMS) in defining, constructing, and manipulating databases, as well as the advantages of the database approach over manual and file-based methods. Additionally, it discusses various types of database users, including end users, application programmers, database administrators, and designers.

Uploaded by

Reta Lema
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)
11 views31 pages

fDF1 PDF

The document provides an overview of database systems, emphasizing their importance in managing large datasets for organizations. It explains the role of Database Management Systems (DBMS) in defining, constructing, and manipulating databases, as well as the advantages of the database approach over manual and file-based methods. Additionally, it discusses various types of database users, including end users, application programmers, database administrators, and designers.

Uploaded by

Reta Lema
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/ 31

Fundamental of Database

Chapter 1

Introduction

2
Database Systems
 Database systems are designed to
manage large data set in an organization.
◦ Data - facts that can be recorded and that
have implicit meaning.
 Database is essential to every business.
◦ Maintain internal record,
◦ present data to customers on the WWW,
◦ Support many commercial systems
(bank, airline, telecom)
 DBS is found at the Core of many
organization.
3
What is Database?
 A database is a collection of related data
that is managed by a DBMS .
 database properties
◦ represents some aspect of the real world
◦ logical coherent & internally consistent.
◦ built for a specific purpose

 Database Management System (DBMS)


◦ a collection of programs that enable users to
create, maintain database and control all the
access to the database.
◦ Some examples of DBMS software are MySQL,
MS-Access, Oracle, Informix, etc

4
Database Management
Systems
 DBMS is a general-purpose software
system that facilitates the processes
of defining, constructing, and
manipulating databases for various
applications.
◦ Defining : Specifying the data types,
structures, and constraints for the data to
be stored.
◦ Constructing : process of storing the
data itself on some storage medium that
is controlled by the DBMS
5
DBMS…

 Manipulating includes:
◦ querying the database to retrieve specific
data,
◦ updating the database to reflect changes
and
◦ generating reports from the data.

 We will call the database and DBMS


software together a database system
6
What to expect ….

 This course is about::


◦ How to organize and manage data
◦ Efficient and effective data retrieval
◦ Secure and reliable data storage
◦ Maintaining consistent data
◦ Making information useful for decision
making

7
Data management

 Different approaches of data


managements
◦ Manual approach
◦ Traditional file based approach
◦ Database approach

8
Manual Approach
 data storage and retrieval follows the primitive and
traditional way of information handling where cards
and paper are used.
 The data storage and retrieval will be performed using
human labor.
 Each of the files containing various kinds of information
is labeled and stored in one ore more cabinets.
 The cabinets could be kept in safe places for security
purpose based on the sensitivity of the information
contained in it.
 Insertions and retrieval is done by searching first
for the right cabinet then for the right the file then
the information.
 One could have an indexing system to facilitate access
to the data 9
Limitations of Manual
Approach
 Prone to error
 Difficult to update, retrieve, integrate
 Difficult to compile & manage
 Time consuming & tiresome
 Cross referencing is difficult

An alternative approach of data handling


is a computerized way of dealing with the
information.
10
File-based Vs Database
 The two approaches to data storage
(computer):
◦ File-based and Database
 File-based approach
◦ each user defines and implements the files
needed for a specific application as part of
programming the application.

11
File-based
 For example,
◦ registrar office - keep a file on 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.
12
Disadvantages of file based
 Data Redundancy
 Inconsistency
◦ various copies of the same data is conflicting.
 Data Isolation
◦ data storage approach makes it difficult for other
applications to access data not owned by their
application.
◦ isolation of the data & application.
 Integrity
◦ It is difficult to add or change (update
anomalies)
 Security
 Concurrency
◦ Difficult to provide multiple users support 13
Database Approach
 Database Approach
◦ data storage support, sharing of data across
multiple applications with multiple users.
 Characteristics of Database approach
1.Self-Describing Nature of a Database
System:
◦ Database System contains the descriptions of
data structure and constraints. The data about
data is called Meta-data. Meta-data is stored
in the system catalog .

14
Characteristics of Database
approach
 Insolation between Program and Data:
◦ In file-based system, the structure of the
data files is defined in the application programs so
if user wants to change the structure of a file, all
the programs access to that files might need to be
changed.
◦ database approach, data structure is stored in the
system catalog not in the programs so program
changes are not necessary .
 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..
15
Characteristics of Database
approach
 Sharing of data and Multiuser system:
◦ A multiuser database system must allow
multiple users to access the database at the
same time.
◦ multiuser 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.

16
Limitations of Database
approach
 Professionals are required
 Complexity in design and managing
data
 Cost of conversion
 Cost of development & maintenance
 High impact on failure of central
database
 Reduced performance due to
centralization and data independency
17
Example of a Database
 A UNIVERSITY database
◦ students, courses, and grades in a university
environment.
 The database is organized as four files.
◦ STUDENT file stores data on each student.
◦ COURSE file stores data on each course.
◦ GRADE_REPORT file stores the grades that
students receive in the various courses they
have completed.
◦ PREREQUISITE file stores the prerequisites
of each course.

18
Example of a Database
 To define the database
◦ we should specify the different types of data
elements to be stored in each record .
 STUDENT record includes data
◦ Student’s Name, ID Number,
◦ Class (freshman or 1st year, 2nd year, . . .), and
◦ Major (MATH, IS, CS,…)
 COURSE record includes data
◦ CourseName, CourseNumber, CreditHours, and
◦ Department (the department that offers the course).

19
Example of a Database
 We must also specify a data type for
each data element within a record.
 For example, we should specify
◦ Name of STUDENT is a string of
alphabetic characters,
◦ ID Number of STUDENT is an integer,
and
◦ Grade of GRADE_REPORT is a single
character from the set {A, B, C, D, F}.

20
Example of a Database
 To construct the UNIVERSITY database,
◦ Fill the data to represent each student,
course, grade report, and prerequisite as a
record in the appropriate file.

21
Example of a Database
 Database manipulation involves
querying and updating.
 Examples of queries
◦ "retrieve the transcript( list of all courses
and grades) of Abebe"
◦ "list the names of students who took the
Database course offered 2012 “
◦ "what are the prerequisites of the
Database course?"

22
Benefits of Database Approach

 Controlling Data Redundancy


◦ In the Database approach, ideally each data item
is stored in only one place in the database.
◦ However, in some cases, redundancy still exists to
improving system performance, but such
redundancy is controlled and kept to minimum.
 Data Sharing
 Enforcing Integrity Constraints
◦ DBMSs provide capabilities to define and enforce
certain constraints such as data type, data
uniqueness and other constraints.

23
What are constraints ?
 Constraints are restrictions placed on the
data.
 Example
◦ Every Subject must have a unique Code
◦ A student cannot have 2 different grades for
the same subject
◦ A student cannot have age >100.
◦ A student cannot have 2 different ID number

24
Benefits of Database Approach
 Restricting Unauthorized Access
◦ Different user groups may have different
access privileges (Create, Update,
Retrieve, delete).
 Data Independence
◦ The system data descriptions are
separated from the application programs.
◦ Changes to the data structure is handled
by the DBMS and not by the embedded
program.
25
Benefits of Database Approach
 Transaction Processing
◦ DBMS include concurrency control 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.
 Providing multiple views of data
◦ Various users may have different views of the
database itself
 Providing backup and recovery
facilities
◦ If the computer system fails in the middle of a
complex update program. Recovery
subsystem is responsible to restore the
database.
26
Database Users
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 programs to perform their daily tasks.
 do not know about database too much, use application
programs
◦ Sophisticated users: are people who use their own
way to access to the database.
 do not use the application program provided in the
system. Instead, they might define their own application or
describe their need directly in a query language.

27
Database Users
II. Application Programmers
◦ implement specific application
programs to access the stored data.
◦ This kind of user needs to be familiar
with the DBMSs to accomplish their
task.
◦ Know how to interact with the
system but may not know how
DBMS is designed.

28
Database Users
III. Database Administrators(DBAs)
 A person or a group of people in the organization
who is responsible for authorizing the access to the
database, monitoring its use and managing all the
resource to support the use of the whole database
system.
 Database administrator's duties include:
◦ Schema definition
◦ Storage structure and access method definition
◦ Granting user authority to access the database
◦ Specifying integrity constraints
◦ Monitoring performance and responding to changes in
requirements
29
Database Users
IV. Database Designers
 responsible for identifying the data to be
stored in the database and for choosing
appropriate structures to represent and store
this data.
 These tasks are undertaken before the
database is actually implemented and
populated with data.
 database designers should communicate
with all prospective database users, in order
to understand their requirements, and to
come up with a design that meets these
requirements.
 The final database design must be capable
of supporting the requirements of all user 30
Select this paragraph to edit

 End!

31

You might also like