Post on 07-Apr-2018
8/4/2019 DBMS, File Sys, Data Models[1]
1/49
Database Management Systems
versus
File System
8/4/2019 DBMS, File Sys, Data Models[1]
2/49
2
File Terminology
Data
Raw Facts
Field Group of characters with specific meaning
Record
Logically connected fields that describe a person,place, or thing
File and file folder
Collection of related records
8/4/2019 DBMS, File Sys, Data Models[1]
3/49
3
fieldrecord
8/4/2019 DBMS, File Sys, Data Models[1]
4/49
4
Simple File System
Figure 1.5
8/4/2019 DBMS, File Sys, Data Models[1]
5/49
5
File System
File System Data Management Requires extensive programming in third-generation
language (3GL): COBOL, Basic, and Fortran (whatmust 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
8/4/2019 DBMS, File Sys, Data Models[1]
6/49
6
Data Dependence
Change in files data characteristics requires
modification of data access programs Must tell program what to do and how to do
Structural Dependence
Change in file structure requires modification ofrelated programs
File System
8/4/2019 DBMS, File Sys, Data Models[1]
7/49
7
Field Definitions and Naming Conventions
Flexible record definition anticipates reporting
requirements
Selection of proper field names important
Attention to length of field names
Use of unique record identifiers
File System
8/4/2019 DBMS, File Sys, Data Models[1]
8/49
8
Data Redundancy
Different and conflicting versions of same data
Results of uncontrolled data redundancy Data anomalies
Modification
Insertion
Deletion Data inconsistency
Lack of data integrity
File System
8/4/2019 DBMS, File Sys, Data Models[1]
9/49
9
Database Systems
Database consists oflogicallyrelated datastored in a single repository
Provides advantages over file systemmanagement approach Eliminates data inconsistency (lack of data
integrity), data anomalies, data dependency, and
structural dependencyproblems Stores data structures, relationships, and access
paths
8/4/2019 DBMS, File Sys, Data Models[1]
10/49
10
Database vs. File Systems
8/4/2019 DBMS, File Sys, Data Models[1]
11/49
11
Database SystemEnvironment
8/4/2019 DBMS, File Sys, Data Models[1]
12/49
12
Database SystemEnvironment
Hardware
Systems Physical devices
Computers Peripherals
Network
8/4/2019 DBMS, File Sys, Data Models[1]
13/49
13
Database SystemEnvironment
Software
Operating system: manages hardware
components DBMS: manages database
MS Access, SQL Server, Oracle, DB2
Application and utility software:support access and manipulate data
Generate information for decision making
Help to manage database system
8/4/2019 DBMS, File Sys, Data Models[1]
14/49
14
Database SystemEnvironment
People (five users)
System administrator : hardware systemsupport
Database administrator: manage DBMSuse
Database designer: design database
structure System analysts and programmers:
implement application programs
End users:
8/4/2019 DBMS, File Sys, Data Models[1]
15/49
15
Database SystemEnvironment
Procedures
Instruction and rule that govern thedesign and use of the database system
Data
8/4/2019 DBMS, File Sys, Data Models[1]
16/49
16
Database System Types
Single-user vs. Multiuser Database(user number)
Desktop database
Workgroup database
Enterprise database
Centralized vs. Distributed (location)
Use
Production or transactional
Decision support or data warehouse
(obtain information)
8/4/2019 DBMS, File Sys, Data Models[1]
17/49
17
DBMS Functions
Objective: Guarantee the integrity andconsistency of data. It has several functions: Data dictionary management: (the definition of
the data elements and their relationships arestored 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)
8/4/2019 DBMS, File Sys, Data Models[1]
18/49
18
DBMS Functions
Backup and recovery management Data integrity management
Database access language and
application programming interfaces Query language (DDL and DML)
Database communication interfaces
8/4/2019 DBMS, File Sys, Data Models[1]
19/49
19
Database Models
Definition: collection of logical constructs
used to represent data structure andrelationships within the database Conceptual models: logical nature of data
representation; if emphasizes on what entity is
presented; it is used for database design asblueprint
Implementation models: emphasis on how thedata are represented in the database
8/4/2019 DBMS, File Sys, Data Models[1]
20/49
20
Database Models
Conceptual models include
Entity-relationship database model (ERDBD) Object-oriented model (OODBM)
Implementation models include
Hierachical database model (HDBM)
Network database model (NDBM)
Relational database model (RDBM)
Object-oriented database model (ODBM)
8/4/2019 DBMS, File Sys, Data Models[1]
21/49
21
Relationships in Conceptual Models
One-to-one (1:1)
One-to-many (1:M) Many-to-many (M:N)
Implementation Database Models
Hierarchical Network
Relational
Object-Oriented
Database Models (cont.)
8/4/2019 DBMS, File Sys, Data Models[1]
22/49
22
Hierarchical Database Model
(HDBM)
Logically represented by an upside down tree
Each parent can have many children (segmentlinkage)
Each child has only one parent
8/4/2019 DBMS, File Sys, Data Models[1]
23/49
23
Hierarchical Database Model
Logically represented by an upside down tree 1:M relationship
8/4/2019 DBMS, File Sys, Data Models[1]
24/49
24
Hierarchical Database Model
Hierarchical path (beginning from left) Left-list hierarchical path, or preorder traversal,
or hierarchical sequence
Re-list sequence, if the segment is frequentlyaccessed
Bank systems commonly use HD model
Final assembly->Component A->Assembly A-> -> PartA ->Part B -> Component B -> Component CAssembly B -> Part C ->Part D
8/4/2019 DBMS, File Sys, Data Models[1]
25/49
25
Hierarchical Database Model
Bank systems commonly use the HDBM customer account can be subject to many transactions (1:M
relationship)
Relationship is fixed (debiting and crediting)
Frequently access large amount of transactions
8/4/2019 DBMS, File Sys, Data Models[1]
26/49
26
Hierarchical Database Model
Advantages
Conceptual simplicity: relationship between layers islogically simple; design process is simple
Database security: enforced uniformly through thesystem
Data integrity
Data independence
Efficiency in 1:M relationships and when uses requirelarge numbers of transactions
Dominant in 1970s , when we used mainframe systemwith large databases
8/4/2019 DBMS, File Sys, Data Models[1]
27/49
27
Hierarchical Database Model
Disadvantages
Complex implementation: physical data storagecharacteristics; 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
8/4/2019 DBMS, File Sys, Data Models[1]
28/49
28
Network Database Model
(NDBM)
Each record can have multiple parents 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 applicationprograms
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
8/4/2019 DBMS, File Sys, Data Models[1]
29/49
29
Network Database Model
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
8/4/2019 DBMS, File Sys, Data Models[1]
30/49
30
Network Database Model
Member may have several owners
8/4/2019 DBMS, File Sys, Data Models[1]
31/49
31
Network Database Model
Advantages Conceptual simplicity, just lime HDM
Handles more relationship types (but all1:M relationship)
Data access flexibility
Promotes database integrity
Data independence
Conformance to standards
8/4/2019 DBMS, File Sys, Data Models[1]
32/49
32
Network Database Model
Disadvantages
System complexity
Lack of structural independence
8/4/2019 DBMS, File Sys, Data Models[1]
33/49
33
Relational Database Model
(RDBM)
Lets user or database designer to operate humanlogical environment
Perceived by user as a collection of tables for datastorage, while let RDBMS handles the physicaldetails.
Tables are a series of row/column intersections
Tables related by sharingcommon entitycharacteristics
It allows 1:1, 1:M, M:N relationships
8/4/2019 DBMS, File Sys, Data Models[1]
34/49
34
Relational Database Model
8/4/2019 DBMS, File Sys, Data Models[1]
35/49
35
8/4/2019 DBMS, File Sys, Data Models[1]
36/49
36
Relational Database Model Advantages
Structural independence: data access path is is
irrelevant to database design; change structure willnot 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
8/4/2019 DBMS, File Sys, Data Models[1]
37/49
37
Relational Database Model
Disadvantages
Substantial hardware and system softwareoverhead
Poor design and implementation is made easy
May promote islands of information problems
8/4/2019 DBMS, File Sys, Data Models[1]
38/49
38
Entity Relationship Database
Model (ERDBM)
Complements the relational data model concepts
ERDBM introduces a relational graphic
representation ERDBM is based on several components
Entity, tabled entity (in RDM)
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
8/4/2019 DBMS, File Sys, Data Models[1]
39/49
39
Entity Relationship Database
Model (ERDBM)
Represented in an entity relationship diagram
(ERD): Chens ERD model and Crows Foot
ERD Based on entities, attributes, and
relationships
8/4/2019 DBMS, File Sys, Data Models[1]
40/49
40
Entity Relationship Database
Model
entity
relationship
connection
M
8/4/2019 DBMS, File Sys, Data Models[1]
41/49
41
M:M
8/4/2019 DBMS, File Sys, Data Models[1]
42/49
42
Entity Relationship Database
Model
Advantages
Exceptional conceptual simplicity
Visual representation
Effective communication tool
Integrated with the relational database model
8/4/2019 DBMS, File Sys, Data Models[1]
43/49
43
Entity Relationship Database
Model
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 What will be the next one?
8/4/2019 DBMS, File Sys, Data Models[1]
44/49
44
Object-Oriented Database Model
(OODBM)
Semantic Data model (SDM)->Object-oriented DataModel (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 setbut 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 andmethods of classes above it
8/4/2019 DBMS, File Sys, Data Models[1]
45/49
45
Object-Oriented Database Model
(OODBM)
Contains implementation and procedure operationinformation for more complicated data such asgraphics, video, and other metadata
Support transaction and information Reusability
Portable to powered computing system
8/4/2019 DBMS, File Sys, Data Models[1]
46/49
46
Object-Oriented Database Model
8/4/2019 DBMS, File Sys, Data Models[1]
47/49
47
OO Database Model
Advantages
Adds semantic content
Visual presentation includes semantic content Database integrity
Both structural and data independence
8/4/2019 DBMS, File Sys, Data Models[1]
48/49
48
OO Database Model
Disadvantages
Lack of OODM
Complex navigational data access
Steep learning curve
High system overhead slows transactions
8/4/2019 DBMS, File Sys, Data Models[1]
49/49