0% found this document useful (0 votes)
16 views75 pages

DBMS Lec No 1,2

Uploaded by

itsmshariq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views75 pages

DBMS Lec No 1,2

Uploaded by

itsmshariq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

Course - Data Base

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:

► Talking with others which causes disturbance

► Eating /drinking in class

► Can’t leave class without permission

► Can’t use mobile phone in class during class hours

*
Data Base

► Credit Hours: 3+1 Course Code: CS-320


► Pre-Requisite: Data Structures and Algorithms
► Objective:
► The course aims to introduce basic database concepts, different
data models, data storage and retrieval techniques and database
design techniques. It primarily focuses on relational data model
and DBMS concepts.

*
Recommended Books

►Database Systems: A Practical Approach to


Design, Implementation and Management,
R.Connolly and P.Begg, Addison-Wesley Pub.
Co (2003) 6th Edition.

►Fundamentals of Database Systems, 3/E,


Elmasri and Navathe, Addison-Wesley, ISBN:
0-201-74153-9.
*
Importance of Course

*
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

A database is a self-describing collection of integrated records

*
Database Def-3

A database models a particular real world system in the computer in the


form of data

*
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

A collection of programs that perform services


for the end-users such as production of reports

*
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

Program and Data Interdependence


*
File Processing Systems

Library Examination Registration


Reg_Number Reg_Number Reg_Number

Name Name Name

Father Name Address Father Name

Books Issued Class Phone

Fine Semester Address

Grade Class

Duplication of Data
Vulnerable to Inconsistency
*
From File Systems to DBMS

► Problems with File Processing systems


► Inconsistent Data
► Inflexibility
► Limited Data Sharing
► Poor enforcement of standards
► Excessive program maintenance

*
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

► Web indexes ► Train timetables


► Library catalogues ► Airline bookings
► Medical records ► Credit card details
► Bank accounts ► Student records
► Stock control ► Customer histories
► Personnel systems ► Stock market prices
► Product catalogues ► Discussion boards
► Telephone ► and so on…
directories
Database Systems

► A database system ► Database systems


consists of allow users to
► Data (the ► Store
database)
► Update
► Software
► Retrieve
► Hardware
► Organise
► Users
► Protect
► We focus mainly their data.
on the software
Advantages of Database Approach

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

► Database Management System -- DBMS


► Software system used to define, create, maintain and
provide controlled access to the database and repository

*
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

► Characteristics of files or relations


► name, content, notes, etc.
► Reading Reference:
https://www.geeksforgeeks.org/what-is-meta-data-in-data-wareho
using/
*
Meta Data Types

► File metadata: This includes information about a file, such


as its name, size, type, and creation date.
► Image metadata: This includes information about an image,
such as its resolution, color depth, and camera settings.
► Music metadata: This includes information about a piece of
music, such as its title, artist, album, and genre.
► Video metadata: This includes information about a video,
such as its length, resolution, and frame rate.
► Document metadata: This includes information about a
document, such as its author, title, and creation date.
► Database metadata: This includes information about a
database, such as its structure, tables, and fields.
► Web metadata: This includes information about a web
page, such as its title, keywords, and description.

*
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

► More difficult recovery

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

Reposit DBMS Datab


ory ase

*
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

► End users ► Database Administrator


► Use the database system
(DBA)
to achieve some goal ► Designs & manages the
database system
► Application developers
⬥ Schema definition
► Write software to allow
end users to interface with ⬥ Granting data access
the database system
⬥ Routine Maintenance
⬥ Backups
⬥ Monitoring disk space
⬥ Monitoring jobs running

► 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

► (2) DBMS types


► Relational, Hierarchic, Network, Object-Oriented,
Object-Relational

*
Models (1)

Application Application Application Application


1
External 2
External 3
External 4
External
Model Model Model Model
Application
1
Conceptual
requirements
Application
2
Conceptual Internal
requirements
Conceptual Logical Model
Application Model Model
3
Conceptual
requirements
Application
4
Conceptual
requirements

*
Data Models(2): History

► Hierarchical Model (1960’s and 1970’s)


► Similar to data structures in programming languages.

Books
(id, title)

Authors
Publisher Subjects
(first, last)

*
Data Models(2): History

► Network Model (1970’s)


► Provides for single entries of data and navigational “links”
through chains of data.

Authors

Subjects Books

Publishers

*
Data Models(2): History

► Relational Model (1980’s)


► Provides a conceptually simple model for data as relations
(typically considered “tables”) with all data visible.

*
Data Models(2): History

► Object Oriented Data Model (1990’s)


► Encapsulates data and operations as “Objects”

Books
(id, title)

Authors
Publisher Subjects
(first, last)

*
Data Models(2): History

► Object-Relational Model (1990’s)


► Combines the well-known properties of the Relational
Model with such OO features as:
► User-defined datatypes
► User-defined functions
► Inheritance and sub-classing

*
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

► Convert existing data sets and applications to use the


new database
► May need programs, conversion utilities to convert old
data to new formats.

*
Integration

► Overlaps with Phase 3


► Integration of converted applications and new
applications into the new database

*
Operations

► All applications run full-scale


► Privacy, security, access control must be in place.
► Recovery and Backup procedures must be established
and used

*
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

Application Programs Application


Programmers
develop
“What” to get

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

• In this lecture we discussed the advantages


and disadvantages of data base management
system

• We also discusses with examples about data,


information and data base model and system

73
Summary

► In this lecture course outline ,


Grading policy , importance
and definitions are discussed in
introductory class.

*
*

You might also like