0% found this document useful (0 votes)
26 views44 pages

Data and Database Administration: Advanced Database Management System Mr. Jake Vincent R. Casugay

This document discusses data administration and database administration. It defines data administration as responsible for overall data management standards, and database administration as responsible for physical database design and technical issues. It then covers their specific functions. It also discusses database security objectives, threats, and features to enhance security like views, integrity controls, and access control. It explains recovery methods like backup, journaling and checkpoints to restore databases after failures. Finally, it discusses concurrency control techniques like locking to prevent interference during simultaneous data access.

Uploaded by

Marvin Bucsit
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)
26 views44 pages

Data and Database Administration: Advanced Database Management System Mr. Jake Vincent R. Casugay

This document discusses data administration and database administration. It defines data administration as responsible for overall data management standards, and database administration as responsible for physical database design and technical issues. It then covers their specific functions. It also discusses database security objectives, threats, and features to enhance security like views, integrity controls, and access control. It explains recovery methods like backup, journaling and checkpoints to restore databases after failures. Finally, it discusses concurrency control techniques like locking to prevent interference during simultaneous data access.

Uploaded by

Marvin Bucsit
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/ 44

Data and Database

Administration
Advanced Database Management System
Mr. Jake Vincent R. Casugay
Job definitions
 Data Administration (DA): A high-level function
that is responsible for the overall management of
data resources in an organization, including
maintaining corporate-wide definitions and
standards

 Database Administration (DBA): A technical


function that is responsible for physical database
design and for dealing with technical issues such
as security enforcement, database performance,
and backup and recovery

NOTE: Often some mixture of these duties


Data Administration functions
 Data policies, procedures, standards
 Planning
 Data conflict (ownership) resolution
 Internal marketing of DA concepts
 Managing the data repository
Database Administration functions
 Selection of hardware and software
 Installing/upgrading DBMS
 Tuning database performance
 Improving query processing performance
 Managing data security, privacy, and
integrity
 Data backup and recovery
Database Security
 Protection of data against accidental or
intentional loss, destruction, or misuse

 Increased difficulty due to Internet access


and client/server technologies
Database Security Objectives
Prevent/detect/deter improper
Disclosure of information

 Prevent/detect/deter Secrecy
Improper modification
of information

Integrity Availability

Prevent/detect/deter improper
Denial of access to services
Threats to Data Security
 Accidental losses - attributable to Human
error, software or hardware failure – tackle
using procedures on user authorization,
uniform software installation procedures,
hardware maintenance schedules

 Theft and fraud – attention should be


focused on all the locations (control of
physical access, firewalls etc.)
Threats to Data Security
 Loss of privacy (personal data) and loss of
confidentiality (corporate data)

 Loss of data integrity – invalid/corrupt data


– need established backup/recovery
procedures

 Loss of availability (through, e.g. sabotage)


Data Management
Security Features:
1. Views or subschemas which restrict user
views of the database

2. Integrity controls which are enforced by


the DBMS during querying and updating

3. Access Control or Authorization rules


identifying users and restricting actions
they can take
Data Management
Security Features:
4. User-defined procedures defining
additional constraints

5. Encryption procedures for encoding data


in an unrecognizable form

6. Backup, journalizing, and check pointing


capabilities which facilitate recovery
procedures
Views
 subset of the database that is presented to
one or more users -user can be given
access privilege to view without allowing
access privilege to underlying tables

Integrity Control
 protect data from unnecessary modification
Access Control
 Are controls incorporated in the data
management system that restrict access to
data and actions that people can take on
data

 Protects against accidental and malicious


threats by regulating the read, write and
execution of data and programs

 Ensures that all direct accesses to object


are authorized
Access Control
 Subject: active entity that requests access
to an object (e.g., user or program)

 Object: passive entity accessed by a


subject (e.g., record, relation, file)

 Access right (privileges): how a subject is


allowed to access an object
(e.g., can read, write, modify)
Access Control Policies
 Discretionary Access Control (DAC)
 Mandatory Access Control (MAC)
 Role-Based Access Control (RBAC)
Discretionary Access Control
 For each subject access right to the objects
are defined
 User based
 Grant and Revoke
 Problems:
- Propagation of access rights
- Revocation of propagated access rights
DAC on Grant and Revoke
 GRANT SELECT ON Employee
 GRANT SELECT ON Employee TO Red
TO Black
Black Red
WITH GRANT OPTION

Brown revokes grant


? given to Black

Brown (owner) ? Brown does not want


Red to access the
 GRANT UPDATE(Salary) ON Employee relation
Employee TO White

White
Grant
GRANT <privilege> ON <relation>
To <user> [WITH GRANT OPTION]
-----------------------------------------------------------
GRANT SELECT * ON Student TO
Matthews
 GRANT SELECT *, UPDATE(GRADE) ON
Student TO FARKAS
 GRANT SELECT(NAME) ON Student TO
Brown
GRANT command applies to base relations
as well as views
Revoke
REVOKE <privileges> [ON <relation>]
FROM <user>
-----------------------------------------------------------
 REVOKE SELECT* ON Student FROM
Blue
 REVOKE UPDATE ON Student FROM
Black
 REVOKE SELECT(NAME) ON Student
FROM Brown
Mandatory Access Control
 Access rights: defined by comparing the
security classification of the requested
objects with the security clearance of the
subject

 If access control rules are satisfied, access


is permitted; Otherwise access is rejected
Mandatory Access Control
 Security label: Top-Secret, Secret, Public
 Objects: security classification
 Subjects: security clearances
 Dominance ():
