DATABASE
Prepare by: M.Robeel
Data and
information
3/9/2020Gulab Devi Educational Complex Lahore
2
Data and Information
 Data is a collection of unprocessed items, which
can include text, numbers, images, audio, and
video. Information conveys meaning and is useful
to people.
 for example, computers process several data items
to print information in the form of a cash register
receipt.
 Computers process data into information.
3/9/2020Gulab Devi Educational Complex Lahore
3
Data and Information
3/9/2020Gulab Devi Educational Complex Lahore
4
Database
3/9/2020Gulab Devi Educational Complex Lahore
5
Database
 Database is an organized collection of related
data. The word organized means that data is store
in such a way that user can store, manipulate and
retrieve data easily. The word related means that
database is normally created to store data about a
particular topic. For example , if you create a
database for students, it will contain the data about
students such as Roll No, name, address and other
information about the students
Database
management
system (DBMS)
3/9/2020Gulab Devi Educational Complex Lahore
7
database management
system (DBMS)
With database software, often called a database
management system (DBMS), users create a
computerized database; add, modify, and delete data
in the database; sort and retrieve data from the
database; and create forms and reports from the data
in the database.
Data Integrity
 Most organizations realize that data is one of their
more valuable assets — because data is used to
generate information. Many business transactions
take less time when employees have instant access
to information. To ensure that data is accessible on
demand, an organization must manage and protect
its data just as it would any other resource. Thus, it
is vital that the data has integrity and is kept secure.
The Hierarchy of Data
 Data is organized in layers. In the computer
profession, data is classified in a hierarchy. Each
higher level of data consists of one or more items
from the lower level. For example, a student has an
address, and an address consists of letters and
numbers. Depending on the application and the user,
different terms describe the various levels of the
hierarchy.
The Hierarchy of Data
Fields
 A field name uniquely identifies each field. When
searching for data in a database, you often specify
the field name. Field names for the data in the
Instructor file are Instructor ID, First Name, Last
Name, Extension, Office, and Web Address.
a field
Records
 A record is a group of related fields. For example, a
student record includes a set of fields about one
student.
a record
primary key
 A primary key is a field that uniquely identifies each
record in a file. The data in a primary key is unique
to a specific record. For example, the Customer ID
field uniquely identifies each Customer because no
two Customer can have the same Customer ID.
primary key field
Files
 A data file is a collection of related records stored on
a storage medium such as a hard disk or optical
disc. A Student file at a school might consist of
thousands of individual student records. Each
student record in the file contains the same fields.
Each field, however, contains different data.
Table
 “A table is the primary unit of physical storage for
data in a database.”1 Usually a database contains
more than one table.
A Database with Multiple
Tables
Publishers Books Customers
Authors Inventory Orders
Maintaining Data
 File maintenance refers to the procedures that keep
data current. File maintenance procedures include
adding records to, modifying records in, and deleting
records from a file.
CRUD
 Create new tables and records
 Retrieve record from tables
 Update table definition and record
data
 Delete existing tables and record
File Processing VS
Databases
3/9/2020Gulab Devi Educational Complex Lahore
25
File Processing
 In the past, many organizations exclusively used
file processing systems to store and manage data.
In a typical file processing system, each
department or area within an organization has its
own set of files. The records in one file may not
relate to the records in any other file.
Disadvantages
 Data Redundancy
 Data Inconsistency
 Difficult in accessing Data
 Data Security
 Privacy
 Sharing of Data
 Backup and Recovery
Data Redundancy
 Data Redundancy — Each department or area in an
organization has its own files in a file processing
system. Thus, the same fields are stored in multiple
files. If a file processing system is used at a school,
for example, the Student file and the Student
Schedule file both might store the same students’
names and addresses. Duplicating data in this
manner wastes resources such as storage space and
people’s time. When new students are added or
student data is modified, file maintenance tasks
consume additional time because people must
Difficult in accessing Data
 Often it is difficult to access data stored in separate
files in different departments. Sharing data from
multiple, separate files is a complicated procedure
and usually requires the experience of a computer
programmer.
Data inconsistency
 Data inconsistency is a condition that occurs
between files when similar data is kept in different
formats in two different files. As a result of the
data inconsistency, these files duplicate some
data such as addresses and names,
compromising data integrity.
Data Security, Privacy,
Sharing of Data
 Data Security
is another issue of file systems that create problems
to secure Data.
 Privacy
Privacy is another issue of file systems that create
problems to protect Data from unauthorized access.
 Sharing of Data
