0% found this document useful (0 votes)
3 views

ch01_dbs

Chapter 1 introduces database systems, differentiating between data and information, and emphasizes the importance of accurate information for decision-making. It covers basic file terminology, the limitations of file systems, and the advantages of using a Database Management System (DBMS). The chapter also outlines the roles of different database users and the implications of adopting a database approach.

Uploaded by

dearest.tinu
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)
3 views

ch01_dbs

Chapter 1 introduces database systems, differentiating between data and information, and emphasizes the importance of accurate information for decision-making. It covers basic file terminology, the limitations of file systems, and the advantages of using a Database Management System (DBMS). The chapter also outlines the roles of different database users and the implications of adopting a database approach.

Uploaded by

dearest.tinu
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/ 49

Chapter 1

Introduction to Database
and its users

Database systems : Elmasri (Seventh Edition)

Copyright © 2004 Pearson Education, Inc.


Data vs Information

⚫ Data
− Raw facts
− Unprocessed facts
⚫ Information
− Output of processing raw data
− Useful facts

Slide 1-2
Data vs Information

Slide 1-3
Points to remember

⚫ Data is the building block of information


⚫ Information is produced after processing
data
⚫ Accurate, timely and relevant information is
key for good decision making
⚫ Good decision making is the key to
organizational growth in global environment

Slide 1-4
⚫ Files ??
− A data file is a computer file which stores data
to use by a computer application or computer
system
− Contains information used as input, or written
as output by some other software program

Slide 1-5
Basic File Terminology
⚫ Data : raw facts e.g. 13, ‘abc’
⚫ Field: Used to define and store data
− Represents a characteristic of individual/entity
e.g. name, rollnumber
⚫ Record
− Logical collections of fields that describes a
person/thing/place etc.. E.g.
(1,’mohan’,’maths(h))
⚫ File
− Collection of related records
Slide 1-6
Writing and reading from a File using
#include <fstream.h>
#include <string.h> a programming language
struct customer { char name [51] ; float balance ; };

int main ( )
{customer savac;
strcpy(savac.name, "Tina Marshall") ; // copy value to structure
savac.balance = 21310.75 ; // variable savac
ofstream fout ;
fout.open("Saving", ios :: out | ios :: binary) ; // open output file
if(!fout) { cout << "File can't be opened \n" ; return 1; }
fout.write((char *) & savac, sizeof(customer)) ; // write to file
fout.close() ; // close connection
ifstream fin ; // read it back now
fin.open("Saving", ios :: out | ios :: binary) ; // open input file
fin.read((char *) & savac, sizeof(customer)) ; // read structure
cout << savac.name ; // display structure now
cout << "has the balance amount of Rs." << savac.balance << "\n" ;
fin.close( );
}

Slide 1-7
Slide 1-8
File System ??
⚫ A file system is an abstraction to update,
store and retrieve a collection of files.
⚫ Windows supports three major file systems
which are file allocation table (FAT), file
allocation table 32 (FAT32), and new
technology file system (NTFS).
⚫ Ubuntu uses ext2fs, ext3, ext4 (from v 11.0
onwards) filesystem

6th edition Slide 1-9


⚫ File system manages all text/data files
stored on secondary storage devices.
⚫ Can not group files on the basis of
application usage
⚫ Only differentiate among files (sometimes
using extensions pdf, binary, executable,
word file etc…)

6th edition Slide 1-10


Limitations of File system for data
management
⚫ Needs extensive programming
⚫ No adhoc queries permitted
⚫ Complex and difficult system administration
⚫ Difficult to make changes in existing
structures
⚫ Inadequate security features

Slide 1-11
Types of Databases and Database
Applications
⚫ Numeric and Textual Databases
⚫ Multimedia Databases
⚫ Geographic Information Systems (GIS)
⚫ Data Warehouses
⚫ Real-time and Active Databases

6th edition Slide 1-12


Basic Definitions

⚫ Data: Known facts that can be recorded and have


an implicit meaning
⚫ Database: A collection of related and self-describing
data.
⚫ Represents Mini-world/ Universe of Discourse
(UoD): Some part of the real world about which data
is stored For example, student grades and
transcripts at a university.
⚫ A database is designed, built, and populated with
data for a specific purpose. It has an intended group
of users and some preconceived applications in
which these users are interested.
6th edition Slide 1-13
Definitions..

⚫ Database Management System (DBMS): A


