Lecturer: Humaira Abdul Ghafoor: Lec 1 (Week 1) Sep, 2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Lec 1 (week 1) Lecturer: Humaira abdul

Sep , 2021
Ghafoor
Contact Information
2

 Instructor: Humaira Abdul Ghafoor


Department of SE
University of Sialkot

 Contact: humaira.abdulghafoor@uskt.edu.pk
3 Recommended Books
1) Jeffery A. Hoffer, V. Ramesh, Heikki
Topi, “Modern Database
Management”, tenth edition

2) Rob, Peter, Coronal, Carlos, Database


Systems Design, Implementation and
Management, Seventh Edition, ISBN 1-
4188-3593-5.
4 COURSE CONTENT

 Database Management  Normalization


System (DBMS)  Relational model
 Predominant File based  Relational algebra
Systems  Data access queries
 Entity-Relation model
 Introduction to SQL
5

 Data:
“A collection of raw facts and figures”
 Data consists of multi form, text, image, audio, video, graphics etc.
 It is collected in different domains of life, e.g. during admission process
UOG gets Data of students.

 Information:
 “Information is an organized and processed form of data”
 Information is more meaningful than Data and it helps in decision
making problems.
Input and Output of a System
6

Data Processing Information


Data Vs Information
7

Data Information
1) Data consists of unprocessed raw facts. 1) Processed form of data.
2) It is difficult or even impossible to 2) It is easier to reproduce in case of lost.
reproduce if lost. 3) Information is meaningful.
3) Data is less meaningful. 4) It is dependent on Data.
4) Data is an independent entity. 5) Information is much important for
5) It is not used in decision-making. decision making.
6) Data is asset of Organization and is 6) Information is normally available to
not available to people for sale. people for sale.
File-Based Systems
8

 A collection of un-related files and a collection of


application programs that perform services for the
end-users, such as the production of reports.
 Each program defines and manages its own data
(e.g. reports).
 Filling cabinet, electronic spreadsheets were used
for storing and managing data.
File-Based Processing
9
Challenges in Manual Filling
10

 What flats do you have for rent within three miles of


the city center?
 What is the average rent for a two-bedroom flat?
 What is the total annual bill for staff?
 How does last month’s turnover compare with the
projected figure for this month?
 What is the expected monthly turnover for the next
financial year?
Flaws in File-based Systems
11

 Separation and isolation of data


 Each program maintains its own set of data.
 Users of one program may be unaware of potentially
useful data held by other programs.

 Redundancy
 Same data is held by different programs.
 Wasted space and potentially different values and/or
different formats for the same item.
Cont.
12

 Data dependence
 File structure is defined in the program code.

 Incompatible file formats


 Programs are written in different languages, and so cannot
easily access each other’s files.

 Fixed Queries/Proliferation of application


programs
 Programs are written to satisfy particular functions.
 Any new requirement needs a new program.
Database Approach
13

 Arose because:
 Definition of data was embedded in application
programs, rather than being stored separately and
independently.
 No control over access and manipulation of data
beyond that imposed by application programs.

 Result:
 The database and Database Management System
(DBMS).
Database
14

 Database is an organized collection of related data


that is stored in an efficient and compact manner.
 A database is a collection of inter-related records
with minimum of data redundancy.
 Collection of related data items that are being
stored for record-keeping & analysis.
 Could be stored on cards, file cabinet, computer, …
Example of Database
15

First Name Last Name Address City Age

Mickey Mouse 123 Fantasy Paradise 23


way

Bat Man 321 Cavern Rascal 40


Ave

Wonder Woman 987 Truth way Hairball 28


Database Approach
16

 Data definition language (DDL).


 Permits specification of data types, structures and any data
constraints.
 All specifications are stored in the database.

 Data manipulation language (DML).


 General enquiry facility (query language) of the data.
Database Approach
17

 Controlled access to database may include:


a security system
 an integrity system

 a concurrency control system

 a recovery control system

 a user-accessible catalog.
Example
18

 Banking System:

Mr. Ali at ATM: withdraw Rs1000 from account# 55

 Get balance from database


 If balance > 1000 then
 Balance := balance –1000
 Dispense cash
 Put new balance into database
Meta-data
19

Data about Data.


Name Type Length Max Min Description

Sidra Character 11 11 11 Student ID

cid Character 8 8 8 Course ID

Section Integer 1 9 1 Section


number
Year Integer 4 2100 1980 Year
Completed
Grade Character 1 1 1 Alpha
Grades
(A,B,C,D)
Views
20

 Allows each user to have his or her own view of


the database.

 A view is essentially some subset of the database.


Views-Benefits
21

 Reduce complexity.
 Provide a level of security.
 Provide a mechanism to customize the appearance
of the database.
 Present a consistent, unchanging picture of the
structure of the database, even if the underlying
database is changed.
Database Management System
22
(DBMS)
“A collection of programs used to create and maintain
Database”

 Provides the facility to define the structure of


database. User can specify data types, format and
constraints for the Data to be stored.
 Provides to store data on some storage media.
 Provides to insert, delete, update, retrieve Data.
Components of DBMS Environment
23
Components of DBMS Environment
24
Components of DBMS Environment
25

 Hardware
 Can range from a PC to a network of computers.
 Software
 DBMS, operating system, network software (if
necessary) and also the application programs.
 Data
 Used by the organization and a description of this data
called the schema.
Cont.
26

 Procedures
 Instructionsand rules that should be applied to the
design and use of the database and DBMS.
 People
Relationship of Application Program
27
& DBMS

User

User Interface

Application Program

DBMS

Database
Types of Database
28

 Single User (Personal Computer) Database


 Multi-user (Workgroup) Databases
 Department Databases
 Enterprise Databases
Roles in the Database Environment
29

 Data Administrator (DA)


 Database Administrator (DBA)
 Database Designers (Logical and Physical)
 Application Programmers
 End Users (naive and sophisticated)
History of Database Systems
30

 First-generation
 Hierarchical and Network

 Second generation
 Relational

 Third generation
 Object Relational
 Object-Oriented
Advantages of DBMS
31

 Control of data redundancy


 Data consistency
 More information from the same amount of data
 Sharing of data
 Improved data integrity
 Improved security
 Enforcement of standards
 Economy of scale
Disadvantages
32

 Complexity
 Size
 Cost of DBMS
 Additional hardware costs
 Cost of conversion
 Performance
 Higher impact of a failure
For any query Feel Free to ask
33

You might also like