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

CH-1 (I) Introduction To DBMS

Hi

Uploaded by

yashiwas derso
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

CH-1 (I) Introduction To DBMS

Hi

Uploaded by

yashiwas derso
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Chapter 1: Introduction

Database System Concepts, 6th Ed.


©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Database Management System (DBMS)
 Data is a raw fact about peoples, objects, events, etc and which
need to be processed. It is unorganized set of information.

 Database is a collection of related files that are usually integrated,


linked or cross-referenced to one another. The advantage of a
database is that data and records contained in different files can
be easily organized and retrieved using specialized database
management software called a database management system
(DBMS) or database manager.

 A database management system is a set of software programs


that allows users to create, edit and update data in database files,
and store and retrieve data from those database files. Data in a
database can be added, deleted, changed, sorted or searched all
using a DBMS.

Database System Concepts - 6th Edition 1.2 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
 Generally DBMS contains information about a particular enterprise
 Collection of interrelated data
 Set of programs that provide a way to store and retrieve the
data that is both convenient and efficient to use

1.1 Database Applications:


Database is used widely. Some representative applications are
 Banking: For customer information, accounts, loans, and
banking transactions
 Airlines: for reservations and schedules information.
 Universities: for student information, course registration,
grades in additions to enterprise information such as human
resource and accounting.

Database System Concepts - 6th Edition 1.3 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
1.1 Database Applications(cont…)
 Sales: customers, products, purchases information
 Online retailers: online order tracking, customized
recommendations and maintain online product evaluations
 Manufacturing: for managing supply chain and tracking
production items in factories, inventory of items in warehouse,
orders.
 Human resources: for information about employee, salaries,
tax deductions
 Telecommunications for keeping of records of calls made,
generating monthly bills, storing information about
communication networks.
 Hospitals for maintaining records of patient

Database System Concepts - 6th Edition 1.4 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
1.1 Database Applications(cont…)
 Digital Libraries for management and delivery of large textual
and multimedia data.
 E-commerce- integration of heterogeneous information
sources for business activity such as online shopping, booking
of holiday, consulting doctors
 Databases can be very large. it touch all aspects of our lives

 Goals of DBMS
 Storing and retrieving data efficiently and effectively
 To ensure security and avoid the problem
 Concurrency control

Database System Concepts - 6th Edition 1.5 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
 Function of DBMS
 Defining:- specifying data types, structures and constraints for
the data
 Constructing:- process of storing data itself on some storage
medium
 Manipulating:- querying database to retrieve specific data and
updating database.
 Sharing:- allow multiple user and program to access database
concurrently.
 Protection:- protect system against software and hardware
failures and also provide security protection against malicious
user/access.
 Maintaining:- should allow database to evolve as requirements
change over time.
Database System Concepts - 6th Edition 1.6 ©Silberschatz, Korth and Sudarshan
1.2 Purpose of Database System
Drawbacks of using file systems to store data
 Data redundancy and inconsistency
 Multiple file formats, duplication of information in different
files
 Difficulty in accessing data
 Need to write a new program to carry out each new task
 Data isolation — multiple files and formats made writing new
application program to retrieve data.
 Integrity problems
 Integrity constraints (e.g., account balance > 0) become
“buried” in program code rather than being stated explicitly
 Hard to add new constraints or change existing ones

Database System Concepts - 6th Edition 1.7 ©Silberschatz, Korth and Sudarshan
(Cont.)

 Atomicity of updates - Failures may leave database in an


inconsistent state with partial updates carried out
 Example: Transfer of funds from one account to another
should either complete or not happen at all
 Concurrent access by multiple users
 Concurrent access needed for performance and
Uncontrolled concurrent accesses can lead to
inconsistencies
– Example: Two people reading a balance (say 100) and
updating it by withdrawing money (say 50 each) at the
same time
 Security problems - Hard to provide user access to some, but
not all, data
Database systems offer solutions to all the above problems
Database System Concepts - 6th Edition 1.8 ©Silberschatz, Korth and Sudarshan
1.3 View Of Data
 The major propose of database system is to provide users with an