in file system sharing of data is not easy because
multiples files have duplicate data and some file have
different data.
Backup and Recovery
 Backup and recovery is also difficult in file system
because Multiples file have same data.
Database Advantages
 Reduced Data Redundancy — Most data items are
stored in only one file, which greatly reduces
duplicate data. demonstrates the differences
between how a file processing application and a
database application might store data.
 Improved Data Integrity — When users modify
data in the database, they make changes to one file
instead of multiple files. Thus, the database
approach increases the data’s integrity by reducing
the possibility of introducing inconsistencies.

Databases
Advantages
3/9/2020Gulab Devi Educational Complex Lahore
34
Database Advantages
 Shared Data — The data in a database environment
belongs to and is shared, usually over a network, by
the entire organization. Organizations that use
databases typically have security settings to define
who can access, add, modify, and delete the data in
a database.
 Easier Access — The database approach allows
nontechnical users to access and maintain data,
providing they have the necessary privileges.
 Reduced Development Time — It often is easier
and faster to develop programs that use the
Data Dictionary
 A data dictionary contains data about each file in
the database and each field within those files. For
each file, it stores details such as the file name,
description, the file’s relationship to other files, and
the number of records in the file.
Data Dictionary
Database models
 A data model consists of rules and standards that
define how the database organizes data. A data
model defines how users view the organization of
the data. It does not define how the operating
system actually arranges the data on the disk. Three
popular data models in use today are relational,
object-oriented, and multidimensional.
Relational Databases Model
 Data are organized into two dimensional tables.
 Tables are related to each other.
 It is the most common model being used today.
Object-Oriented Database
(OODB) Model
 An object-oriented database (OODB) stores data
in objects. An object is an item that contains data,
as well as the actions that read or process the data.
A Student object, for example, might contain data
about a student such as Student ID, First Name,
Last Name, Address, and so on. It also could contain
instructions about how to print a student transcript or
the formula required to calculate a student’s grade
point average. Object-oriented databases have
several advantages compared with relational
databases: they can store more types of data,
Multidimensional Databases
 A multidimensional database stores data in
dimensions. Whereas a relational database is a two-
dimensional table, a multidimensional database can
store more than two dimensions of data. These
multiple dimensions allow users to access and
analyze any view of the database data.

