Você está na página 1de 26

Today Goals

 What is a Database?
 File and Types
 Data Access Methods
 Database Management System
 Advantages / Disadvantages of DBMS
 Database Access Types
 Database Models
 Features of Database

Institute of Space Technology


What is a Database?

Institute of Space Technology


Data v.s Information
 Data - simple facts about people, objects, and events,
etc.
 Information - “Derived” data from processing the facts
that is useful to us.
 What’s the problem we are facing today?

Data exist everywhere, but they may not be useable


or retrievable.
 We need to know how to capture data, and how to
organize them into computer!!

Institute of Space Technology


What is a Database?
 Database is a collection of data
 data is known facts with implicit meaning
 database is logically organized collection of related
data designed, built and populated for a specific
purpose.

Examples:
 Student Information System
 Library System
 Medical System
 Etc.

Institute of Space Technology


Database Storage Hierarchy

Type of data Contains Example


Database Several Files Personal
Database
File Several Name1
Records Name2
Record Several Fields Aamir Habib,
IST, Islamabad
Highway near
Toll Plaza, Isb

Field Characters First Name:


(bytes) Aamir
Characters Bits (0,1) Letter S
1110 0010

Key Field: ID Number, Customer Account No, etc


File And Types

Institute of Space Technology


Files And Types
 File is a collection of data or information that is treated as a unit by the computer.

 File has a name and an extension

 Two major type of Files:

 Program Files – containing Software instruction


 Source Files
 Executable Files
 Data Files – contain Data
 .txt
 .xls
 .ppt
 .mdb

Institute of Space Technology


Files And Types
 Two Types of Data Files:

 Master File – containing relatively


permanent records that are updated
periodically e.g address file of students

 Transaction File – temporary holding file


that holds all the changes to be made to
the master file: addition, deletions,
revisions e.g new names and address to
be added.

Institute of Space Technology


Data Access Methods

Institute of Space Technology


Data Access Methods
 Sequential Access – data is stored and retrieved in a
sequence. Like Tape Storage.

 Direct Access – data is stored and accessed directly.


Data is accessed according to a unique identifier that
maps on to the address of the record.

Like CD Player, Hard Disk, etc.

Ideal for applications like

Airline Reservation Systems,

Computer based Telephone Directory

Institute of Space Technology


Database Management
System

Institute of Space Technology


Database Management
System
 Database Management System is
 Collection of programs which support creation and
maintenance of database
 That set up and controls the structure of database
and access the Data
 Program that are used to define, construct, maintain
and manipulate data in a database.

Examples:
 Oracle , SQL Server, FoxPro, MS Access, etc.

Institute of Space Technology


Advantages of DBMS
 Sharing a Data
 Control of Redundancy
 Data Integrity
 Better Data Security
 Backup and Recovery
 Multiple Views of Data
 Faster Application Development

Institute of Space Technology


Disadvantages of DBMS
 High Cost of DBMS
 High Cost of Hardware
 Higher Programming Cost
 Skilled Manpower required
 Etc.

Institute of Space Technology


Database Access Types
 Individual DB – collection of integrated files used by
one person.
 Multi User DB a Shared DB – is shared by users in an
organization.
 Distributed DB – collection of integrated files stored in
different computers. DNS

 Public DB – compilation of data available for all the users.


e.g. PTCL directory available online.

Institute of Space Technology


Data Management Interface
Tools

 Creating tables
 Viewing records
 Sorting records
 Creating queries
 Generating reports
Steps for Creating Fields
 Name the field
 Specify the field type
 Specify the field size
Types of Fields
 Text
 Numeric
 Date or time
 Logical
 Binary
 Counter
 Memo
Database Models

Institute of Space Technology


Database Models
 A Database Model is a collection of
concepts for describing data.
 Hierarchical Database
 Network Database
 Relational Database
 Object Oriented Database
 A Relational data model is the most
widely used data model today
Institute of Space Technology
Hierarchical Database
Student

Tree Structure
representing a student
record Name Address CNIC Course GPA

First Last Middle Course A Course B Course C


Name Name Name

Exam 1 Exam 2 Exam Grade


Grade Exam 1 Exam 2 Exam 3 Grade
Network Database
Relational Databases
Features of a Database

Institute of Space Technology


OO Database
 Uses objects
 Data

 Instructions

 OO Database is a multimedia database where more type of data


can be stored e.g. a student OO Database
 Data

 Photograph

 Sound bite

 Short piece of video

 Grades

 Personal data

 Operations

 Examples FastObjects, eXcelon, Objectware, Gemstone


 A hypertext database (web database) –Cold Fusion
 Object-Relational or enhanced-relational – Oracle 8,9,10, DB2
Features of a Database
 Data dictionary – describes files and fields of data
 Utilities – Programs that allow you to maintain the database by
creating, editing and deleting data, records and files.
 Report Generator – Program for producing a printed document from
the database.
 Access Security – Specifies user access privileges
 Data Recovery – Enables contents of database to be recovered after
system failure.
 Mirroring : two copies in different locations
 Reprocessing: redoing the processing from a known past point
 Roll forward: a variant on reprocessing-Forward Recovery-
transactions or not reentered.
 Rollback: Backward recovery- undo unwanted changes

Institute of Space Technology