software package/ system to facilitate the creation
and maintenance of a computerized database.
− It is a general purpose software that facilitates the
process of defining, constructing and manipulating DB
for applications.
⚫ Database System: The DBMS software together
with the data itself. Sometimes, the applications are
also included.

Slide 1-14
DBMS Environment

Slide 1-15
FIGURE:
A simplified
database
system
environment.

Slide 1-16
FS vs DBS

Slide 1-17
Typical DBMS Functionality

⚫ Define a database : in terms of data types,


structure of records and constraints
⚫ Construct or Load the Database on a
secondary storage medium
⚫ Manipulating the database : querying,
generating reports, insertions, deletions
and updating its content
⚫ Concurrent Processing and Sharing :
accessible to a set of users and programs,
yet, keeping all data valid and consistent
Slide 1-18
Typical DBMS Functionality

Other features:
− Protection or Security measures to prevent
unauthorized access
− “Active” processing to take internal actions on
data based on ECA (Event-condition-action) rules
(Possible use of active database is in alerting,
security monitoring, statistics gathering and
authorization.)
− Presentation and Visualization of data

Slide 1-19
Example of a Database
(with a Conceptual Data Model)

⚫ Mini-world for the example: Part of a


UNIVERSITY environment.
⚫ Some mini-world entities:
− STUDENTs
− COURSEs
− SECTIONs (of COURSEs)
− (academic) DEPARTMENTs
− INSTRUCTORs

Slide 1-20
FIGURE 1.2a
A database that stores student and course information.

Slide 1-21
FIGURE 1.2b
A table showing section of a course being taught by an
instructor.

Slide 1-22
FIGURE 1.2c
Tables showing grade report and prerequisites of a course.

Slide 1-23
FIGURE 1.3
Internal storage format for a STUDENT record.

Slide 1-24
FIGURE 1.4
Two views derived from the database in Figure 1.2 (a)
The STUDENT TRANSCRIPT view. (b) The COURSE
PREREQUISITES view.

Slide 1-25
Main Characteristics of the Database
Approach
⚫ Self-describing nature of a database system:
⚫ A DBMS catalog stores the description (meta-data) of
the database.
⚫ Allows the DBMS software to work with different
databases.
⚫ Insulation between programs and data:
⚫ To provide program-data independence.
⚫ Allows changing data storage structures and
operations without having to change the DBMS access
programs.

Slide 1-26
Characteristics Contd..
⚫ Data Abstraction:
⚫ Data hiding thru a data model
⚫ A database model shows the logical structure of a
database, including the relationships and constraints
that determine how data can be stored and
accessed.
⚫ A data model is used to hide storage details and
present the users with a conceptual view of the
database
⚫ Support of multiple views of the data:
⚫ To provide user a different view of the database as
per his/her interest.

Slide 1-27
Characteristics Contd..
⚫Sharing of data and multiuser transaction
processing
− allows a set of concurrent users to retrieve and to
update the database in on-line time (OLTP).
− Concurrency control within the DBMS guarantees
that each transaction is correctly executed or
completely aborted.
Database Users

⚫ Two Categories of Users:


− Those who actually use and control the content
(called “Actors on the Scene”)
− Those who enable the database to be
developed and the DBMS software to be
designed and implemented (called “Workers
Behind the Scene”).

Slide 1-29
Database Users
Actors on the scene
− Database administrators: responsible for:
− authorizing access to the database
− coordinating and monitoring its use
− acquiring software, and hardware resources
− controlling its use
− monitoring efficiency of operations.
− Database Designers: responsible for
− defining the content of DB and its structure
− write the constraints to maintain data correctness
− decide functions or transactions against the database
concerning efficient data retrieval
− communicate with the end-users and understand their needs.
− End-users: who
− use the data for queries, reports
− may sometimes update the database content
− System Analyst and Programmers Slide 1-30
Categories of End-users
⚫ Casual : access database occasionally when
needed
– Use queries
⚫ Naïve or Parametric :
− a large section of the end-user population.
− use previously well-defined functions in the form of
“canned transactions” against the database.
− Examples are bank-tellers or reservation clerks or
sale staff who do this activity for an entire shift of
operations.
− Use GUI/form based application

Slide 1-31
Categories of End-users (contd..)
⚫ Sophisticated :
– include business analysts, scientists, engineers, others
thoroughly familiar with the system capabilities; have
Knowledge of DBMS working
– Many use tools in the form of software packages that
work closely with the stored database.
⚫ Stand-alone :
− mostly maintain personal databases using ready-to-use
packaged applications.
− An example is a tax program user that creates his or
her own internal database. (e.g. Tally)
− Customized software

