Download CHAP014

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Open Database Connectivity wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Functional Database Model wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Chapter 14
Data and Database
Administration
Outline
Organizational context
 Tools of database administration
 Processes for database specialists
 Overview of processing environments

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Database Support for Decision
Making
Management Hierarchy
Top
(strategic)
Middle
(tactical)
Lower
(operational)
External data sources and
summarized, tactical databases
Summarized, integrated
operational databases
Individual operational
databases
Operational databases
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Decision Making Examples
Level
Example Decisions
Data Requirements
Top
Identify new markets
and products; plan
growth; reallocate
resources across
divisions
Economic and technology
forecasts; news
summaries; industry
reports; medium term
performance reports
Middle Choose suppliers;
forecast sales,
inventory, and cash;
revise staffing levels;
prepare budgets
Historical trends; supplier
performance; critical path
analysis; short term and
medium term plans
Lower
Problem reports;
exception reports;
employee schedules; daily
production results;
inventory levels
McGraw-Hill/Irwin
Schedule employees;
correct order delays;
find production
bottlenecks; monitor
resource usage
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Information Life Cycle
Usage
Acquisition
Dissemination
Storage
Formatting
Protection
Processing
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Knowledge Management
Technology
Human information
processing
McGraw-Hill/Irwin
Organization
dynamics
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Database Specialists

Data administrator
– Middle or upper management
– Broad view of information resources

Database administrator (DBA)
– Support role
– Emphasis on individual databases and DBMSs
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Responsibilities of Specialists

Data administrator
– Develops enterprise data model
– Establishes inter database standards
– Negotiates contractual terms

Database administrator
– Performs database development tasks
– Consults on application development
– Evaluates DBMS capabilities and features
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Database Administration Tools
Security
 Integrity
 Management of stored procedures and
triggers
 Data dictionary access

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Database Access Control
Authorization rules
DBA
Authentication,
access requests
Database security
system
Users
Data dictionary
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Discretionary Access Control
Assign access rights or privileges to users
 Specify ability to read, write, and delete
specified parts of a database
 Use views for fine level of control
 Use groups to reduce the number of
authorization rules

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
SQL Statements for Security I
CREATE ROLE ISFaculty
CREATE ROLE ISAdministrator
WITH ADMIN CURRENT_ROLE
CREATE ROLE ISAdvisor
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
SQL Statements for Security II
GRANT SELECT ON ISStudentGPA
TO ISFaculty, ISAdvisor,
ISAdministrator
GRANT UPDATE ON ISStudentGPA.StdGPA
TO ISAdministrator
REVOKE SELECT ON ISStudentGPA FROM
ISFaculty RESTRICT
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Common SQL Privileges
Privilege
Explanation
SELECT
Query the object; cannot be specified for
individual columns
UPDATE
Modify the value; can be specified for
individual columns
INSERT
Add a new row; can be specified for
individual columns
DELETE
Delete a row; cannot be specified for
individual columns
TRIGGER
Create a trigger on the specified table
REFERENCES Reference columns of the given table in
integrity constraints
EXECUTE
McGraw-Hill/Irwin
Execute the stored procedure
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Oracle Security Statements
CREATE USER statement
 Predefined roles

– CONNECT
– RESOURCE
– DBA

System versus object privileges
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Access Security Tools
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Mandatory Access Control
Less flexible security approach for highly
sensitive and static databases
 Assign classification levels to database
objects
 Assign clearance levels to users
 Access granted if a user's clearance level
provides access to the classification level
of a database object

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Encryption
Encoding data to obscure its meaning
 Plaintext
 Ciphertext
 Encryption key

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
SQL Domains
Limited ability to define new domains
 CREATE DOMAIN statement

CREATE DOMAIN StudentClass AS
CHAR(2)
CHECK ( VALUE IN ('FR', 'SO', 'JR', 'SR') )

Distinct type
CREATE DISTINCT TYPE USD AS
DECIMAL(10,2);
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
SQL Assertions
Supports complex constraints
 Constraint specified through a SELECT
statement
 Enforcement can be inefficient
 Stored procedures and form events are
alternatives

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Assertion Example
CREATE ASSERTION FullTimeEnrollment
CHECK (NOT EXISTS
( SELECT Enrollment.RegNo
FROM Registration, Offering,
Enrollment, Course
WHERE Offering.OfferNo =Enrollment.OfferNo
AND Offering.CourseNo = Course.CourseNo
AND Offering.RegNo = Registration.RegNo
AND RegStatus = 'F'
GROUP BY Enrollment.RegNo
HAVING SUM(CrsUnits) >= 9 ) )
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
CHECK Constraints
Use when a constraint involves columns of
the same table
 Part of CREATE TABLE statement
 Easy to write
 Efficient to enforce

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
CHECK Constraints Example
CREATE TABLE Student
(…
CONSTRAINT ValidGPA CHECK
( StdGPA BETWEEN 0 AND 4 ),
CONSTRAINT MajorDeclared CHECK
( StdClass IN ('FR','SO') OR
StdMajor IS NOT NULL ) )
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Coding Practice Concerns
Documentation
 Parameter usage
 Content of triggers and stored procedures

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Management of Dependencies
Referenced tables, views, and procedures
 Access plans for SQL statements
 DBMS support incomplete

