Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Siti Zuhra Abu Bakar Department of Information Technology and Communication The Ungku Omar Polytechnic
Database Concepts
File Systems and Databases
Outline
What a database is, what it does, and why database design is important How modern databases evolved from files and file systems About flaws in file system data management What a DBMS is, what it does, and how it fits into the database system About types of database systems and database models
Data: raw facts Being stored and retrieved Not be processed to reveal their meaning to the user For example:
Robcor company has two divisions and the two division has 1,380,456 and 1,453,907 invoices, respectively. Each invoice has invoice number, date, and amount The period is from the first quarter of 1997 to first quarter of 2002. Total 2,834,363 records
4
Data
12-Jan-2002
$121.98
3000124
Database Management
Database Management
Database Management System (DBMS): software system (collect of software) help to manage the data contents
Manages Database structure Controls access to data Contains query language
Application software
DBMS
Database
10
Importance of DBMS
Makes data management more efficient and effective Query language allows quick answers to ad hoc queries Provides better access to more and better-managed data Promotes integrated view of organizations operations Reduces the probability of inconsistent data
11
12
Database Design
Practical Approach
Focus on principles and concepts of database design Importance of logical design
13
First applications focused on clerical tasks Requests for information quickly followed File systems developed to address needs
Data organized according to expected use Data Processing (DP) specialists computerized manual file systems
14
15
File Terminology
Data
Raw Facts Group of characters with specific meaning Logically connected fields that describe a person, place, or thing Collection of related records
16
Field
Record
record
field
17
18
Figure 1.5
19
Requires extensive programming in third-generation language (3GL): COBOL, Basic, and Fortran (what must be done and how it is to be done) Time consuming depends on physically store data Makes ad hoc queries impossible Make difficult to modify file system (each file has its own system) Leads to islands of information
20
Data Dependence
Change in files data characteristics requires modification of data access programs Must tell program what to do and how to do Makes file systems cumbersome from programming and data management views
Structural Dependence
22
Data Redundancy
Different
Data inconsistency
23
Database Systems
Database consists of logically related data stored in a single repository Provides advantages over file system management approach
Eliminates data inconsistency (lack of data integrity), data anomalies, data dependency, and structural dependency problems Stores data structures, relationships, and access paths
24
25
26
Hardware
27
Software
Operating system: manages hardware components DBMS: manages database
28
29
Procedures
Instruction and rule that govern the design and use of the database system
Data
30
31
DBMS Functions
Objective: Guarantee the integrity and consistency of data. It has several functions:
Data dictionary management: (the definition of the data elements and their relationships are stored in a data dictionary). It remove data and structure dependencies. Data storage management: structures required for data storage Data transformation and presentation: relieving us from the distinct between logical data format and physical data format Security management Multiuser access control (concurrency)
32
DBMS Functions
Backup and recovery management Data integrity management Database access language and application programming interfaces
33
Database Models
Definition: collection of logical constructs used to represent data structure and relationships within the database
Conceptual models: logical nature of data representation; if emphasizes on what entity is presented; it is used for database design as blueprint Implementation models: emphasis on how the data are represented in the database
34
Database Models
35
36
37
1:M relationship
38
Final assembly->Component A->Assembly A-> -> Part A ->Part B -> Component B -> Component C Assembly B -> Part C ->Part D
Re-list sequence, if the segment is frequently accessed Bank systems commonly use HD model
39
customer account can be subject to many transactions (1:M relationship) Relationship is fixed (debiting and crediting) Frequently access large amount of transactions
40
Advantages
Conceptual simplicity: relationship between layers is logically simple; design process is simple Database security: enforced uniformly through the system Data integrity Data independence Efficiency in 1:M relationships and when uses require large numbers of transactions Dominant in 1970s , when we used mainframe system with large databases
41
Disadvantages
Complex implementation: physical data storage characteristics; database design is complicated Difficult to manage and lack of standards Lacks structural independence Applications programming and use complexity (pointer based) Implementation limitations, i.e. especially it only handle 1:M type of model
42
Called by Database Task Group (DBTG) to define standards Three crucial database components
Network schema: conceptual organization of the entire database Subschema: portion of database as information for application programs Database management language: defining data characteristics and data structure
Schema Data definition language (DDL): define schema components Subschema Data definition language Data manipulating language: manipulate data content
43
Each record can have multiple parents Introduce set to describe relationship Each set has owner record and member record, parallel to parent and child in HDM
Member may have several owners One-ownership
44
45
Advantages
Conceptual simplicity, just lime HDM Handles more relationship types (but all 1:M relationship) Data access flexibility Promotes database integrity Data independence Conformance to standards
46
Disadvantages
System complexity Lack of structural independence
47
Lets user or database designer to operate human logical environment Perceived by user as a collection of tables for data storage, while let RDBMS handles the physical details. Tables are a series of row/column intersections Tables related by sharing common entity characteristics It allows 1:1, 1:M, M:N relationships
48
49
50
Advantages
Structural independence: data access path is is irrelevant to database design; change structure will not affect the database Improved conceptual simplicity Easier database design, implementation, management, and use Ad hoc query capability with SQL (4GL is added) Powerful database management system
51
Disadvantages
Substantial hardware and system software overhead Poor design and implementation is made easy May promote islands of information problems
52
Complements the relational data model concepts ERDBM introduces a relational graphic representation ERDBM is based on several components
Entity and entity set, a collection of like entities Each entity has attributes to describe the entity, which is similar to field in table Relationship and connection
53
Represented in an entity relationship diagram (ERD): Chens ERD model and Crows Foot ERD Based on entities, attributes, and relationships
54
relationship
55
56
Advantages
Exceptional conceptual simplicity Visual representation Effective communication tool Integrated with the relational database model
57
Disadvantages
Limited constraint representation Limited relationship representation (internal relationship can not be depicted; multiple relationships) No data manipulation language (no complete) Loss of information content
58
Semantic Data model (SDM)->Object-oriented Data Model (OODM) Object-oriented concept: Objects or abstractions of real-world entities are stored
Attributes describe properties Collection of similar objects is a class, similar to entity set but contains procedure methods
Methods represent real world actions of classes Classes are organized in a class hierarchy
Inheritance is the ability of object to inherit attributes and methods of classes above it
59
Contains implementation and procedure operation information for more complicated data such as graphics, video, and other metadata Support transaction and information Reusability Portable to powered computing system
60
61
OO Database Model
Advantages
Adds semantic content Visual presentation includes semantic content Database integrity Both structural and data independence
62
OO Database Model
Disadvantages
Lack of OODM Complex navigational data access Steep learning curve High system overhead slows transactions
63
64
65
66