Ch # 09 database management system

  • 1.
  • 2.
    Data and information 3/9/2020Gulab DeviEducational Complex Lahore 2
  • 3.
    Data and Information Data is a collection of unprocessed items, which can include text, numbers, images, audio, and video. Information conveys meaning and is useful to people.  for example, computers process several data items to print information in the form of a cash register receipt.  Computers process data into information. 3/9/2020Gulab Devi Educational Complex Lahore 3
  • 4.
    Data and Information 3/9/2020GulabDevi Educational Complex Lahore 4
  • 5.
  • 6.
    Database  Database isan organized collection of related data. The word organized means that data is store in such a way that user can store, manipulate and retrieve data easily. The word related means that database is normally created to store data about a particular topic. For example , if you create a database for students, it will contain the data about students such as Roll No, name, address and other information about the students
  • 7.
  • 8.
    database management system (DBMS) Withdatabase software, often called a database management system (DBMS), users create a computerized database; add, modify, and delete data in the database; sort and retrieve data from the database; and create forms and reports from the data in the database.
  • 9.
    Data Integrity  Mostorganizations realize that data is one of their more valuable assets — because data is used to generate information. Many business transactions take less time when employees have instant access to information. To ensure that data is accessible on demand, an organization must manage and protect its data just as it would any other resource. Thus, it is vital that the data has integrity and is kept secure.
  • 10.
    The Hierarchy ofData  Data is organized in layers. In the computer profession, data is classified in a hierarchy. Each higher level of data consists of one or more items from the lower level. For example, a student has an address, and an address consists of letters and numbers. Depending on the application and the user, different terms describe the various levels of the hierarchy.
  • 11.
  • 12.
    Fields  A fieldname uniquely identifies each field. When searching for data in a database, you often specify the field name. Field names for the data in the Instructor file are Instructor ID, First Name, Last Name, Extension, Office, and Web Address. a field
  • 13.
    Records  A recordis a group of related fields. For example, a student record includes a set of fields about one student. a record
  • 14.
    primary key  Aprimary key is a field that uniquely identifies each record in a file. The data in a primary key is unique to a specific record. For example, the Customer ID field uniquely identifies each Customer because no two Customer can have the same Customer ID. primary key field
  • 15.
    Files  A datafile is a collection of related records stored on a storage medium such as a hard disk or optical disc. A Student file at a school might consist of thousands of individual student records. Each student record in the file contains the same fields. Each field, however, contains different data.
  • 16.
    Table  “A tableis the primary unit of physical storage for data in a database.”1 Usually a database contains more than one table.
  • 17.
    A Database withMultiple Tables Publishers Books Customers Authors Inventory Orders
  • 18.
    Maintaining Data  Filemaintenance refers to the procedures that keep data current. File maintenance procedures include adding records to, modifying records in, and deleting records from a file.
  • 19.
    CRUD  Create newtables and records  Retrieve record from tables  Update table definition and record data  Delete existing tables and record
  • 25.
    File Processing VS Databases 3/9/2020GulabDevi Educational Complex Lahore 25
  • 26.
    File Processing  Inthe past, many organizations exclusively used file processing systems to store and manage data. In a typical file processing system, each department or area within an organization has its own set of files. The records in one file may not relate to the records in any other file.
  • 27.
    Disadvantages  Data Redundancy Data Inconsistency  Difficult in accessing Data  Data Security  Privacy  Sharing of Data  Backup and Recovery
  • 28.
    Data Redundancy  DataRedundancy — Each department or area in an organization has its own files in a file processing system. Thus, the same fields are stored in multiple files. If a file processing system is used at a school, for example, the Student file and the Student Schedule file both might store the same students’ names and addresses. Duplicating data in this manner wastes resources such as storage space and people’s time. When new students are added or student data is modified, file maintenance tasks consume additional time because people must
  • 29.
    Difficult in accessingData  Often it is difficult to access data stored in separate files in different departments. Sharing data from multiple, separate files is a complicated procedure and usually requires the experience of a computer programmer.
  • 30.
    Data inconsistency  Datainconsistency is a condition that occurs between files when similar data is kept in different formats in two different files. As a result of the data inconsistency, these files duplicate some data such as addresses and names, compromising data integrity.
  • 31.
    Data Security, Privacy, Sharingof Data  Data Security is another issue of file systems that create problems to secure Data.  Privacy Privacy is another issue of file systems that create problems to protect Data from unauthorized access.  Sharing of Data in file system sharing of data is not easy because multiples files have duplicate data and some file have different data.
  • 32.
    Backup and Recovery Backup and recovery is also difficult in file system because Multiples file have same data.
  • 33.
    Database Advantages  ReducedData Redundancy — Most data items are stored in only one file, which greatly reduces duplicate data. demonstrates the differences between how a file processing application and a database application might store data.  Improved Data Integrity — When users modify data in the database, they make changes to one file instead of multiple files. Thus, the database approach increases the data’s integrity by reducing the possibility of introducing inconsistencies. 
  • 34.
  • 35.
    Database Advantages  SharedData — The data in a database environment belongs to and is shared, usually over a network, by the entire organization. Organizations that use databases typically have security settings to define who can access, add, modify, and delete the data in a database.  Easier Access — The database approach allows nontechnical users to access and maintain data, providing they have the necessary privileges.  Reduced Development Time — It often is easier and faster to develop programs that use the
  • 36.
    Data Dictionary  Adata dictionary contains data about each file in the database and each field within those files. For each file, it stores details such as the file name, description, the file’s relationship to other files, and the number of records in the file.
  • 37.
  • 38.
    Database models  Adata model consists of rules and standards that define how the database organizes data. A data model defines how users view the organization of the data. It does not define how the operating system actually arranges the data on the disk. Three popular data models in use today are relational, object-oriented, and multidimensional.
  • 39.
    Relational Databases Model Data are organized into two dimensional tables.  Tables are related to each other.  It is the most common model being used today.
  • 40.
    Object-Oriented Database (OODB) Model An object-oriented database (OODB) stores data in objects. An object is an item that contains data, as well as the actions that read or process the data. A Student object, for example, might contain data about a student such as Student ID, First Name, Last Name, Address, and so on. It also could contain instructions about how to print a student transcript or the formula required to calculate a student’s grade point average. Object-oriented databases have several advantages compared with relational databases: they can store more types of data,
  • 41.
    Multidimensional Databases  Amultidimensional database stores data in dimensions. Whereas a relational database is a two- dimensional table, a multidimensional database can store more than two dimensions of data. These multiple dimensions allow users to access and analyze any view of the database data.