Download 沒有投影片標題

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
no text concepts found
Transcript
Fundamentals of
Database Systems
Chapter 1
Database and Database Users
CSIE NUK
Database
1
Introduction
 Basic Definitions
 Database
» A collection of related data
 Data
» Known facts that can be recorded and have an
implicit meaning
 Mini-world (Universe of Discourse, UoD)
» Some part of the real world about which data is
stored in a database
» E.g., student grades and transcripts at a university
CSIE NUK
Database
2
Introduction (cont.)
 Database Management System (DBMS)
» A software package/ system to facilitate the
creation and maintenance of a computerized
database
 Database System
» The DBMS software together with the database
» Sometimes, the applications are also included
CSIE NUK
Database
3
Introduction (cont.)
CSIE NUK
Database
4
Introduction (cont.)
 Example of a Database
 Mini-world for the example: Part of a
UNIVERSITY environment
 Some mini-world entities
» STUDENTs
» COURSEs
» SECTIONs (of COURSEs)
» (academic) DEPARTMENTs
» INSTRUCTORs
CSIE NUK
Database
5
Introduction (cont.)
 Some mini-world relationships
» SECTIONs are of specific COURSEs
» STUDENTs take SECTIONs
» COURSEs have prerequisite COURSEs
» INSTRUCTORs teach SECTIONs
» COURSEs are offered by DEPARTMENTs
» STUDENTs major in DEPARTMENTs
CSIE NUK
Database
6
Introduction (cont.)
CSIE NUK
Database
7
Characteristics of Database
Approach
 Database v.s. File-processing
 Self-contained nature
» A DBMS catalog stores the description of the
database (called meta-data)
» This allows the DBMS software to work with
different databases
 Program-data independence
» Allows changing data storage structures and
operations without having to change the DBMS
access programs
CSIE NUK
Database
8
Characteristics of Database (cont.)
For example, a STUDENT record
» If add another field, Birthday
– File-processing: needs to rewrite the program
– Database system: only change the STUDENT
description, no change to DBMS program
CSIE NUK
Database
9
Characteristics of Database (cont.)
 Data abstraction
» A data model is used to hide storage details and
present the users with a conceptual view of the
database
 Support of multiple views of the data
» Each user may see a different view of the
database, which describes only the data of
interest to that user
» A view may be materialized (stored) or virtual
(definition)
CSIE NUK
Database
10
Characteristics of Database (cont.)
» Different database views reveal different
combinations of data
CSIE NUK
Database
11
Characteristics of Database (cont.)
» Student transcript view
» Course prerequisite view
CSIE NUK
Database
12
Characteristics of Database (cont.)
 Sharing of Data and Multiuser Transaction
Processing
» Allow multiple users to access the database at the
same time
» The DBMS must include concurrency control
software (On-line transaction processing,OLTP)
» e.g., Air-line reservation
CSIE NUK
Database
13
Characteristics of Database (cont.)
 Additional Advantages
 Controlling redundancy
» In file-processing approach, every user group
maintains its own files
e.g., Course registration, Accounting office
» Problems: inconsistency, wasted storage
» In database approach, all user groups are
integrated, no redundancy
» But in some cases, redundancy is useful; need
redundancy controlling to prohibit inconsistency
CSIE NUK
Database
14
Characteristics of Database (cont.)
» Controlled redundancy
» Uncontrolled redundancy
CSIE NUK
Database
15
Characteristics of Database (cont.)
 Enforcing integrity constraints
» Data type constraint
– e.g., Grade: A, B, C, D, E
» Relationship constraint
– e.g., every section record is related to a course record
» Uniqueness constraint
– e.g., CourseNumber
» Note: errors may occur even if integrity
constraints
hold
CSIE NUK
– e.g., a student’sDatabase
grade A is wrongly entered C
16
Characteristics of Database (cont.)
 Restricting unauthorized access
 Sharing of data among multiple users
 Providing multiple user interfaces
 Representing complex relationships
 Providing backup and recovery
 Potential for enforcing standards
 Reduced application development time
 Flexibility to change data structures
CSIE NUK
Database
17
Characteristics of Database (cont.)
 Availability of up-to-date information
 Economies of scale
CSIE NUK
Database
18
Actors of Database Systems
 Actors on the Scene
 Database administrators
 Database designers
 End users
 System analysts
 Application programmers
CSIE NUK
Database
Software
Engineers
19
Actors of Database Systems (cont.)
 Workers behind the Scene
 DBMS system designers and implementers
» Design and implement the DBMS modules and
interfaces as a software package
 Tool developers
» Tools are optional packages, e.g., GUI
 Operators and maintenance personnel
» Responsible for the actual running and
maintenance
CSIE NUK
Database
20
When not to use a DBMS
 Main costs of using a DBMS
 High initial investment and possible need for
additional hardware
 Generality that a DBMS provides for
defining and processing data
 Overhead for providing generality, security,
recovery, integrity, and concurrency control
CSIE NUK
Database
21
When not to use a DBMS (cont.)
When a DBMS may be unnecessary
 The database and applications are simple,
well defined, and not expected to change
 There are stringent real-time requirements
that may not be met because of DBMS
overhead
 Multiple-user access to data is not required
CSIE NUK
Database
22