Tải bản đầy đủ (.pdf) (40 trang)

Tài liệu overview of data modeling and database design pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (314.58 KB, 40 trang )

Overview of Data Modeling and
Database Design
8
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć2
Schedule: Timing Topic
40 minutes Lecture
40 minutes Total
Class Management Note:
Files required for this lesson are:
Demonstration: None
Practice: None
Overview of Data Modeling and Database Design 8Ć3
Objectives
Before you build your tables, you design your database. In this lesson, you
examine the data modeling process and relational database concepts, and define
normalization. You also translate an entity relationship model into a relational
database design.
At the end of this lesson, you should be able to
D
Describe the stages of system development.
D
List and define basic types of data relationships.
D
Define a relational database and its components.
D
Read an entity relationship model.
D
Translate an entity relationship model into a relational database design.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć4
Class Management Note:
This lesson is an overview to the DDL lessons. Please remember that as an


overview, you are presenting basic concepts. Students can gain additional
information about this topic from the Concepts Manual and by attending the
Develop Complex Data Models and Design Database course.
Overview of Data Modeling and Database Design 8Ć5
Overview
When you create a database, you need to carefully consider its components. For
assistance with the design, you can follow the concepts outlined in this lesson.
System Development Cycle
In order to logically and successfully create the database objects in the Oracle7
Server, you complete the system development cycle. Each stage of the cycle contains
specific activities that you perform to achieve the best possible database design.
Database Design
Database design is just one of the stages of the development cycle. Through good
database design, you can achieve a reliable, high-performance system.
Challenges to Managing Data
There are many challenges you face as you design your system. They range from
controlling data redundancy to enhancing communications with users. By meeting
each of these challenges through good database design, you improve the performance
of your database.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć6
Overview of Data Modeling and Database Design 8Ć7
System Development Cycle
From concept to production, develop a database by using the system development
cycle. The cycle contains multiple stages of development. This top-down, systematic
approach to database development transforms business information requirements into
an operational database.
Stages of Development
Strategy and Analysis
D
Study and analyze the business requirements. Interview users and managers to

identify the information requirements. Incorporate the enterprise and application
mission statements as well as any future system specifications.
D
Build models of the system. Transfer the business narrative developed in the
strategy and analysis phase into a graphical representation of business information
needs and rules. Confirm and refine the model with the analysts and experts.
Design
D
Design the database. The entity relationship model maps entities to tables,
attributes to columns, relationships to foreign keys, and business rules to
constraints.
Build and Document
D
Build the prototype system. Write and execute the commands to create the tables
and supporting objects for the database.
D
Develop user documentation, help-screen text, and operations manuals to support
the use and operation of the system.
Transition
D
Refine the prototype. Move an application into production with user acceptance
testing, conversion of existing data, and parallel operations. Make any
modifications required.
Production
D
Roll out the system to the users. Operate the production system. Monitor its
performance, and enhance and refine the system.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć8
Overview of Data Modeling and Database Design 8Ć9
Database Design

Designing a relational database system involves converting a model into a workable
software representation. The entities (or objects) perceived by the user are
transformed into tables in the database. All forms of design involve a mixture of
rules, judgements, and common sense, and relational design is no different.
During a design effort, your goal is to design reliable, high-performance systems
using the deliverables from the analysis effort. The following key factors describe in
detail why you should bother to design at all.
Performance
The initial design of a system has an enormous impact on its final performance.
Generally the impact is much greater than any remedial tuning.
Integrated Application
Application systems are typically developed by teams of developers. Without some
design specification from which to work, developers will each build in their own
style. Not only does good design promote a cohesive look and feel, but it also helps
ensure that all components of the resulting application system are integrated with
each other.
Integration with Other Systems
Often, there are requirements that a new system integrate with existing systems, or
even with systems yet to be built. Good design extends the integration benefits
mentioned above into corporate or worldwide systems.
Documentation and Communication
A major part of a designer’s job is to communicate design decisions to others. At the
very least, these decisions need to be documented.
Scalability
Tackle performance issues during design rather than during production. For example,
developing an application in a small, controlled environment does not test real-world
situations or a large set of data, factors that can reveal design flaws.
Avoid Reinventing the Wheel
Many of the problems you will face will have been encountered by others before you.
Use existing successful design solutions wherever you can.

Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć10
Server
ÉÉ
ÉÉ
ÉÉ
ÉÉ
Overview of Data Modeling and Database Design 8Ć11
Data Model
Models are a cornerstone of design. Engineers build a model of a car before putting it
into production to work out any details. In the same manner, system designers
develop models to explore ideas and improve the understanding of the database
design.
Purpose of Models
Models help communicate the concepts in people’s minds. They can be used for the
following purposes:
D
Communicate
D
Categorize
D
Describe
D
Specify
D
Investigate
D
Evolve
D
Analyze
D

Imitate
The objective is to produce a model that fits a multitude of these uses, can be
understood by an end user, but contains sufficient detail for a developer to build a
database system.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć12
Overview of Data Modeling and Database Design 8Ć13
Entity Relationship Modeling
Entity relationship models are derived from business specifications or narratives. This
model is a graphical representation of business information needs and rules.
Entity Relationship Models
Entity relationship models separate the information required by a business from the
activities performed within a business. Although businesses can change their
activities, the type of information tends to remain constant. Therefore, the data
structures also tend to be constant.
Benefits of Entity Relationship Models
D
Documents information requirements for the organization in a clear, precise
format
D
Provides an easily understood pictorial map for the database design
D
Develops and refines the model easily
D
Provides a clear picture of the scope of the information requirements
D
Offers an effective framework for integrating multiple applications, development
projects, and purchased application packages
Key Components
Component
Description

Entity A thing of significance about which information needs to
be known.
Attribute Something that describes or qualifies an entity.
Relationship A named association between entities showing optionality
or degree.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć14
Overview of Data Modeling and Database Design 8Ć15
Entity Relationship Model Concepts
An entity relationship model is composed of entities, attributes, and relationships.
Entities
An entity represents a thing of significance about the business system, or a discrete
category or collection of related data. Examples are customer, orders, and employees.
To represent an entity in a model, use the following conventions:
D
Soft box with any dimensions
D
Singular, unique entity name
D
Entity name in uppercase
D
Optional synonym names in uppercase within parentheses “()”
Attributes
An attribute describes entities and holds the specific information that should be
known about an entity. For example, for the customer entity, the attributes would be
customer number, name, phone number, and address.
If an entity does not have attributes that need to be known from the business
viewpoint, then it is not within the scope of the system requirements, and should not
appear in the model.
Each of the attributes is either required or optional. This state is called optionality.
To represent an entity in a model, use the following conventions:

D
Use singular names in lowercase.
D
Tag mandatory attributes, or values that must be known, with an asterisk “*”.
D
Tag optional attributes, or values that may be known, with an “o”.
Unique Identifiers
A unique identifier (UID) is any combination of attributes or relationships, or both,
that serves to distinguish occurrences of an entity. Each entity occurrence must be
uniquely identifiable.
D
Tag each attribute that is part of the UID with a number symbol (#).
D
Tag secondary UIDs with a number sign in parentheses (#).
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder8Ć16

×