Data Models Bca
Data Models Bca
• Data models
– Relatively simple representations, usually
graphical, of complex real-world data
structures
– Facilitate interaction among the designer, the
applications programmer, and the end user
1
The Importance of Data Models
(continued)
• End-users have different views and needs
for data
• Data model organizes data for various
users
2
Translating Business Rules into
Data Model Components
• Standardize company’s view of data
• Constitute a communications tool between users
and designers
• Allow designer to understand the nature, role,
and scope of data
• Allow designer to understand business
processes
• Allow designer to develop appropriate
relationship participation rules and constraints
• Promote creation of an accurate data model
3
Discovering Business Rules
(continued)
• Generally, nouns translate into entities
• Verbs translate into relationships among
entities
• Relationships are bi-directional
4
The Evolution of Data Models
(continued)
• Hierarchical
• Network
• Relational
• Entity relationship
• Object oriented (OO)
5
The Hierarchical Model
• Developed in the 1960s to manage large
amounts of data for complex
manufacturing projects
• Basic logical structure is represented by
an upside-down “tree”
6
The Hierarchical Model
(continued)
7
The Hierarchical Model
(continued)
• The hierarchical structure contains levels,
or segments
• Depicts a set of one-to-many (1:M)
relationships between a parent and its
children segments
– Each parent can have many children
– each child has only one parent
8
The Hierarchical Model
(continued)
• Advantages
– Many of the hierarchical data model’s features
formed the foundation for current data models
– Its database application advantages are
replicated, albeit in a different form, in current
database environments
– Generated a large installed (mainframe) base,
created a pool of programmers who
developed numerous tried-and-true business
applications
9
The Hierarchical Model
(continued)
• Disadvantages
– Complex to implement
– Difficult to manage
– Lacks structural independence
– Implementation limitations
– Lack of standards
10
The Network Model
• Created to
– Represent complex data relationships
more effectively
– Improve database performance
– Impose a database standard
• Conference on Data Systems
Languages (CODASYL)
• Database Task Group (DBTG)
11
The Network Model (continued)
• Schema
– Conceptual organization of entire database as viewed
by the database administrator
• Subschema
– Defines database portion “seen” by the application
programs that actually produce the desired
information from data contained within the database
• Data Management Language (DML)
– Defines the environment in which data can be
managed
12
The Network Model (continued)
14
The Network Model (continued)
15
The Network Model
(continued)
• Disadvantages
– Too cumbersome
– The lack of ad hoc query capability put
heavy pressure on programmers
– Any structural change in the database
could produce havoc in all application
programs that drew data from the database
– Many database old-timers can recall the
interminable information delays
16
The Relational Model
• Developed by Codd (IBM) in 1970
• Considered ingenious but impractical in
1970
• Conceptually simple
• Computers lacked power to implement the
relational model
• Today, microcomputers can run
sophisticated relational database software
17
The Relational Model
(continued)
• Relational Database Management System
(RDBMS)
• Performs same basic functions provided
by hierarchical and network DBMS
systems, in addition to a host of other
functions
• Most important advantage of the RDBMS
is its ability to hide the complexities of the
relational model from the user
18
The Relational Model
(continued)
• Table (relations)
– Matrix consisting of a series of row/column
intersections
– Related to each other through sharing a
common entity characteristic
• Relational diagram
– Representation of relational database’s
entities, attributes within those entities, and
relationships between those entities
19
The Relational Model
(continued)
• Relational Table
– Stores a collection of related entities
• Resembles a file
• Relational table is purely logical structure
– How data are physically stored in the
database is of no concern to the user or the
designer
– This property became the source of a real
database revolution
20
The Relational Model
(continued)
21
The Relational Model
(continued)
22
The Relational Model
(continued)
• Rise to dominance due in part to its powerful
and flexible query language
• Structured Query Language (SQL) allows the
user to specify what must be done without
specifying how it must be done
• SQL-based relational database application
involves:
– User interface
– A set of tables stored in the database
– SQL engine 23
Data Models: A Summary
• Each new data model capitalized on the
shortcomings of previous models
• Common characteristics:
– Conceptual simplicity without compromising the
semantic completeness of the database
– Represent the real world as closely as possible
– Representation of real-world transformations
(behavior) must comply with consistency and integrity
characteristics of any data model
24
Data Models: A Summary
(continued)
25