No Slide Title

Download Report

Transcript No Slide Title

Introduction to Database
Concepts
BUAD/American University
Intro to Database Concepts
1
Levels of System Development
• Analysis - describes the problem domain: use cases, classes, object,
relationships and interactions that model the Real World entities.
(Business Objects) Free from technical or implementations details
• Design - Technical expansion and adaptation of the analysis models.
How the analysis is to be implemented and the constraints of the
implementation environment are considered. Along with the objects
discovered in analysis, new “technical” classes (e.g. relational
database mapping classes, user interface classes etc.) are created to
support the requirements defined during the analysis.
• Implementation - Actual writing, testing and running of the code and
implementation of the database based on the Design. Mapping the
design to one or more Languages (e.g. Java, C++, Ada95) and to
databases
BUAD/American University
Intro to Database Concepts
2
Activities in Design
• Architectural Design - Analysis classes are divided into
functional groups (packages) and described across the
hardware. New functional groups such as user interface,
database management, security etc. are defined
• General Design - Reworking the analysis, adding new
technical classes, addresses issues of output format,
database Design and access, communication, class
libraries, exceptions etc
• Detailed Design - Specification of all classes, including
the needed implementation attributes and operation, and
physical database layout
BUAD/American University
Intro to Database Concepts
3
What is a Database?
• A database is an integrated and structured
collection of stored operational data used
(shared) by application systems of an
enterprise:
•
•
•
•
Manufacturing
University
Hospital
Bank
BUAD/American University
Product data
Student data, courses
Patient data, facilities
Account data
Intro to Database Concepts
4
What is a Database?
• A database (DB) is a structured collection of
data about the entities that exist in the
environment that is being modeled.
• The structure of the database is determined
by the data model that is used.
• A database management system (DBMS) is
the generalized tool that facilitates the
management of and access to the database.
BUAD/American University
Intro to Database Concepts
5
Definitions
• Data: Meaningful facts, text, graphics,
images, sound, video segments.
• Database: An organized collection of
logically related data.
• Information: Data processed to be useful in
decision making.
• Metadata: Data that describes data.
BUAD/American University
Intro to Database Concepts
6
History of Database Management
Systems
BUAD/American University
Intro to Database Concepts
7
File Processing
• Data are stored in files with interface
between programs and files.
• Various access methods exist (e.g.,
sequential, indexed, random)
• One file corresponds to one or several
programs.
BUAD/American University
Intro to Database Concepts
8
BUAD/American University
Intro to Database Concepts
9
Issues with File Systems
• Computer file system stores data in independent,
unrelated files on disk.
– Data are still high redundant
– Sharing limited and at the file level
– Data is unstructured (“flat” files)
• The sharing, security and integrity of the data can't be
enforced efficiently because of data redundancy and
data dependence problems.
– Ensuring data consistency and controlling access to data
(Sharing granularity is very coarse, difficulties in developing
new applications)
– High maintenance costs (data dependence; accessing data
BUAD/American University
Intro to Database Concepts
10
is difficult)
What is Data Redundancy?
• Exists when unnecessarily duplicated data are found
in the database.
• For example, a customer's telephone number may be
found in the customer file, in the sales agent file, and
in the invoice file.
• Data redundancy is symptomatic of a (computer) file
system, given its inability to represent and manage
data relationships.
• Data redundancy may also be the result of poorlydesigned databases that allow the same data to be
kept in different locations.
BUAD/American University
Intro to Database Concepts
11
Types of Data Redundancy
• Data inconsistency. Data
inconsistency is the lack of data
integrity.
• Data anomalies. Ideally, a field value
• change should be made only in a single
place. Data redundancy, however,
fosters an abnormal condition by forcing
field value changes in many different
locations.
BUAD/American University
Intro to Database Concepts
12
What is Data independence?
• Exists when changes in the data
characteristics don't require changes in the
programs that access those data.
• File systems exhibit data dependence
because file access is dependent on a file's
data characteristics.
• Therefore, any time the file data
characteristics are changed, the programs
that access the data within those files must
be modified.
BUAD/American University
Intro to Database Concepts
13
Database Management System
• A DBMS is a data storage and retrieval
system which permits data to be stored nonredundantly while making it appear to the
user as if the data is well-integrated.
BUAD/American University
Intro to Database Concepts
14
Database Management
Systems
• Goals of a DBMS
– Provides an environment that is both convenient and
efficient to store and retrieve information to and from a
computer system
– Help an organization to perform its mission and to achieve
its goals.
• Proper database system eliminates data
dependence and improves data integrity by
minimizing data redundancy.
BUAD/American University
Intro to Database Concepts
15
Advantages of the Database Approach
• Data Independence/Reduced Maintenance
• Improved Data Sharing
• Increased Application Development
Productivity
• Enforcement of Standards
• Improved Data Quality (Constraints)
• Better Data Accessibility/ Responsiveness
• Security, Backup/Recovery, Concurrency
BUAD/American University
Intro to Database Concepts
16
The Range of
Database Applications
• Personal Database
• Workgroup/Department Database
• Enterprise Database
BUAD/American University
Intro to Database Concepts
17
Workgroup database with local area network
BUAD/American University
Intro to Database Concepts
18
An enterprise
data
warehouse
BUAD/American University
Intro to Database Concepts
19
Components of the
Database Environment
•
•
•
•
•
•
CASE Tools
Repository
Database Management System (DBMS)
Database
Application Programs
User Interface
BUAD/American University
Intro to Database Concepts
20
Components
of the
database
environment
BUAD/American University
Intro to Database Concepts
21
Database stakeholders
• Database administrator (DBA)
– A person who is responsible for the
management of the entire database
environment
• System Developers
• Database users
– Casual users
– Naive users
– Application programmers
BUAD/American University
Intro to Database Concepts
22
What is a Database Model?
• Collection of logical constructs used to
represent the database's
• Data structure as well as the data
relationship(s) found within that
structure.
BUAD/American University
Intro to Database Concepts
23
Steps in the Database Development
Process
• Enterprise Modeling
• Conceptual Data Modeling
– Cuts across Project Initiation and Planning &
Analysis phases of SDLC
• Logical Database Design
• Physical Database Design and Creation
• Database Implementation
• Database Maintenance
BUAD/American University
Intro to Database Concepts
24
Functional and Database
Development life-cycles
BUAD/American University
Intro to Database Concepts
25
Conceptual and logical
database models
• E-R, object oriented, and semantic database
models.
• Describes the data and what the relationships
• Types of relationships represented include:
– One-to-many relationship
– Many-to-many relationship
– One-to-one relationship
BUAD/American University
Intro to Database Concepts
26
Implementation (Physical)
database models
• Describes how data are actually stored in the
database
• Types of Implementation (physical) database
models include:
• Hierarchical,
• Network,
• Relational, and
• Object oriented
BUAD/American University
Intro to Database Concepts
27
Hierarchical database Model
•
•
Data redundancy is avoided by using an upside-down tree structure
composed of parents and their children.
Since a parent can have many children, but each (hierarchical) child
can have only one parent, the parent data is identical for all of its
children and need not be repeated.
BUAD/American University
Intro to Database Concepts
28
Network Database Model
• The network model allows a record to have
more than one parent.
• Handles more relationship types then a
Hierarchical database.
– Many to Many relationships are easier to
implement in the than in the hierarchical model.
• Improved data access flexibility
BUAD/American University
Intro to Database Concepts
29
Network Model
BUAD/American University
Intro to Database Concepts
30
Issues with the Hierarchical and Network
Models
• The hierarchical and network models
yield some data independence, but they
still exhibit database structure
dependency.
• For example, changes in segments or
their location require data managers
and programmers to perform complex
system management tasks and
extensive maintenance coding.
BUAD/American University
Intro to Database Concepts
31
The Relational Model
• A Relational Database Management System
(RDBMS) is a single data repository that provides
both structural and data independence while
maintaining conceptual simplicity.
• The manages all of the complex physical details
• The relational database model is perceived by the
user to be a collection of tables in which data are
• stored.
• Each table resembles a matrix composed of row and
columns. Tables are related to each other by sharing
a common value in one of their columns
BUAD/American University
Intro to Database Concepts
32
Some advantages of Relational Model
• Structural independence. Does not use a
navigational data access system,
• Provides excellent ad hoc query capability.
End users find it easier to visualize their data
as a collection of data organized as a matrix.
• Designers find it easier to deal with
conceptual data representation, freeing them
from the complexities associated with
physical data representation.
BUAD/American University
Intro to Database Concepts
33
Structured query language (SQL)
• Is a fourth-generation language (4GL).
• allows the user to specify what must be done
without specifying how it must be done.
• Based on work done by IBM.
• Comprise of three parts: a user interface, a
set of tables within the database, and the
SQL “engine.”
BUAD/American University
Intro to Database Concepts
34
Object-Oriented Database model
• Excellent for capturing Complex data such as graphics, video, and
sound
• Objects contain all operations that can be performed on it, such as
changing its data values, finding a specific data value, and printing
data values.
• Because objects include data, various types of relationships, and
operational procedures, the object becomes self-contained
• Ad hoc query and navigation can be a challenge compared to a
relational database
• Hybrid databases called Object/relational database model
(O/RDM) or universal servers are starting to appear
BUAD/American University
Intro to Database Concepts
35
Why is database design so
important?
• Yields a detailed database blueprint. This
blueprint
• Usually in the form of an E-R or object model,
is used as the basis for database
implementation.
• A database created without the benefit of a
detailed blueprint is unlikely to be satisfactory.
BUAD/American University
Intro to Database Concepts
36
Points to Remember
• Good applications can't overcome bad
database designs
• The existence of a DBMS does not guarantee
good data management, nor does it
• ensure that the database will be able to
generate correct and timely information
• Ultimately, the end user decides what data
will be stored in the database
BUAD/American University
Intro to Database Concepts
37