You are on page 1of 71

DBMS I

Using
Microsoft SQL Server Admas University
I.C.T Departments
Semestre 2
DATABASE MANAGEMENT
SYSTEMS (DBMS I)

CHAPTER 01
INTRODUCTION
TO DBMS
DATABASE MANAGEMENT
SYSTEMS (DBMS I)

Modern Database Management


10th Edition
Jeffrey A. Hoffer, Mary B.
Prescott,
Fred R. McFadden
2007 by Prentice Hall 3
DATABASE MANAGEMENT SYSTEMS (DBMS I)
As one of the oldest components associated with computers as
an application language is the Database Management System or
(DBMS).
DBMS: is a computer software program that is designed as the means of
managing all databases that are currently installed on a system hard drive
or network.

Different types of database management systems exist, with some of


them designed for proper control of databases that are configured for
specific purposes.

The DBMS is marketed in many forms. Some of the more popular


examples of DBMS solutions are:
1. MICROSOFT ACCESS.
2. SQL SERVER.
3. ORACLE.
4. OTHER DATABASES.
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)

All these products are used for a specific purpose that can be
associated with a specific user whose job is to do a specific task. This
means that it is possible to designate one or more database
administrators who may control the DATABSE.

DATABASE ADMINISTRATOR:
1. He is the person who is responsible for controlling the entire
DATABASE components (Such as Different databases, tables,
relationships, database backups, database restoration....etc).

2. He is the person who provides other users with various levels of


administration rights (Such as Creating databases / tables, Updating
databases / tables, Deleting databases / tables, Creating
Relationships.....etc).
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)

DBMS needs Interface Software:


Organizations may use DBMS for storing data. Users can interact with a
database management system through software applications that include
programming code to work with the database. These software applications can
be traditional or web-based.

A DATABASE MANAGEMENT SYSTEM consists of tables with columns


and rows. The column label identifies the data within the column. Each row
contains the actual data of an entity, which can be a person, location, and
object.

FOR EXAMPLE: A customer database, may have columns for the customer's
ID, first name, last name, and email address, and each row contains an
individual customers data.
DATABASE MANAGEMENT SYSTEMS (DBMS I)
Users can interact with a database management system through software
applications that include programming code to work with the database.
These software applications can USE VISUAL STUDIO or OTHER
PACKAGES.
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)

Primary Key: DBMS use primary keys for retrieving data specifically.
Primary Key Definition: A primary key identifies & represents one
particular FIELD of a Line or Record which is unique value for that
Record or Line. A Primary Key is assigned to the field that is unique for
that Line of data.
For Example: In an employee table the primary key may be an
employee identification number (employee ID) that each employee is
permanently assigned to and which no other employee will use.

The speed of data retrieval is important, especially as the amount of


data increases. A developer may add an index to the DBMS to allow
queries to run faster. The index uses a primary key, such as a tax
identification number or Telephone No or personal ID...etc.
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)

What is Standard query language SQL?


To work with the data in the databases, a database developer
will write programming statements called queries.
Database management systems are accessed, DELETED,
SEARCHED, updated, ......etc using Structured Query
Language (SQL).
Different brands of database management systems may
require the use of different versions of SQL, though they
have many similarities.
DATABASE MANAGEMENT SYSTEMS (DBMS I)
DATABASE MANAGEMENT SYSTEMS (DBMS I)
Definitions
Database: organized collection of logically related
data
Data: stored representations of meaningful objects
and events
Structured: numbers, text, dates
Unstructured: images, video, documents
Information: data processed to increase knowledge
in the person using the data
Metadata: data that describes the properties and
context of user data 24
Figure 1-1b Summarized data

Graphical displays turn data into useful information that


managers can use for decision making and
interpretation
25
Descriptions of the properties or characteristics of
the data, including data types, field sizes, allowable
values, and data context
26
Disadvantages of File Processing

Program-Data Dependence
All programs maintain metadata for each file they use
Duplication of Data
Different systems/programs have separate copies of the same data
Limited Data Sharing
No centralized control of data
Lengthy Development Times
Programmers must design their own file formats
Excessive Program Maintenance
80% of information systems budget
27
Problems with Data Dependency

1. Each application programmer must maintain


his/her own data
2. Each application program needs to include
code for the metadata of each file
3. Each application program must have its own
processing routines for reading, inserting,
updating, and deleting data
4. Lack of coordination and central control
5. Non-standard file formats
28
Figure 1-3 Old file processing systems at Pine Valley
Furniture Company
Duplicate Data

