1. Database System
Today we will learn:
Some common uses of database systems
The characteristics of file-based systems
The problem with the file-based approach
The meaning of the term ‘Database’
The meaning of the term Database Management System’ (DBMS)
The typical functions of DBMS
The major components of the DBMS environment
The advantages and disadvantages of DBMSs
3. Database Systems
Purchase from the U-mart
Cash withdrawal from ATM (of The Bank of Punjab, Fowara Chowk, Gujrat)
Purchase using your credit card
Registration at NADRA office
Using the internet
University of Gujrat Information System (UOGIS)
6. Database Systems
The Limitations of the file-based approach
Separation and isolation of data
Duplicate of data
Data dependence
Incompatible file formats
7. Database Systems
Fine
Books Issued
Father Name
Name
Reg_Number
Library
Grade
Semester
Class
Address
Name
Reg_Number
Examination
Class
Address
Phone
Father Name
Name
Reg_Number
Registration
8. Database Systems
-A software system that enables users to define, create, and
maintain the database and that provides controlled access to this
database.
A database management system (DBMS) is computer software that
manages databases.
Examples: Oracle, SQL Server, Informix, Sybase, Ingress
10. Database Systems
-Shared collection of logically related data (and a description of
this data), designed to meet the information needs of an
organization.
11. Database Systems
Shared collection – can be used simultaneously by many departments and
users.
Logically related - comprises the important objects and the relationships
between these objects.
Description of the data – the system catalog (meta-data) provides
description of data.
12. Database Systems
Database A collection of related files
^
File A collection of records about a particular set of people, objects, entities and so on
^
Record A collection of related fields associated with a single person, object, entity and so on
^
Field A collection of bytes representing a single attribute.
^
Byte A collection of bits representing a single character
^
Bit A binary digit
13. Database Systems
A database is a collection of integrated
files.
Integrated : Collection of files.
Note: A FILE is a collection of logical records in a tabular format.
A RECORD contains fields (or attributes ) about the entity.
A field is same as an ‘attribute’
14. Advantages of Database Approach
RegistrationExamination
Library
Applications
Library
Examination
Applications
Registration
Applications
Database
Management
System
University
Students
Database
- Data Sharing - Data Independence
- Controlled Redundancy - Better Data Integrity
15. Database Systems
Data Sharing
Data Independence
Controlled Redundancy
Better data Integrity
Data consistency
Better data security
Faster development of new applications
Economy of scale
Better concurrency
Better backup procedures
19. DatabaseAdministrator (DBA)
A person who has central control over data
and programs that access this data
Instructor: Ikram. Database Systems. CS-212
20. Functions of DBA
Create Database
Creating Users
Granting Roles & Privileges
Routine Maintenance
Backups
Monitoring disk space
Monitoring jobs running
Instructor: Ikram. Database Systems. CS-212
21. Database
DBMS
“How” to get
Application Programs
“What” to get
End users
interact
Application
Programmers
Database
Administrators
Database
Designers
develop
maintain
design
Software
Users
Data
22. Each user should be able to access the same data, but have a different
customized view of data. Each user should be able to change the way he or
she views the data, and this change should not affect other users.
User should not have to deal directly with physical database storage
details.
The internal structure of the database should be unaffected by the
changes to the physical aspects of storage, such as change over to a new
storage devices.
23. External Level
Conceptual / Logical Level
Internal Level
Physical Data
Organization
View 1 View 2 View n
Conceptual
Schema
Internal
Schema
Database
User 1 User 2 User n
Ext/Con Mapping
Con/Int Mapping
3-Level Architecture
24. This Level Describes-The Part of Database that is
relevant to each user e.g. Registration,Accounts etc
Calculated Data:That is not actually stored in the
database but is created when needed e.g. age
DBMS uses external views to create users interface for
different users which is both the facility and barrier.
External Schema are evolves as user needs are
modified over time
25. First Name: Rana
Last Name: Aslam
Date of Birth:
12 Sep, 1970
Name: R. Aslam
Age: 24y,10d
Dept: Sales
Saleem
Saleema
Corresponds to different views of Data
External Level
26. Entire information structure of the database.
Also called “The Community view of data”
All entities, attributes and their relationships are represented.
Representing data and constraints on data
Contains information about the security and integrity
information
Relatively constant: designed with the present as well as future
needs of an organization.
27. Name DoB DepId
Rana Aslam 12/09/70 D001
Marya Wasti 29/02/80 D005
First Name: Rana
Last Name: Aslam
Date of Birth:
12 Sep, 1970
Name: R. Aslam
Age: 24y,10d
Dept: Sales
Saleem
Saleema
Conceptual / Logical View
Describes all entities their attributes their relationships with constraints
28. Although these are at same level but
PhysicalView
▪ Actual Data (on the disk) binary format.
▪ Use OS to store the Data
InternalView
▪ Internal Record: a single stored record
▪ Does not just contain what we see at the conceptual
level
29. Name DoB Deps DepId
Rana Aslam 12/09/70 5 D001
Marya Wasti 29/02/80 0 D005
First Name: Rana
Last Name: Aslam
Date of Birth:
12 Sep, 1970
Name: R. Aslam
Age: 24y,10d
Dept: Sales
Saleem
Saleema
01110011010011100101001010100101010010101…..
BH RH Rana Aslam 120970 5 D001 RH Marya Wasti…
Contains stored Data (Record)
Internal View
30. External / Conceptual mapping
(correspondence between external level and
conceptual level)
Conceptual / Internal
(correspondence between and conceptual level
and internal level)
31. Specifies mapping between objects in the
external view to those in the logical model
External to logical model
32. Specifies mapping between objects in the
logical model to those in the physical model-
data independence
Logical to Physical
33.
34. Very Important Feature
Data independence is major most outcome of 3-L Arch
The immunity of applications to change in storage
structure and access strategy
35. Changes in lower level do not affect the upper
levels
Mind the direction please
36. Logical Data Independence
Physical Data Independence
37. Changes in conceptual model do not affect the
external views
Immunity of external level from changes at
conceptual level
38. Adding a new file etc.
Adding a new field in a file
Changing type/size
Deleting an attribute
39. Changes in the internal model do not affect the
conceptual model
Immunity of Conceptual level from changes at
Internal level