Tải bản đầy đủ (.ppt) (51 trang)

Tổ chức dữ liệu và thông tin potx

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 (1.19 MB, 51 trang )

TỔ CHỨC DỮ LIỆU VÀ THÔNG TIN
TỔ CHỨC DỮ LIỆU VÀ THÔNG TIN
2
Các mục tiêu

Cách thức quản lý dữ liệu dựa trên phương pháp
database có nhiều ưu điểm hơn phương pháp file-
based.

Định nghĩa các khái niệm cơ bản về quản lý dữ liệu
và các thuật ngữ có liên quan

Giới thiệu Mô hình dữ liệu quan hệ và liệt kê các tính
năng cơ bản
3
Principles and Learning Objectives
(continued)

Một CSDL được thiết kế và quản lý tốt sẽ là một
công cụ rất hữu ích cho việc ra quyết định trong
kinh doanh

Xác định các chức năng cơ bản thực hiện bởi các hệ
quản trị CSDL và mô tả một vài hệ quản trị CSDL
thông dụng
4
Principles and Learning Objectives
(continued)

Các ứng dụng CSDL phát triển rất nhanh chóng và
có những ảnh hưởng rất lớn đến hiệu quả kinh


doanh

Xác định và miêu tả ngắn gọn về các ứng dụng CSDL
hiện tại
5
Data Management: The Hierarchy
of Data

Bit (a binary digit): a circuit that is either on or off

Byte: 8 bits

Character: each byte represents a character; the
basic building block of information

Field: name, number, or characters that describe an
aspect of a business object or activity
6
The Hierarchy of Data (continued)

Record: a collection of related data fields

File: a collection of related records

Database: a collection of integrated and related files

Hierarchy of data

Bits, characters, fields, records, files, and databases
7

The Hierarchy of Data (continued)
Figure 3.1: The Hierarchy of Data
8
Data Entities, Attributes, and Keys

Entity – Thực thể: a generalized class of people,
places, or things (objects) for which data is
collected, stored, and maintained

Attribute – Thuộc tính: a characteristic of an entity

Data item – Giá trị thuộc tính: a value of an
attribute

Key - Khóa: field(s) that identify a record

Primary key – Khóa chính: field(s) that uniquely
identify a record
9
Data Entities, Attributes, and Keys
(continued)
Figure 3.2: Keys and Attributes
10
The Traditional Approach Versus the
Database Approach

Traditional approach – Phương pháp truyền thống:
separate data files are created for each application

Results in data redundancy (duplication) – Dư thừa

dữ liệu

Data redundancy conflicts with data integrity – Toàn
vẹn dữ liệu

Database approach – Phương pháp dựa trên
CSDL: pool of related data is shared by multiple
applications

Significant advantages over traditional approach
11
The Traditional Approach Versus the
Database Approach (continued)
Figure 3.3: The Traditional Approach to Data Management
12
The Traditional Approach Versus the
Database Approach (continued)
Figure 3.4: The Database Approach to Data Management
13
The Traditional Approach Versus the
Database Approach (continued)
Table 3.1: Advantages of the Database Approach
14
The Traditional Approach Versus the
Database Approach (continued)
Table 3.1: Advantages of the Database Approach (continued)
15
The Traditional Approach Versus the
Database Approach (continued)
Table 3.2: Disadvantages of the Database Approach

16
Mô hình hóa dữ liệu và
Mô hình Cơ sở dữ liệu quan hệ

Khi xây dựng một cơ sở dữ liệu, cần xem xét các
khía cạnh

Nội dung: What data should be collected, at what
cost?

Truy cập: What data should be provided to which
users, and when?

Cấu trúc logic: How should data be arranged to make
sense to a given user?

Tổ chức vật lý: Where should data be physically
located?
17
Mô hình dữ liệu - Data Modeling

Building a database requires two types of design

Logical design (Thiết kế logic)

Shows an abstract model of how data should be
structured and arranged to meet an organization’s
information needs

Physical design (Thiết kế vật lý)


Fine-tunes the logical database design for performance
and cost considerations
18
Data Modeling (continued)

Mô hình dữ liệu - Data model: Lược đồ mô hình
các thực thể dữ liệu và mối quan hệ giữa chúng

Lược đồ Quan hệ Thực thể - Entity-relationship
(ER) diagrams: Các mô hình dữ liệu sử dụng các
ký hiệu đồ họa để biểu diễn tổ chức dữ liệu và mối
quan hệ giữa các dữ liệu
19
Data Modeling (continued)
Figure 3.5: An Entity-Relationship (ER) Diagram for a Customer
Order Database
20
The Relational Database Model

Mô hình quan hệ - Relational model: all data
elements are placed in two-dimensional tables
(relations), which are the logical equivalent of files

In the relational model:

Each row of a table represents a data entity

Columns of the table represent attributes


Miền - Domain: the allowable values for data
attributes
21
The Relational Database Model
(continued)
Figure 3.6: A Relational Database Model
22
Các thao tác với dữ liệu –
Manipulating Data

Phép chọn - Selecting: eliminates rows according
to criteria

Phép chiếu - Projecting: eliminates columns in a
table

Phép nối - Joining: combines two or more tables

Phép liên kết - Linking: relates or links two or more
tables using common data attributes
23
Manipulating Data (continued)
Figure 3.8: Linking Data Tables to Answer an Inquiry
24
Hệ Quản trị Cơ sở dữ liệu - Database
Management Systems (DBMS)

Interface between

Database and application programs


Database and the user

Database types

Flat file

Single user

Multiple users
25
Providing a User View

Schema: description of the entire database

User view: user-accessible portion of the database

Subschema

Contains a description of a subset of the database

Identifies which users can view and modify the data
items in the subset

Is used to create different user views

×