29
Problems with Data Redundancy

1. Waste of space to have duplicate data


2. Causes more maintenance headaches
3. The biggest problem:
A. Data changes in one file could cause
inconsistencies
B. Compromises in data integrity

30
SOLUTION:
The DATABASE Approach

1. Central repository of shared data


2. Data is managed by a controlling agent
3. Stored in a standardized, convenient form

Requires a Database Management System


(DBMS)

31
Database Management System
A software system that is used to create, maintain, and
provide controlled access to user databases

Order Filing
System

Invoicing Central database


DBMS
System
Contains employee,
order, inventory,
pricing, and
Payroll
customer data
System

DBMS manages data resources like an operating system


manages hardware resources
32
Advantages of the Database Approach

1. Program-data independence
2. Planned data redundancy
3. Improved data consistency
4. Improved data sharing
5. Increased application development productivity
6. Enforcement of standards
7. Improved data quality
8. Improved data accessibility and responsiveness
9. Reduced program maintenance
10. Improved decision support

33
Costs and Risks of the Database Approach

New, specialized personnel


Installation and management cost and
complexity
Conversion costs
Need for explicit backup and recovery
Organizational conflict

34
Elements of the Database Approach

Data models
Graphical system capturing nature and relationship of data
Enterprise Data Modelhigh-level entities and relationships for
the organization
Project Data Modelmore detailed view, matching data structure
in database or data warehouse
Relational Databases
Database technology involving tables (relations) representing
entities and primary/foreign keys representing relationships
Use of Internet Technology
Networks and telecommunications, distributed databases,
client-server, and 3-tier architectures
Database Applications
Application programs used to perform database activities
(create, read, update, and delete) for database users
35
Components of the Database Environment

CASE Tools computer-aided software engineering


Repository centralized storehouse of metadata
Database Management System (DBMS) software for
managing the database
Databasestorehouse of the data
Application Programssoftware using the data
User Interfacetext and graphical displays to users
Data/Database Administratorspersonnel responsible for
maintaining the database
System Developerspersonnel responsible for designing
databases and software
End Userspeople who use the applications and
databases 36
The Range of Database Applications

1. Personal databases
2. Workgroup databases
3. Departmental/divisional databases
4. Enterprise database

37
38
Figure 1-6
Typical data
from a
personal
database

39
Figure 1-7 Workgroup database with wireless
local area network

40
Enterprise Database Applications

Enterprise Resource Planning (ERP)


Integrate all enterprise functions (manufacturing,
finance, sales, marketing, inventory, accounting,
human resources)
Data Warehouse
Integrated decision support system derived from
various operational databases

41
Figure 1-8 An enterprise data warehouse

42
Information Engineering

A data-oriented methodology to create and


maintain information systems
Top-down planninga generic IS planning
methodology for obtaining a broad understanding
of the IS needed by the entire organization
Four steps to Top-Down planning:
Planning
Analysis
Design
Implementation
43
Information Systems Planning

Purposealign information technology


with organizations business strategies
Three steps:
1. Identify strategic planning factors
2. Identify corporate planning objects
3. Develop enterprise model

44
Identify Strategic Planning Factors

Organization goalswhat we hope to


accomplish
Critical success factorswhat MUST work
in order for us to survive
Problem areasweaknesses we now have

45
Identify Corporate Planning Objects

1. Organizational unitsdepartments
2. Organizational locations
3. Business functionsgroups of
business processes
4. Entity typesthe things we are
trying to model for the database
5. Information systemsapplication
programs
46
Develop Enterprise Model

Functional decomposition
Iterative process breaking system description
into finer and finer detail
Enterprise data model

Planning matrixes
Describe interrelationships
between planning objects

47
Figure 2-2 Example of process decomposition of an
order fulfillment function (Pine Valley Furniture)

Decomposition = breaking
large tasks into smaller tasks
in a hierarchical structure
chart

48
Planning

Describe relationships between planning


objects in the organization
Types of matrixes:
Function-to-data entity
Location-to-function
Unit-to-function
IS-to-data entity
Supporting function-to-data entity
IS-to-business objective
49
Two Approaches to Database and IS Development

SDLC
System Development Life Cycle
Detailed, well-planned development process
Time-consuming, but comprehensive
Long development cycle
Prototyping
Rapid application development (RAD)
Cursory attempt at conceptual data modeling
Define database during development of initial prototype
Repeat implementation and maintenance activities with
new prototype versions
50
Systems Development Life Cycle
(see also Figures 2.4, 2.5)
Planning