Slide 1-32
Workers behind the scene

⚫ DBMS designers and implementers


⚫ Tool Developers for building tools for
facilitating DB design, system performance
monitoring, different user interfaces etc.
⚫ Operators and maintenance personnel

Slide 1-33
Advantages of Using the Database
Approach
⚫ Controlling redundancy in data storage and
minimizing efforts in development and
maintenance.
⚫ Sharing of data among multiple users.
⚫ Restricting unauthorized access to data.
⚫ Providing persistent storage for program
Objects
⚫ Providing Storage Structures for efficient
Query Processing

Slide 1-34
Advantages of Using the Database
Approach
⚫ Providing backup and recovery services.
⚫ Providing multiple interfaces to different
classes of users.
⚫ Representing complex relationships among
data.
⚫ Enforcing integrity constraints on the database.
⚫ Drawing Inferences and Actions using rules

Slide 1-35
Additional Implications of Using the
Database Approach
⚫ Potential for enforcing standards: crucial
for the success of database applications.
Standards refer to data item names, display
formats, screens, report structures, meta-data
(description of data) etc.
⚫ Reduced application development time:
Reduced incremental time to add each new
application

Slide 1-36
Additional Implications of Using the
Database Approach
⚫ Flexibility to change data structures:
database structure may evolve as new
requirements are defined.
⚫ Availability of up-to-date information: very
important for on-line transaction systems such
as airline, hotel, car reservations.
⚫ Economies of scale:
wasteful overlap of resources and personnel can
be avoided by consolidating data and
applications across departments

Slide 1-37
Software packages using DB as backend

CRM: Customer records management


ERP: Enterprise resource planning
Include modules for handling different departments and their
functional requirements for any organization

IR: information retrieval


⚫ Used to manage library related articles
⚫ To support keyword searching and handling of free form text
processing
⚫ Ranking and classification of documents
When not to use a DBMS
⚫ Main inhibitors (costs) of using a DBMS:
− High initial investment and possible need for
additional hardware.
− Overhead for providing generality, security,
concurrency control, recovery, and integrity
functions.
− Vendor dependence
− Maintaining currency.

6th edition Slide 1-45


⚫ When a DBMS may be unnecessary:
− If the database and applications are simple, well
defined, and not expected to change.
− If there are stringent real-time requirements that
may not be met because of DBMS overhead.
− If access to data by multiple users is not required

Slide 1-46
When not to use a DBMS

⚫ When no DBMS may suffice:


− If the database system is not able to handle the
complexity of data because of modeling
limitations e.g. GIS, complex heterogeneous
data structures
− If the database users need special operations
not supported by the DBMS.
− Real time operations

6th edition Slide 1-47


Classification of DBMS

⚫ Criteria used for DBMS classification


− Data Model
i. Relational ii. object oriented iii. object-relational
etc..
− Number of users
i. Single user ii. Multi-users
− Number of sites over which DB is distributed
i. Centralized
ii. Distributed

Slide 1-48
Contd..

– Distributed Database Management Systems


a. Homogeneous
b. Heterogeneous (Federated DBMS)
– Cost
– Expected type and extent of its use
i. Operational DB : day to day activities
ii. Data warehouses: for storing data to generate
information for making tactical or strategic
decisions

Slide 1-49
Contd..

− Structure of data
⚫ Structured : Well defined structure
− A student record
⚫ Unstructured or semi structured data
− E.g. A text, document
− XML (Extensible Markup Language)

Slide 1-50
Types of DBMS (Example)

Slide 1-51
System Catalog and Data Dictionary

⚫ Data Dictionary: Gives detailed descriptions


of tables in database
− Contains metadata about data
⚫ System catalog: Generated by DBMS to
maintain all objects used in DB and
Includes :
− Table name, its creator, date, data type
− Access privileges, authorized users.
− Storage location, size of table
Slide 1-52
⚫ System catalog is the superset of data
dictionary.
⚫ System catalog is generated by DBMS and
data dictionary for DB Designer is created
from it.
⚫ Data dictionary is called as DB Designer’s
Database and is created to ensure that all
members of database design and
implementation teams use the same table
and attribute names, and follow same rules.

Slide 1-53
Example for Data Dictionary

Slide 1-54
Slide 1-55

You might also like