Upload
phamdat
View
214
Download
0
Embed Size (px)
Citation preview
8
1
Chapter 8
Database Design
Database Systems:Design, Implementation, and Management,
Sixth Edition, Rob and Coronel
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
2
In this chapter, you will learn:•That successful database design must reflect
the information system of which the database isa part
•That successful information systems aredeveloped within a framework known as theSystems Development Life Cycle (SDLC)
•That, within the information system, the mostsuccessful databases are subject to frequentevaluation and revision within a frameworkknown as the Database Life Cycle (DBLC)
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
3
In this chapter, you will learn (continued):
•How to conduct evaluation and revision withinthe SDLC and DBLC frameworks
•What database design strategies exist: top-down vs. bottom-up design, and centralizedvs. decentralized design
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
4
Changing Data into Information
•Information
–Data processed and presented in ameaningful form
–Can be as simple as tabulating the data,thereby making certain data patterns moreobvious
•Transformation
–Any process that changes data intoinformation
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
5
A Simple Cross-Classification Table:Transforming Data into Information
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
6
The Information System•Provides for data collection, storage, and
retrieval•Composed of people, hardware, software,
database(s), application programs, andprocedures
•Systems analysis–Process that establishes need for and extent
of an information system
•Systems development–Process of creating an information system
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
7
Applications
•Transform data into information that forms thebasis for decision making
•Usually produce–Formal report–Tabulations–Graphic displays
•Composed of two parts–Data–Code by which the data are transformed into
information
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
8
Generating Informationfor Decision Making
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
9
Information System•Performance depends on triad of factors:
–Database design and implementation–Application design and implementation–Administrative procedures
•Database development–Process of database design and
implementation–Primary objective is to create complete,
normalized, nonredundant (to the extentpossible), and fully integrated conceptual,logical, and physical database models
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
10
The Systems Development Life Cycle(SDLC)
•Traces history (life cycle) of an informationsystem
•Provides “big picture”within which databasedesign and application development can bemapped out and evaluated
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
11
The Systems Development Life Cycle(SDLC) (continued)
• Divided into five phases
1. Planning
2. Analysis
3. Detailed systems design
4. Implementation
5. Maintenance
• Iterative rather than sequential process
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
12
Planning•Yields general overview of the company and
its objectives
•Initial assessment made of information-flow-and-extent requirements
•Must begin to study and evaluate alternatesolutions
–Technical aspects of hardware and softwarerequirements
–System cost
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
13
The Systems Development Life Cycle(SDLC)
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
14
Analysis
•Problems defined during the planning phaseare examined in greater detail during analysis
•A thorough audit of user requirements
•Existing hardware and software systems arestudied
•Goal is better understanding of system’sfunctional areas, actual and potentialproblems, and opportunities
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
15
Logical Systems Design
•Must specify appropriate conceptual datamodel, inputs, processes, and expectedoutput requirements
•Might use tools such as data flow diagrams(DFD), hierarchical input process output(HIPO) diagrams, or entity relationship (ER)diagrams
•Yields functional descriptions of system’scomponents (modules) for each processwithin database environment
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
16
Detailed Systems Design
•Designer completes design of system’sprocesses
•Includes all necessary technicalspecifications
•Steps are laid out for conversion from old tonew system
•Training principles and methodologies arealso planned
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
17
Implementation
•Hardware, DBMS software, and applicationprograms are installed, and database designis implemented
•Cycle of coding, testing, and debuggingcontinues until database is ready to bedelivered
•Database is created and system iscustomized by creation of tables and views,and user authorizations
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
18
Maintenance
•Three types:–Corrective maintenance in response to
systems errors–Adaptive maintenance due to changes in the
business environment–Perfective maintenance to enhance the
system•Computer-assisted systems engineering
–Make it possible to produce better systems withinreasonable amount of time and at a reasonablecost
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
19
The Database Life Cycle (DBLC)
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
20
The Database Initial Study
•Overall purpose:
–Analyze the company situation
–Define problems and constraints
–Define objectives
–Define scope and boundaries
•Interactive and iterative processes required tocomplete the first phase of the DBLCsuccessfully
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
21
Summary of Activities in the DatabaseInitial Study
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
22
Analyze the Company Situation
•Analysis–“To break up any whole into its parts so as to
find out their nature, function, and so on”•Company situation
–General conditions in which a companyoperates, its organizational structure, and itsmission
•Analyze the company situation–Discover what the company’s operational
components are, how they function, and howthey interact
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
23
Define Problems and Constraints
•Managerial view of company’s operation isoften different from that of end users
•Designer must continue to carefully probe togenerate additional information that will helpdefine problems within larger framework ofcompany operations
•Finding precise answers is important
•Defining problems does not always lead tothe perfect solution
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
24
Define Objectives•Designer must ensure that database system
objectives correspond to those envisioned byend user(s)
•Designer must begin to address the followingquestions:–What is the proposed system’s initial objective?–Will the system interface with other existing or
future systems in the company?–Will the system share data with other systems
or users?
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
25
Define Scope and Boundaries•Scope
–Defines extent of design according tooperational requirements
–Helps define required data structures, type andnumber of entities, and physical size of thedatabase
•Boundaries–Limits external to the system–Often imposed by existing hardware and
software
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
26
Database Design
•Necessary to concentrate on the data
•Characteristics required to build databasemodel
•Two views of data within system:
–Business view of data as information source
–Designer’s view of data structure, its access,and the activities required to transform thedata into information
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
27
Two Views of Data:Business Manager and Designer
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
28
Database Design (continued)•Loosely related to analysis and design of larger
system•Systems analysts or systems programmers are
in charge of designing other systemcomponents–Their activities create procedures that will help
transform data within the database into usefulinformation
•Does not constitute a sequential process–Iterative process that provides continuous
feedback designed to trace previous steps
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
29
Procedure Flow in the Database Design
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
30
Conceptual Design
•Data modeling used to create an abstractdatabase structure that represents real-worldobjects in the most realistic way possible
•Must embody a clear understanding of thebusiness and its functional areas
•Ensure that all data needed are in the model,and that all data in the model are needed
•Requires four steps
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
31
Data Analysis and Requirements
•First step is to discover data elementcharacteristics
–Obtains characteristics from different sources
•Must take into account business rules
–Derived from description of operations
•Document that provides precise, detailed, up-to-date, and thoroughly reviewed description ofactivities that define an organization’s operatingenvironment
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
32
Entity Relationship (ER) Modelingand Normalization
•Designer must communicate and enforceappropriate standards to be used in thedocumentation of design
–Use of diagrams and symbols
–Documentation writing style
–Layout
–Other conventions to be followed duringdocumentation
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
33
Developing the Conceptual ModelUsing ER Diagrams
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
34
A Composite Entity
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
35
Data Redundancies in the VIDEO Table
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
36
ER Modeling Is an Iterative ProcessBased on Many Activities
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
37
Conceptual Design Toolsand Information Sources
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
38
Data Dictionary
•Defines all objects (entities, attributes,relations, views, and so on)
•Used in tandem with the normalizationprocess to help eliminate data anomalies andredundancy problems
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
39
Data Model Verification•Model must be verified against proposed system
processes to corroborate that intended processescan be supported by database model
•Revision of original design starts with a carefulreevaluation of entities, followed by a detailedexamination of attributes that describe theseentities
•Define design’s major components as modules:
–An information system component that handles aspecific function
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
40
The ER Model Verification Process
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
41
Iterative ER Model Verification Process
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
42
Verification Process
•Select the central (most important) entity
–Defined in terms of its participation in most ofthe model’s relationships
•Identify the module or subsystem to which thecentral entity belongs and define boundariesand scope
•Place central entity within the module’sframework
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
43
DBMS Software Selection
•Critical to the information system’s smoothoperation
•Advantages and disadvantages should becarefully studied
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
44
Logical Design
•Used to translate conceptual design intointernal model for a selected databasemanagement system
•Logical design is software-dependent
•Requires that all objects in the model bemapped to specific constructs used byselected database software
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
45
A Simple Conceptual Model
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
46
Sample Layout for the COURSE Table
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
47
Physical Design
•Process of selecting data storage and dataaccess characteristics of the database
•Storage characteristics are a function ofdevice types supported by the hardware, typeof data access methods supported by system,and DBMS
•Particularly important in the older hierarchicaland network models
•Becomes more complex when data aredistributed at different locations
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
48
Implementation and Loading
•New database implementation requires thecreation of special storage-related constructsto house the end-user tables
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
49
Physical Organization of a DB2 DatabaseEnvironment
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
50
Performance
•One of the most important factors in certaindatabase implementations
•Not all DBMSs have performance-monitoringand fine-tuning tools embedded in theirsoftware
•There is no standard measurement fordatabase performance
•Not only (nor even main) factor
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
51
Security
•Data must be protected from access byunauthorized users
•Must provide for the following:–Physical security
–Password security
–Access rights
–Audit trails
–Data encryption
–Diskless workstations
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
52
Backup and Recovery
•Database can be subject to data loss throughunintended data deletion and power outages
•Data backup and recovery procedures
–Create a safety valve
–Allow database administrator to ensureavailability of consistent data
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
53
Integrity
•Enforced through proper use of primary andforeign key rules
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
54
Company Standards
•May partially define database standards
•Database administrator must implement andenforce such standards
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
55
Concurrency Control
•Feature that allows simultaneous access to adatabase while preserving data integrity
•Failure to maintain can quickly destroy adatabase’s effectiveness
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
56
The Need for Concurrency Control
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
57
Testing and Evaluation•Occurs in parallel with applications
programming•Database tools used to prototype applications•If implementation fails to meet some of the
system’s evaluation criteria–Fine-tune specific system and DBMS
configuration parameters–Modify the physical design–Modify the logical design–Upgrade or change the DBMS software and/or
the hardware platform
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
58
Operation
•Once the database has passed theevaluation stage, it is considered operational
•Beginning of the operational phase starts theprocess of system evolution
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
59
Maintenance and Evolution
•Required periodic maintenance:–Preventive maintenance–Corrective maintenance–Adaptive maintenance
•Assignment of access permissions and theirmaintenance for new and old users
•Generation of database access statistics•Periodic security audits•Periodic system-usage summaries
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
60
Parallel Activities in theDBLC and the SDLC
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
61
A Special Note aboutDatabase Design Strategies
•Two classical approaches to database design:
–Top-down design
•Identifies data sets
•Defines data elements for each of those sets
–Bottom-up design
•Identifies data elements (items)
•Groups them together in data sets
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
62
Top-Down vs. Bottom-Up DesignSequencing
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
63
Centralized vs. Decentralized Design•Database design may be based on two very
different design philosophies:
–Centralized design
•Productive when the data component iscomposed of a relatively small number ofobjects and procedures
–Decentralized design
•Used when the data component of system hasconsiderable number of entities and complexrelations on which very complex operations areperformed
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
64
Centralized Design
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
65
Decentralized Design
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
66
Aggregation Process
•Requires designer to create a single model inwhich various aggregation problems must beaddressed:
–Synonyms and homonyms
–Entity and entity subtypes
–Conflicting object definitions
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
67
Summary of Aggregation Problems
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
68
Summary
•Transformation from data to information isproduced when programming code operateson the data, thus producing applications
•Information system is designed to facilitatetransformation of data into information and tomanage both data and information
•SDLC traces the history (life cycle) of anapplication within the information system
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
8
69
Summary (continued)
•DBLC describes the history of the databasewithin the information system
•Database design and implementation processmoves through a series of well-definedstages
•Conceptual portion of the design may besubject to several variations, based on twodesign philosophies