– Obsolete statistics
– Remotely stored procedures
– No automatic recompilation after deletion
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Managing Trigger Complexity
Coding guidelines to minimize interaction
 Trigger analysis tools
 Additional testing for interacting triggers

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Metadata
Define the source, use, value, and meaning
of data
 Stored in a data dictionary
 DBMS data dictionary to track objects
managed by the DBMS
 Information resource dictionary to track
objects relating to information systems
development

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Catalog Tables
Most DBMSs provide a large collection
 Definition Schema and Information
Schema in SQL:1999
 Modify using data definition and control
statements
 Use SELECT statement to retrieve from
catalog tables
 Integrity of catalog tables is crucial

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Sample Oracle Catalog Tables
Table Name
Contents
USER_CATALOG
Contains basic data about each table and view defined by
a user.
USER_OBJECTS
Contains data about each object (functions, procedures,
indexes, triggers, assertions, etc.) defined by a user. This
table contains the time created and the last time changed
for each object.
USER_TABLES
Contains extended data about each table such as space
allocation and statistical summaries.
USER_TAB_COLUMNS Contains basic and extended data for each column such as
the column name, the table reference, the data type, and a
statistical summary.
USER_VIEWS
Contains the SQL statement defining each view.
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Information Resource Dictionary
CASE tool 1
Metadata
import
CASE tool 2
IRDS
CASE tool n
...
Metadata
export
DBMS
IRD
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Processes for Database
Specialists
Data planning
 DBMS selection and evaluation

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Goals of Data Planning
Evaluate current information systems with
respect to the goals and objectives of the
organization
 Determine the scope and the timing of
developing new information systems and
utilizing of new information technology
 Identify opportunities to apply information
technology for competitive advantage

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Planning Models
Enterprise models
Business goals
and objectives
Data
Processes
Organization
Align information
systems with
business environment
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Level of Detail in Models
Model
Levels of Detail
Data
Subject model (initial level), entity model
(detailed level)
Process
Functional areas and business processes
(initial level), activity model (detailed level)
Organization
Role definitions and role relationships
Data-process
interaction
Matrix and diagrams showing data
requirements of processes
Process-organization
interaction
Matrix and diagrams showing role
responsibilities
Data-organization
Matrix and diagrams showing usage of data
by roles
McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
DBMS Selection
Detailed process
 Requires knowledge of organization goals
and DBMS features
 Systematic approach is important
 High switching cost if wrong choice

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Selection Process Phases
Analyze
requirements
Determine
weights
Score
candidate
systems
McGraw-Hill/Irwin
Ranked
candidates
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Analytic Hierarchy Process
Multi-criteria decision making tool
 Supports systematic assignment of weights
and scores to candidate DBMSs
 Uses pairwise comparisons

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Rating Values for Comparisons
Ranking Value of Aij
1
3
5
7
9
McGraw-Hill/Irwin
Meaning
Requirements i and j are equally
important.
Requirement i is slightly more
important than requirement j.
Requirement i is significantly more
important than requirement j.
Requirement i is very significantly
more important than requirement j.
Requirement i is absolutely more
important than requirement j.
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Final Selection Factors
Benchmarks and trial usage
 Contractual terms
 Vendor expectations

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Benchmarking
Workload to evaluate the performance of a
system or product
 A good benchmark should be relevant,
portable, scalable, and understandable.
 Standard, domain-specific benchmarks by
TPC

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
TCP Benchmarks
Reasonable estimates about a DBMS in a
specific hardware/software environment
 Total system performance and cost
measures
 Audits to ensure unbiased results

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Managing Database Environments
Transaction processing
 Data warehouse processing
 Distributed processing
 Object data management

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Responsibilities of Database
Specialists
Application development
 Database infrastructure and architectures
 Performance monitoring
 Enterprise data model development
 Contingency planning

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.
Summary
Two roles for managing information
resources
 Tools for security, integrity, rule
processing, stored procedures, and data
dictionary manipulation
 Processes for data planning and DBMS
selection
 Context for studying other Part 4 chapters

McGraw-Hill/Irwin
© 2004 The McGraw-Hill Companies, Inc. All rights reserved.