week10 - db admin

21
1 Database II Introduction to Database Administration Muhammad Asghar Khan

Upload: muhammad-asghar-khan

Post on 09-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 1/21

1

Database II

Introduction

toDatabase Administration

Muhammad Asghar Khan

Page 2: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 2/21

2

Introduction

Data and information are resources that are valuablefor organizations like other financial or other physical

resources

Database administration activities have beendeveloped to help achieve organizations goals for the

effective management of data

Effective data administration provides support for 

managerial decision making at all levels in the

organization

Page 3: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 3/21

Page 4: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 4/21

4

Database Administration (1/2)

Database Administration is a technical activity that isresponsible for physical database design and for 

dealing with technical issues such as security

enforcement, database performance, backup and

recovery

The DBA should be involved in every phase of 

database development , from database planning

through maintenance and modification

DBA carries through the standard and procedures

developed by DA

Page 5: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 5/21

5

Database Administration (1/2)

DBA can also act as DA

DBA needs broad technical background in

Hardware Architectures,

Data Processing,

Database Development Life Cycle,

Strong Design and Data Modeling Skills

Managerial Skills

Page 6: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 6/21

6

DA vs. DBA

Figure below depicts the relationship b/w DA andDBA

Page 7: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 7/21

7

DBA Functions and Responsibilities (1/15)

To ensure that an organization's data and databasesare useful, usable, available, and correct requires theDBA to perform a variety of tasks in a variety of areas

These areas include:

1. Database Design,

2. Performance Monitoring and Tuning,

3. Database Availability,

4. Security and Authorization,

5. Backup and Recovery,

6. Data Integrity,

7. Release Migration

Page 8: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 8/21

8

DBA Functions and Responsibilities (2/15)

1. Database Design The DBA must understand and adhere to sound relational

design practices

The DBA must understand both relational theory and thespecific implementation of the RDBMS he's using to

create the database

Database design requires a sound understanding of 

conceptual and logical data modeling techniques

The ability to create and interpret ERD is essential to

designing a relational database

Page 9: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 9/21

9

DBA Functions and Responsibilities (3/15)

The DBA must be able to transform a logical data model

into a physical database implementation

A poor relational design can result in poor performance

2. Performance Monitoring and Tuning

What is meant by database performance?

The rate at which the DBMS supplies the information can be termed as database performance

Five factors influence database performance: workload,

throughput, resources, optimization, and contention

Page 10: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 10/21

10

DBA Functions and Responsibilities (4/15)

Workload

It is defined as the work demanded from RDBMS

It is a combination of online transactions, batch jobs, ad hoc

queries, data warehousing, analytical queries, and commands

directed through the system at any given time

Workload can fluctuate drastically from day to day, hour to hour,

minute to minute, and even second to second

Sometimes workload can be predicted (such as heavy month-end processing of payroll, or very light access after 7:30 P.M., when

most users have left for the day), but at other times it is

unpredictable

Page 11: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 11/21

11

DBA Functions and Responsibilities (5/15)

Throughput It defines the overall capability of the computer hardware and

software to process data

It is a composite of I/O speed, CPU speed, parallel capabilities of the machine, and the efficiency of the operating system and system

software Resources

The hardware and software tools at the disposal of the system areknown as the resources of the system

Optimization

It refers to the analysis of database requests with query costformulas to generate efficient access paths to data

All types of systems can be optimized, but relational queries areunique in that optimization is primarily accomplished internal to theDBMS

Page 12: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 12/21

12

DBA Functions and Responsibilities (6/15)

Contention

It is the condition in which two or more components of the

workload are attempting to use a single resource in a conflicting

way (for example, dual updates to the same piece of data)

As contention increases, throughput decreases

Therefore, database performance can be defined as the

optimization of resource usage to increase throughput and

minimize contention, enabling the largest possible

workload to be processed

3. Database Availability

The availability of data and databases is often closely

related with performance

Page 13: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 13/21

13

DBA Functions and Responsibilities (7/15)

The first component of availability is keeping the DBMS up and

running

Database clustering technologies provide failover techniques that help

to reduce downtime

 Nevertheless, such technology usually requires more skill and

 planning to implement

4. Database Security and Authorization

Once the database is designed and implemented, programmers andusers will need to access and modify the data

Only authorized programmers and users should have access

Page 14: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 14/21

14

DBA Functions and Responsibilities (8/15)

It is the responsibility of the DBA to ensure that data is

available only to authorized users

The DBA works with the internal security features of the

DBMS in the form of SQL GRANT and REVOKE

statements

Database security can be enforced in other ways as well.

For example, views can be created that block access to

sensitive data by end users and programmers

Page 15: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 15/21

15

DBA Functions and Responsibilities (9/15)

5. Backup and Recovery

The DBA must be prepared to recover data in the event of a problem

"Problem" can mean anything from a system glitch or program error 

to a natural disaster that shuts down an organization

The majority of recoveries today occur as a result of application

software error and human error 

In fact, analyst estimates indicate that 80% of application errors are

due to software failures and human error 

The DBA must be prepared to recover data to a usable point, no

matter what the cause, and to do so as quickly as possible

Page 16: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 16/21

16

DBA Functions and Responsibilities (10/15)

Type of data recoveries can be Recover to Current, Point-

in-Time Recovery, Transaction Recovery,

Recover to Current

Usually in the face of a major shutdown

The end result of the recovery is that the database is brought back to

its current state at the time of the failure

Point-in-Time Recovery

Usually deals with an application-level problem Conventional techniques to perform a point-in-time recovery

remove the effects of all transactions since a specified point in time

This can cause problems if valid transactions occurred during that

timeframe that still need to be applied

Page 17: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 17/21

Page 18: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 18/21

18

DBA Functions and Responsibilities (12/15)

6. Data Integrity A database must be designed to store the correct data in

the correct way without that data becoming damaged or 

corrupted

Physical Aspect of Data Integrity

Can be implemented using DBMS features such as domains and

data types

Most relational DBMS products provide the following types of 

constraints:

Primary Key constraints

Referential constraints

Unique constraints

Check constraints

Page 19: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 19/21

19

DBA Functions and Responsibilities (13/15)

Semantic Aspect of Data Integrity

It is more difficult to control and less easily defined

An example of semantic integrity is the quality of the data in the

database

Procedures and practices need to be in place to ensure data quality.

For example, a customer database that contains a wrong address or 

 phone number in 25% of the customer records is an example of a

database with poor quality

Data quality is encouraged through proper application code, sound

 business practices, and specific data policies

Page 20: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 20/21

20

DBA Functions and Responsibilities (14/15)

DBMS Internal Aspect of Data Integrity

The DBMS relies on internal structures and code to maintain links,

 pointers, and identifiers

Internal DBMS integrity is essential in the following areas:

 Index consistency

An index is really nothing but an ordered list of pointers to data in

database tables

 Pointer consistency

Sometimes large multimedia objects are not stored in the same

 physical files as other data.

Therefore, the DBMS requires pointer structures to keep the

multimedia data synchronized to the base table data

Page 21: Week10 - DB Admin

8/8/2019 Week10 - DB Admin

http://slidepdf.com/reader/full/week10-db-admin 21/21

21

DBA Functions and Responsibilities (15/15)

Backup consistency

Some DBMS products occasionally take improper backup copies

that effectively cannot be used for recovery

It is essential to identify these scenarios and take corrective actions

7. DBMS Release Migration

The DBA is also responsible for managing the migrationfrom release to release of the DBMS

DBMS products change quite frequently²new versions

are usually released every year or so