Top-Secret  Secret  Public
Authentication Schemes
 Goal – obtain a positive identification of the user
 Passwords are flawed:
 Users share them with each other
 They get written down, could be copied
 Automatic logon scripts remove need to explicitly
type them in
 Unencrypted passwords travel the Internet
 Possible solutions:
 Biometric devices – use of fingerprints, retinal
scans, etc. for positive ID
 Third-party authentication – using secret keys,
digital certificates
Database Recovery
 Mechanism for restoring a database quickly
and accurately after loss or damage

 Recovery facilities:
Backup Facilities
Journalizing Facilities
Checkpoint Facility
Recovery Manager
Backup Facilities
 Automatic dump facility that produces
backup copy of the entire database
 Periodic backup (e.g. nightly, weekly)
 Cold backup – database is shut down
during backup
 Hot backup – selected portion is shut down
and backed up at a given time
 Backups stored in secure, off-site location
Journalizing Facilities
 Audit trail of transactions and database
updates
 Transaction log – record of essential data
for each transaction processed against the
database
 Database change log – images of updated
data
 Before-image – copy before modification
 After-image – copy after modification

Produces an audit trail


Figure 12-6: Database audit trail

From the backup and


logs, databases can be
restored in case of
damage or loss
Checkpoint Facilities
 DBMS periodically refuses to accept new
transactions
  system is in a quiet state
 Database and transaction logs are
synchronized

This allows recovery manager to resume processing


from short period, instead of repeating entire day
Recovery and Restart
Procedures
 Switch - Mirrored databases
 Restore/Rerun - Reprocess transactions
against the backup
 Transaction Integrity - Commit or abort all
transaction changes
 Backward Recovery (Rollback) - Apply
before images
 Forward Recovery (Roll Forward) - Apply
after images (preferable to restore/rerun)
Figure 12-7: Basic recovery techniques
(a) Rollback
Figure 12-7(b) Rollforward
Database Failure Responses
 Aborted transactions
 Preferred recovery: rollback
 Alternative: Rollforward to state just prior to abort
 Incorrect data
 Preferred recovery: rollback
 Alternative 1: re-run transactions not including inaccurate data
updates
 Alternative 2: compensating transactions
 System failure (database intact)
 Preferred recovery: switch to duplicate database
 Alternative 1: rollback
 Alternative 2: restart from checkpoint
 Database destruction
 Preferred recovery: switch to duplicate database
 Alternative 1: rollforward
 Alternative 2: reprocess transactions
Concurrency Control
 Problem – in a multi-user environment, simultaneous access
to data can result in interference and data loss
 Solution – Concurrency Control
 The process of managing simultaneous operations against a
database so that data integrity is maintained and the operations
do not interfere with each other in a multi-user environment.
Figure 12-8: LOST UPDATE

Simultaneous access causes updates to cancel each other


A similar problem is the inconsistent read problem
Concurrency Control
Techniques
 Serializability –
 Finish one transaction before starting another
 Locking Mechanisms
 The most common way of achieving serialization
 Data that is retrieved for the purpose of updating is locked for the
updater
 No other user can perform update until unlocked
Figure 12-9: Updates with locking for concurrency control

This prevents the lost update problem


Locking Mechanisms
 Locking level:
 Database – used during database updates
 Table – used for bulk updates
 Block or page – very commonly used
 Record – only requested row; fairly commonly
used
 Field – requires significant overhead; impractical
 Types of locks:
 Shared lock - Read but no update permitted.
Used when just reading to prevent another user
from placing an exclusive lock on the record
 Exclusive lock - No access permitted. Used
when preparing to update
Deadlock Figure 12-11
A deadlock situation

 An impasse that results when


two or more transactions have
locked common resources, and
each waits for the other to
unlock their resources

UserA and UserB will wait


forever for each other to
release their locked resources!
Managing Deadlock
 Deadlock prevention:
 Lock all records required at the beginning of a
transaction
 Two-phase locking protocol
 Growing phase
 Shrinking phase
 May be difficult to determine all needed
resources in advance
 Deadlock Resolution:
 Allow deadlocks to occur
 Mechanisms for detecting and breaking them
 Resource usage matrix
Versioning
 Optimistic approach to concurrency control
 Instead of locking
 Assumption is that simultaneous updates
will be infrequent
 Each transaction can attempt an update as
it wishes
 The system will reject an update when it
senses a conflict
 Use of rollback and commit for this
Figure 12-12: the use of versioning

Better performance than locking


Managing Data Quality
 Data Steward - Liaisons between IT and business
units
 Five Data Quality Issues:
Security policy and disaster recovery
Personnel controls
Physical access controls
Maintenance controls (hardware & software)
Data protection and privacy
Data Dictionaries and
Repositories
 Data dictionary
 Documents data elements of a database
 System catalog
 System-created database that describes all
database objects
 Information Repository
 Stores metadata describing data and data
processing resources
 Information Repository Dictionary System (IRDS)
 Software tool managing/controlling access to
information repository
Figure 12-13: Three components of the repository system architecture

A schema of the
repository information

Software that manages the repository objects

Where repository objects


are stored

Source: adapted from Bernstein, 1996.


Database Performance Tuning
 DBMS Installation
 Setting installation parameters
 Memory Usage
 Set cache levels
 Choose background processes
 Input/Output Contention
 Use striping
 Distribution of heavily accessed files
 CPU Usage
 Monitor CPU load
 Application tuning
 Modification of SQL code in applications
End of Lecture.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy