Transcript Slide 1

Chapter1
Database Modeling Past and Present
1
Database Modeling
Past and Present
 The definition of a database
The definition of a database model
The evolution of database model
The hierarchical and network database models
The relational database model
The object and object-relational database models
Database model types
Database design objectives
Database design methods
2
Grasping the Concept of a Database
What is the difference between database and database model?
What is the difference between data and meta data?
The general view of a database
FirstName LastName
Salary
Ahmed
Shaheen
Data
5000
Field
Type
Length
FirstName
Char
50
LastName
Char
50
Salary
int
10
3
Understanding a Database model
A database model is used to
describe an organized and
ordered set of information
The Relation between
database model and the
application
OLTP applications and OLTP
models
Data warehouse application
and data ware house models
4
The Evolution of Database Modeling
Database modeling techniques
are:
1. File Systems
2. Hierarchical Database Model
3. Network Database Model
4. Relational Database Model
5. Object Database Model
6. Object-Relational Database
Model
5
File Systems
No modeling techniques are applied
Data base is stored in flat files
Utilizing The structure of the operating system alone
Any searching through flat files has to be explicitly programmed
Any relationships and validation between flat files would have to be
Programmed
The capabilities is poor an dlimitede
Flat file is a simple text file,
containing no structure
whatsoever
6
Hierarchical Database Model
 The hierarchical database model is an
inverted tree-like structure
 The tables model support child-parent
relationship
 Each child table has a single parent
 Each parent can have multiple child
tables
 Any entries in child tables can only exist
where corresponding parent entries
exist
Example of a hierarchical
database model
 Hierarchical database model support
one-to-many relationships
7
Network Database Model
o Network database model is a refinement of the hierarchical database model
o Child tables are allowed to have more than one parent
o Many –to-many relationships are allowed in addition to one-to-many relationships
One employee can be assigned
many tasks and a task can be
assigned to many employee
Mangers can be a part
of both departments
and companies
8
Relational Database Model
Any table can be
accessed directly
without having to access
all parent objects
Any tables can be link
together regardless of
their hierarchical
structure
Any table can be linked
to both any number of
parent tables and any
number of child tables
9
Relational Database Management System (RDBMS)
Software Development Kit (SDK)
End front tools
Complete management kit
Example: Access
RDBMS is both the
database engine and
any other tools that
come with it
10
The History of the Relational Database Model
• The relational database model was invented by
Dr. Codd.
• The relational database began as a way of
getting a group of data from a larger data set
• This were done through a process called
normalization
• Normalization is a process which aim at
removing duplication from the data
• Normalization is composed of a number of steps
called normal forms
• The result was the Structured Query Language
(SQL)
• The development of the relational database
model was done in terms of the movement of
personal skills
11
Object Database Model
Object database model provides
three dimensional structure to
data
Object database model is
efficient for finding unique items
Object database model performs
poorly for finding more than
single items
Object database model remove
the need for types and many-tomany relationship replacement
tables
If you can figure out
who little pieces work
individually, it makes
the big picture
12
Object-Relational Database Model
o The Object-relational database model was created in answer to conflicting
capabilities of relational and object database models
o Essentially, object database modeling capabilities are included in relational
database
Summary of the evolution of database modeling
File System
No database model
Hierarchical
Allowing one-to-many relationships
Network
Allowing for special relationships
Relational
Allowing for individual element access anywhere in the database
Object
Handling high-speed application of small data items within large
highly complex data sets
Objectrelational
Including the most accountable aspects of object database into the
structure of the relational database model
13
Examining the Types of Databases
Databases functionally fall into three categories:
Transactional
Decision support system (DSS)
Hybrid
14
Transactional Databases
 The primary function of the database is to add new data, change
existing data, deleting existing data
 All operations are done in very small chunks, such individual
records
Examples:
•Client server database: low concurrency and low throughput
•OLTP database: enormously high levels of concurrent database
access
15
Decision Support System
DSS examples:
•Data warehouse database: excessively large, OLTP is the source of
the database
•Data mart: a small subset of a larger data warehouse
•Reporting database: a data warehouse but containing only active
data ( more manageable and flexible)
16
Hybrid Databases
OLTP concurrency requirements
+
Data warehouse requirements
A smaller hybrid
database is often a
more cost-effective
This section presented:
 What a database does
 The function of the database can determine the way in which
the database model is built
17
Understanding the Database Model Design
Design process involves putting your ideas on paper before
actually constructing your object
Use every thing (flowcharts, pretty picture, ERD,…) to insure that
what you intend to build is not only what you need but also will
actually work
Poor design can cost a company more money than it is prepared to
spend
Design is needed to ensure that it works before spending
humungous amounts of money finding out that it does not
18
Defining the Objectives
A proper relational database model should:
Aim for a well-structured database model: simple,
easy to read, easy to comprehend
Data integrity: data is not lost, destroyed when it
should be
Support both planned and unplanned queries
Each table in a database model preferably represent
You have to plan
your steps and
you also have to
know what the
steps are that
you planning for
a single subject or topic
Future growth must be a serious consideration
Future changes can be accommodated for
Minimize dependent between application and
database model
19
Looking at Methods of Database Design
Database modeling steps:
1. Requirements analysis: nature of the data, features required and
output responses
2. Conceptual Design: draw pretty pictures, ERD diagrams, creation of
tables
3. Logical design: Create database language commands
4. Physical design
5. Tuning phase: indexing, normalization, security features, ….
These separate steps are
interchangeable, repeatable,
iterative, and really anything
able
20
Summary
In this chapter, you learned about:
The difference between a database, a database model, and an application
The hierarchical and network database models
The relational database model
The object and object-relational database models
Why different database models evolved
The relational database model is the best all round option available
Database design depends on applications
Database types
Database design objectives and methods
21