abstract view of the data just by hiding certain details of how the
data are stored and maintained.

1.3.1 Levels of Abstraction


 Physical level: lowest level of abstraction which describes how a
record (e.g., customer) is actually stored.
 Describes complex low level data structures in detail.
 Logical level: describes what data are stored in database, and the
relationships exist among the data.
type instructor = record
ID : string; name : string;
dept_name : string; salary : integer;
end;
Database System Concepts - 6th Edition 1.9 ©Silberschatz, Korth and Sudarshan
View of Data
 View level: highest level of abstraction and application programs hide
details of data types. Views can also hide information (such as an
employee’s salary) for security purposes. Simplify the interaction of user and
the system during data manipulation

An architecture for a database system


Database System Concepts - 6th Edition 1.10 ©Silberschatz, Korth and Sudarshan
1.3.2 Instances and Schemas
 Similar to types and variables in programming languages
 Schema – the overall design and the logical structure of the
database
 Example: The database consists of information about a set of
customers and accounts and the relationship between them
 Analogous to type information of a variable in a program
 Physical schema: database design at the physical level
 Logical schema: database design at the logical level and its
important as its effect on the application because
programmers construct applications by using this schema.

Database System Concepts - 6th Edition 1.11 ©Silberschatz, Korth and Sudarshan
Cont ….
 Instance – the actual content of the database at a particular point
in time
 Analogous to the value of a variable
 Physical Data Independence
 The ability to modify the physical schema without changing the
logical schema
 Applications depend on the logical schema
 In general, the interfaces between the various levels and
components should be well defined so that changes in some
parts do not seriously influence others.

Database System Concepts - 6th Edition 1.12 ©Silberschatz, Korth and Sudarshan
1.3.3 Data Models
 A collection of conceptual tools for describing
 Data, Data relationships
 Data semantics and Data constraints
1) Relational model
 Use a collection of tables to represent both data and the
relationship among those data.
 An example of record based model in which the database is
structured in fixed format records of several types.
2) Entity-Relationship model (mainly for database design)
 Use a collection of basic objects, called entity and relationship
among these objects.
 Entity is a real world object that is distinguishable from other
objects.
 Entity set is a collection of entity.
Database System Concepts - 6th Edition 1.13 ©Silberschatz, Korth and Sudarshan
Cont….
3) Object-based data models (Object-oriented and Object-relational)
 Object-oriented data model is seen as extending of E-R model
with the notions of encapsulation, method and object identity.
 Object-Relation model combines the concept of object oriented
and relational data model.
4) Semi-structured data model (XML)
 Permits the specification of data where individual data items of
the same type may have different sets of attributes.
5) Other older models: tied closely to the underlying implementation
and complicated task of modeling.
 Network model
 Hierarchical model

Database System Concepts - 6th Edition 1.14 ©Silberschatz, Korth and Sudarshan
Relational Model
 Relational model (Chapter 2)
Columns
 Example of tabular data in the relational model

Rows

Database System Concepts - 6th Edition 1.15 ©Silberschatz, Korth and Sudarshan
Database Design?
 Is there any problem with this design?

 Normalization Theory (Chapter 8)


 Formalize what designs are bad, and test for them

Database System Concepts - 6th Edition 1.20 ©Silberschatz, Korth and Sudarshan
The Entity-Relationship Model
 Models an enterprise as a collection of entities and relationships
 Entity: a “thing” or “object” in the enterprise that is
distinguishable from other objects (person, bank accounts)
and Described by a set of attributes.
 Entity set: a set of all entities of the same type
 Relationship: an association among several entities
 Represented diagrammatically by an entity-relationship diagram:

What happened to dept_name of instructor and student?

Database System Concepts - 6th Edition 1.21 ©Silberschatz, Korth and Sudarshan
1.6 Storage Management
 Storage manager is a program module that provides the interface
