DBMS Lec No 1,2
DBMS Lec No 1,2
r e # 0 1 , 2
Lec t u
*
Introduction to
Database Systems
*
GRADING STRUCTURE
EXAMS %
Course Project -
ASSIGNMENTS(4) 5
QUIZZES(4) 5
► ATTENDENCE 80%EXAM
MID TERM IS MANDATORY FOR FINAL EXAM
25
FINAL EXAM 40
*
CLASS RULES
► NOT ALLOWED:
*
Data Base
*
Recommended Books
*
Lecture Introduction
► Database Definition
► Comparison with the prior Data Processing
approach
► Pros & Cons of Databases
► Data base Environment
*
What is a Database
*
Database Def-1
A database is a shared collection of logically related data that is stored to
meet the requirements of different users of an organization
*
Database Def-2
*
Database Def-3
*
The concept of a shared organizational database
Manageme Marketing
nt
Product
Planning Control Sales
Developme
nt
Corporat
e
Database
Accounting Manufacturi
ng
Accounts Accounts
Receivable Payable Scheduling Production
*
A bit of History
► Computer initially used for computational/ engineering purposes
► Commercial applications introduced File Processing System
*
Why DBMS?
► History
► 50’s and 60’s all applications were custom built for particular needs
► File based
► Many similar/duplicative applications dealing with collections of business data
► Early DBMS were extensions of programming languages
► 1970 - E.F. Codd and the Relational Model
► 1979 - Ashton-Tate & first Microcomputer DBMS
*
File Processing System
*
File Based Systems
Application File
Delivery Addres
List ses Toys
Coal
Estimatio Naught
n y
Just
what Nice Toys
asked for
*
File Processing Systems
Examinatio Registratio
Library
n n
Registratio
Library Examination n
Applications Applications Application
s
Examinati
Library Registrati
on
Data on
Data
Files Data
Files
Files
Grade Class
Duplication of Data
Vulnerable to Inconsistency
*
From File Systems to DBMS
*
Files and Databases
► File: A collection of records or documents
dealing with one organization, person, area or
subject. (Rowley)
► Manual (paper) files
► Computer files
► Database: A collection of similar records with
relationships between the records. (Rowley)
► bibliographic, statistical, business data, images, etc.
*
► Database
A Database is a collection of stored operational data used by the application
systems of some particular enterprise.
► Paper “Databases”
► Still contain a large portion of the world’s knowledge
► File-Based Data Processing Systems
► Early batch processing of (primarily) business data
► Database Management Systems (DBMS)
*
Databases
Examinatio Registratio
Library
n
Examinatio n
Registratio
Library
n n
Application
Application Application
s
s s
Database
Management
System
- Data Sharing
- Controlled Redundancy Universit - Data Independence
y
Students - Better Data Integrity
Database
*
Terms and Concepts
*
Terms and Concepts
► Repository
► Data Dictionary
► The place where all metadata for a particular database is
stored
► may also include information on relationships between
files or tables in a particular database
*
Data Dictionary
*
Terms and Concepts
► Metadata
► Data about data
► In DBMS means all of the characteristics describing
the attributes of an entity,
► name of attribute
► data type of attribute
► size of the attribute
► format or special characteristics
*
Meta Data Example
A photo
*
Advantages of DB
• Minimal Data Redundancy
• Data Integrity. Data integrity means data is
consistent and accurate in the database. ...
• Data Security. Data security is a vital concept in a
database. ...
• Ease of Application Development
• Better data integration. ...
• Minimized Data Inconsistency. ...
• Faster Data Access. ...
• Better decision making. ...
• Simplicity. ...
• Recovery and Backup.
• Data Sharing
• Reduced Program Maintenance 32
also provide
⬥ Balancing of conflicting requirements
⬥ Faster development of new applications
⬥ Better data accessibility
o Better control concurrency
o Better backup and recovery procedures
33
Disadvantages
► Higher costs
► Conversion cost
34
Terms and Concepts
► Data Independence
► Physical representation and location of data
and the use of that data are separated
► The application doesn’t need to know how or where the database has stored the data, but
just how to ask for it.
► Moving a database from one DBMS to another should not have a material effect on
application program
► Recoding, adding fields, etc. in the database should not affect applications
*
Database Environment
Applicati
CASE User on
Tools Interface Program
s
*
Database Components
DBMS
==============
=
Design tools
Table Creation
Form Creation
Query Creation
Report Creation Applicati
Procedural on
Datab language Program
ase compiler
============
s
=
Database Run time
Form processor
User
contains:
Query processor Interface
User’s Data
Metadata
Report Writer Applicatio
Language Run ns
Indexes time
Application
Metadata *
Types of Database Systems
► PC Databases
► Centralized Database
► Client/Server Databases
► Distributed Databases
► Database Models
*
PC Databases
E.G.
Acces
s
FoxPr
o
Dbase
Etc.
*
Centralized Databases
Cental
Computer
*
Client Server Databases
Clien
t
Clien
t Network
Databa
se
Server
Clien *
t
Distributed Databases
Location
Location B
C
comput
comput er
er
comput Homogeneo
er us
Databases
Location
*
A
Distributed Databases
Heterogeneo Clien
us t Remote
Comp.
Or Federated
Databases
Databa
se Local Network
Server
Clien
t Com
m
ServeRemote
Comp.
r
*
Terms and Concepts
► Database Application
► An application program (or set of related programs) that is
used to perform a series of database activities:
► Create
► Read
► Update
► Delete
► On behalf of database users
*
Range of Database
Applications
► PC databases
► Usually for individual
► Work-Group databases
► Small group use where everyone has
access to the database over a LAN
► Departmental databases
► Larger than a workgroup – but similar
► Enterprises databases
► For the entire organization over an
intranet (or sometimes the internet)
*
Terms and Concepts
► Database activities:
► Create
► Add new data to the database
► Read
► Read current data from the database
► Update
► Update or modify current database data
► Delete
► Remove current data from the database
*
Terms and Concepts
► Enterprise
► Organization
► Entity
► Person, Place, Thing, Event, Concept...
► Attributes
► Data elements (facts) about some entity
► Also sometimes called fields or items or domains
► Data values
► instances of a particular attribute for a particular
entity
*
Terms and Concepts
► Records
► The set of values for all attributes of a particular entity
► “tuples” or “rows” in relational DBMS
► File
► Collection of records
► AKA “Relation” or “Table” in relational DBMS
*
Terms and Concepts
► Key
► an attribute or set of attributes used to identify or locate
records in a file
► Primary Key
► an attribute or set of attributes that uniquely identifies
each record in a file
*
Levels of Data
► Real-world data
► Metadata
► Data Occurrence
► Database Users
► Application Programmers
► End Users
► Naïve
► Sophisticated
50
Terms and Concepts
► DA
► Data adminstrator - person responsible
for the Data Administration function in
an organization
► Sometimes may be the CIO -- Chief
Information Officer
► DBA
► Database Administrator - person
responsible for the Database
Administration Function
*
Terms and Concepts
► Data Administration
► Responsibility for the overall management of
data resources within an organization
► Database Administration
► Responsibility for physical database design and
technical issues in database management
► Data Steward/agent
► Responsibility for some subset of the
organization’s data, and all of the interactions
(applications, user access, etc.) for that data
*
Database Users
► Database systems
programmer
► Writes the database
software itself
Database Users
► Database Administrator (DBA)
▪ A person who has central control over data and
programs that access this data
54
Database Models
55
Terms and Concepts
► Models
► (1) Levels or views of the Database
► Conceptual, logical, physical
*
Models (1)
*
Data Models(2): History
Books
(id, title)
Authors
Publisher Subjects
(first, last)
*
Data Models(2): History
Authors
Subjects Books
Publishers
*
Data Models(2): History
*
Data Models(2): History
Books
(id, title)
Authors
Publisher Subjects
(first, last)
*
Data Models(2): History
*
Database System Physica
Life Cycle
l
Creatio
n
2
Design Conversion
1 3
Growth,
Change, & Integratio
Maintenan n
ce
4
6
Operatio
ns
5
*
Design
► Determination of the needs of the
organization
► Development of the Conceptual Model
of the database
► Typically using Entity-Relationship
diagramming techniques
► Construction of a Data Dictionary
► Development of the Logical Model
*
Physical Creation
► Development of the Physical Model of the
Database
► data formats and types
► determination of indexes, etc.
► Load a prototype database and test
► Determine and implement security, privacy
and access controls
► Determine and implement integrity
constraints
*
Conversion
*
Integration
*
Operations
*
Growth, Change &
Maintenance
► Change is a way of life
► Applications, data requirements, reports, etc. will all
change as new needs and requirements are found
► The Database and applications and will need to be
modified to meet the needs of changes
*
Another View of the Life
Cycle
Integration
4 Operations
5
Design
Physical 1
Creation Conversio
Growth,
2 n
Change
3
6
*
Data, Database, Data Model and DBMS
End users
Software interact
DBMS Database
maintain Administrators
“How” to get
Data
design Database
Database Designers
Users
71
KEY POINTS
► Data and Information
► Database Management system (DBMS)
► Data: Facts concerning things, such as people,
objects, or events
► Information: Data that have been processed
and presented in a form suitable for human
interpretation
► DBMS: A software that is responsible for
applying the authorisation checks and
validation procedures
72
SUMMARY
73
Summary
*
*