Analysis

Logical Design

Physical Design

Implementation

Maintenance

51
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning
Planning Purposepreliminary understanding
Deliverablerequest for study
Analysis

Logical Design

Physical Design

Database activity Implementation


enterprise modeling and
early conceptual data
Maintenance
modeling

52
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning Purposethorough requirements analysis and
structuring
Deliverablefunctional system specifications
Analysis
Analysis

Logical Design

Physical Design

Database activityThorough Implementation


and integrated conceptual
data modeling
Maintenance

53
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning Purposeinformation requirements elicitation
and structure
Deliverabledetailed design specifications
Analysis

Logical Design
Logical Design

Physical Design

Database activity Implementation


logical database design
(transactions, forms,
Maintenance
displays, views, data
integrity and security)
54
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning Purposedevelop technology and
organizational specifications
Analysis Deliverableprogram/data
structures, technology purchases,
organization redesigns
Logical Design

Physical Design
Physical Design

Database activity Implementation


physical database design (define
database to DBMS, physical
Maintenance
data organization, database
processing programs)
55
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning Purposeprogramming, testing, training,
installation, documenting
Deliverableoperational programs,
Analysis
documentation, training materials

Logical Design

Physical Design

Database activity
database implementation, Implementation
Implementation
including coded programs,
documentation, Maintenance
installation and conversion
56
Systems Development Life Cycle
(see also Figures 2.4, 2.5) (cont.)
Planning Purposemonitor, repair, enhance
Deliverableperiodic audits
Analysis

Logical Design

Physical Design

Database activity
database maintenance, Implementation
performance analysis
and tuning, error Maintenance
Maintenance
corrections
57
Prototyping Database Methodology
(Figure 2.6)

58
Prototyping Database Methodology
(Figure 2.6) (cont.)

59
Prototyping Database Methodology
(Figure 2.6) (cont.)

60
Prototyping Database Methodology
(Figure 2.6) (cont.)

61
Prototyping Database Methodology
(Figure 2.6) (cont.)

62
CASE

Computer-Aided Software Engineering (CASE)


software tools providing automated support for
systems development
Three database features:
Data modelingdrawing entity-relationship
diagrams
Code generationSQL code for table creation
Repositoriesknowledge base of enterprise
information
63
Packaged Data Models

Model components that can be purchased,


customized, and assembled into full-scale data
models
Advantages
Reduced development time
Higher model quality and reliability
Two types:
Universal data models
Industry-specific data models

64
Managing Projects

Projecta planned undertaking of related activities to


reach an objective that has a beginning and an end
Involves use of review points for:
Validation of satisfactory progress
Step back from detail to overall view
Renew commitment of stakeholders
Incremental commitmentreview of systems
development project after each development phase
with rejustification after each phase

65
Managing Projects: People Involved

Business analysts
Systems analysts
Database analysts and data modelers
Users
Programmers
Database architects
Data administrators
Project managers
Other technical experts
66
Figure 2-7 Three-schema architecture

Different people
have different
views of the
databasethese
are the external
schema

The internal
schema is the
underlying
design and
implementation

67
Figure 2-8 Developing the three-tiered architecture

68
Figure 2-9 Three-tiered client/server database architecture

69
DATABASE MANAGEMENT SYSTEMS (DBMS I)

SQL Data Definition Language (DDL) :


The Data Definition Language (DDL) is part of SQL that permits
database & tables to be created, dropped & altered.
The most important DDL statements in SQL are:
A- Table commands are as follows:
1. CREATE DATABASE COMMAND - creates a new database
2. DROP DATABASE COMMAND - deletes a database
A- Table commands are as follows:
1. CREATE TABLE COMMAND - creates a new database table
2. ALTER TABLE COMMAND - alters (changes) a database table
3. DROP TABLE COMMAND - deletes a database table
DATABASE MANAGEMENT SYSTEMS (DBMS I)

SQL Data Manipulation Language (DML) :


The Data Manipulation Language (DML) is part of SQL that
permits data to be inserted ,updated ,deleted and displayed
in to a table.
The most important DML statements in SQL are:
DML commands are as follows:
1. SELECT - extracts data from a database table
2. UPDATE - updates data in a database table
3. DELETE - deletes data from a database table
4. INSERT INTO - inserts new data into a database table

You might also like