between the low-level data stored in the database and the
application programs and queries submitted to the system.
 The storage manager is responsible to the following tasks:
 Interaction with the file manager
 Efficient storing, retrieving and updating of data
 Issues:
 Storage access
 File organization
 Indexing and hashing

Database System Concepts - 6th Edition 1.24 ©Silberschatz, Korth and Sudarshan
1.7 DBMS Architecture
1) Physical DBMS Architecture
 Defines the software components used to process and enter data,
and how these software components are related and
interconnected.

Database System Concepts - 6th Edition 1.25 ©Silberschatz, Korth and Sudarshan
Cont ….
ELEMENTS OF A DATABASE MANAGEMENT SYSTEM
 The major components of a DBMS are explained below:
 DML Precompiled: It converts DML statement embedded in an
application program to normal procedure calls in the host language.
 DDL Compiler: The DDL compiler converts the data definition
statements into a set of tables.
 File Manager: Manages the allocation of space on disk storage and the
data structure used to represent information stored on disk.
 Database Manager: Convert user's queries coming directly via the
query processor or indirectly via an application program from the user's
logical view to the physical file system. Also performs the tasks of
enforcing constraints to maintain the consistency and integrity of the data
as well as its security.

Database System Concepts - 6th Edition 1.26 ©Silberschatz, Korth and Sudarshan
Cont ….
ELEMENTS OF A DATABASE MANAGEMENT SYSTEM
 Query Processor: used to interpret the online user's query and
convert it into an efficient series of operations in a form capable of
being sent to the data manager for execution. It uses the data
dictionary to find the structure of the relevant portion of the
database and uses this information in modifying the query and
preparing an optimal plan to access the database.
 Database Administrator: Responsible for overall management of
data resources in an organization including maintaining corporate
wide data definitions and standards.
 Data Dictionary: Keeping a track of all the available names that
are used and the purpose for which they were used becomes
more and more difficult.

Database System Concepts - 6th Edition 1.27 ©Silberschatz, Korth and Sudarshan
Database System Internals

Database System Concepts - 6th Edition 1.28 ©Silberschatz, Korth and Sudarshan
1.7 Database Users and Administrators
 There are four different types of database-system users,
differentiated by the way they expect to interact with the system:
 DBA (Database Administrator): is responsible for authorizing to
access the database, to monitoring its use and for acquiring
software and hardware resources as needed.
 Generally DBA are do the following tasks:
 Schema definitions
 Storage structure and access method definitions
 Schema and physical organization modifications
 Granting authorization for data access
 Routine maintainance( regularly backing up database,
ensure enough free disk space)

Database System Concepts - 6th Edition 1.29 ©Silberschatz, Korth and Sudarshan
Cont…
 Database Designer: responsible to select appropriate structure
for represent and  store the data. Before select the
structure ,Designer will meet all the database users and find out all
the requirements which they want to fulfill. After collect all the
requirement it comes with their design and structure and this work
is completed before database implementation.
 End Users: These are:
 1) Casual Users:  These are the users who communicate with
the database for little period of  time. They are occasionally
used the database. So these are the temporary users.
 2) Parametric Or Naive Users: These are the users who
communicate with the database for a regular period. Their main
job is to constantly querying and updating the database using 
standard  queries

Database System Concepts - 6th Edition 1.30 ©Silberschatz, Korth and Sudarshan
Cont…
 3) Sophisticated End Users: These are engineers, scientists,
business analysts who are familiarize with the database and
when they want to use the database, they used it regularly and
when they don’t want then they are temporally used .
 4)Stand alone users: These are the users who maintain their
personal database using ready made software which is
available in the market easily and provide the menu based
interface through which they can easily used the database.
 System Analysts and Application Programmers: System analysts
find out the  requirements of parametric end users and develop all
the analysis for canned transaction through which they can meet
all the requirements of parametric users. Application programmers
implement these analysis as  programs. These are especially
Software engineers.

Database System Concepts - 6th Edition 1.31 ©Silberschatz, Korth and Sudarshan
End of Chapter 1

Database System Concepts - 6th Edition 1.32 ©Silberschatz, Korth and Sudarshan

You might also like