0% found this document useful (0 votes)
2 views65 pages

Final - Ch1 Database System Concepts

This document provides an overview of database systems, focusing on the importance and advantages of Database Management Systems (DBMS) over traditional file processing systems. It explains key concepts such as data, databases, RDBMS, and various database languages, along with their functions and components. Additionally, it discusses the structure of DBMS, data abstraction, and the differences between DBMS and RDBMS, highlighting the applications and benefits of using database systems in various fields.

Uploaded by

sogamradhika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views65 pages

Final - Ch1 Database System Concepts

This document provides an overview of database systems, focusing on the importance and advantages of Database Management Systems (DBMS) over traditional file processing systems. It explains key concepts such as data, databases, RDBMS, and various database languages, along with their functions and components. Additionally, it discusses the structure of DBMS, data abstraction, and the differences between DBMS and RDBMS, highlighting the applications and benefits of using database systems in various fields.

Uploaded by

sogamradhika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 65

CHAPTER :1 DATABASE

SYSTEM CONCEPT
Specific objective
• State the importance of DBMS effectiveness
and database tools
• State the advantages of using database
system to store operational data.
• Explain the concept of RDBMS
• Describe the overall structure of DBMS &
Architecture of Client/Server system.
• Explain the concept of data mining and data
warehousing
An introduction to database
• Data
• Database
• DBMS
• Disadvantages of file processing
system
• Advantages of DBMS over file
processing system
• Application of database.
What is Data ?

• Data can be facts related to any object in


consideration.
• User input is known as data.
• Data is a collection of facts, such as
numbers, words, measurements,
observations or even just descriptions of
things.
• Example :- Name, age, height, weight etc.
What is Database?
• A database is a systematic collection of data. It
support storage & manipulation of data.

•A database is an organized collection of data.


The data is typically organized to model aspects
of reality in a way that supports processes
requiring information.
•Example:-
1. An online telephone numbers, other contact
details etc.
2. Facebook it needs to store, manipulate &
present data related to members, their
friends, member activities, messages etc.
What is DBMS?
• DBMS is a collection of
interrelated data & set of
programs to access the data.

• DataBase Management
Systems (DBMS) are computer
software applications that interact
with the user, other applications,
and the database itself to capture
and analyze data.
What is DBMS?
• DBMS is a collection of programs which enables
its users to access database, manipulate data,
reporting or representation of data. It also helps
to control access to the database.
• The primary goal of a DBMS is to provide
a way to store & retrieve database
information that both convenient &
efficient.
• Another important feature of DBMS is security.
The data stored can be confidential & important
for the further developments.
• Example:- MySql, FoxPro etc.
DBMS Functions:-
1. Data Definition:-
• DBMS provides functions to define the structure
of the data in the application.
• These include
Disadvantages of file
processing system
• Before knowing the disadvantage of file
processing we should know what is file
processing

• A file processing system is a collection of


files and programs that access/modify these
files. Typically, new files and programs are
added over time (by different programmers)
as new information needs to be stored and
new ways to access information are needed.
Disadvantages of file processing
system, Advantages of DBMS over
file processing system
• Problems with file processing systems:
• data redundancy and inconsistency
• difficulty of accessing data
• Atomicity problems - ensuring that a system failure
during a database update does not leave the database in
an inconsistent state
• Security problems
a) Not all users should have access to all data
b) Example: bank payroll personnel shouldn’t know my
checking account balance
c) Difficult to enforce security in an ad hoc system
• Integrity problems
a) Data may need to satisfy certain
conditions, called consistency constraints
b) Example: account balances should
never fall below $0
c) Difficult to enforce/add/change
consistency constraints in a file
processing system
Advantage of DBMS over
File Processing
• Sharing of the data
• Reduction in Redundancy
• Avoiding Inconsistency
• Transaction support
• Maintaining Integrity
• Enforcement of security
• Balancing conflicting requirements
• Enforcing standards
Application of database
• BANKING
• AIRLINES
• UNIVERSITIES
• TELECOMMUNICATION
• SALES & MARKETTING
• ONLINE TRADING
• MANUFACTURING UNITS
• HUMAN RESOURCES DEVELOPMENTS
• SCIENTIFIC APPLICATION &
GOVERNMENT DEPARTMENT
What is RDBMS,
• RDBMS stands for Relational Database Management
System. It organizes data into related rows and
columns.

• The principles of the relational model were first


outlined by Dr. E. F. Codd in a June 1970 paper called
"A Relational Model of Data for Large Shared Data
Banks:'
• In this paper. Dr. Codd proposed the relational model
for database systems. The more popular models used
at that time were hierarchical and network, or even
simple flat file data structures. Relational database
management systems (RDBMS) soon became very
popular, especially for their ease of use and flexibility
in structure.
Properties of RDBMS

• Every value has to be atomic


• Each an every row is unique
• Column values are of the same kind
/type
• The sequence
Difference Between DBMS & RDBMS
Sr No DBMS RDBMS
DBMS applications store data RDBMS applications store data in a
1)
as file. tabular form.
In RDBMS, the tables have an
In DBMS, data is generally
identifier called primary key and the
2) stored in either a hierarchical
data values are stored in the form of
form or a navigational form.
tables.
Normalization is not present
3) Normalization is present in RDBMS.
in DBMS.
RDBMS defines the integrity
DBMS does not apply any
constraint for the purpose of ACID
4) security with regards to data
(Atomocity, Consistency, Isolation and
manipulation.
Durability) property.

in RDBMS, data values are stored in


DBMS uses file system to
the form of tables, so a relationship
5) store data, so there will be no
between these data values will be
relation between the tables.
stored in the form of a table as well.
Sr. DBMS RDBMS
No.
RDBMS system supports a tabular
DBMS has to provide some
structure of the data and a relationship
6) uniform methods to access the
between them to access the stored
stored information.
information.
DBMS does not support RDBMS supports distributed
7)
distributed database. database.

DBMS is meant to be for small


RDBMS is designed to handle large
organization and deal with
8) amount of data. it supports multiple
small data. it supports single
users.
user.
Example of RDBMS are mysql,
Examples of DBMS are file
9) postgre, sql server, oracle etc.
systems, xml etc.
Names of various DBMS and RDBMS
software

DBMS RDBM

FoxPro Oracle RDBMS


FoxProW IBM DB2
Dbase Microsoft SQL Server
MS Access etc SAP Sybase ASE
Teradata
ADABAS
MySQL
FileMaker
Microsoft Access
Informix
• Data abstraction
• Database languages
• Instance and schema,
• Data independence
a) Logical and
b) Physical Independence.
Data Abstraction

• Definition :- It can be defined as the


process of hiding the complexity of data &
representing the data which need to be
shown to the user.
• The major purpose of a database system
is to provide users with an abstract view
of the system.
• The system hides certain details of how
data is stored and created and maintained
complexity should be hidden from
database users.
Figure : The three levels of data
abstraction
• There are 3 levels of abstraction:
1. Physical Level:
• How the data are stored.
• Lowest level of abstraction.
• Complex low-level structures described in
detail.
• E.g. index, B-tree, hashing.
2. Logical /Conceptual Level:
• Next highest level of abstraction.
• Describes what data are stored.
• Describes the what relationships among data.
• Database administrator level.
3. View Level:
• Highest level.
• Describes part of the database for a
particular group of users.
• Complexity of physical as well as logical
level is hidden from the user.
• E.g. tellers in a bank get a view of customer
accounts, but not of payroll data.
Database Languages

• DDL – Data Definition Language


• DML- Data Manipulation Language
• DCL – Data Control Language
• TCL-Transaction Control Language
DDL – Data Definition Language
• DDL statements are used to define the
database structure or schema.( Schema
means overall design of the database)
• For fast retrieval the data itself should be
stored in a well structured manner, so that it
easy to find it out from large storage.
• Data Definition Language (DDL) is a standard
for commands that define the different
structures in a database.
• For describing data and data structures a
suitable description tool, a data definition
language (DDL), is needed.
• Typical DDL operations (with their
respective keywords in the structured
query language SQL): Creation of
tables and definition of attributes
(CREATE TABLE ...)
• Change of tables by adding or deleting
attributes (ALTER TABLE …)
• Deletion of whole table including
content (!) (DROP TABLE …)
DDL Commands

• CREATE :- To create objects in the


database.
• ALTER:- Alter the structure of the
database.
• DROP :- Delete objects from the
database.
• TRUNCATE :- Remove all records from
a table, including all spaces allocated for
the records are removed.
• RENAME:- Rename an object.
DML- Data Manipulation Language

• Data Manipulation is_


1. To retrieve the information from the
database.
2. To insert information to the database.
3. To Delete information from the database.
4. To modify information from the database.
Additionally a language for the descriptions of the
operations with data like store, search, read, change,
etc. the so-called data manipulation, is needed.
Such operations can be done with a data
manipulation language (DML). Within such
languages keywords like insert, modify, update, delete,
select, etc. are used.
• SELECT - retrieve data from the a database
• INSERT - insert data into a table
• UPDATE - updates existing data within a table
• DELETE - deletes all records from a table, the
space for the records remain
• MERGE - UPSERT operation (insert or update)
• CALL - call a PL/SQL or Java subprogram
• EXPLAIN PLAN - explain access path to data
• LOCK TABLE - control concurrency
DML- Data Manipulation Language

• There are two types of DML


1. Procedural DML:- The users
specifies both, what data is needed & how
to get the data.
2. Non Procedural DML:- In this
type only a user to specify what data are
needed without specifying how to get those
data.
DCL – Data Control Language
• Data security is an important aspect of any
DBMS.
• SQL provides means for protecting data
from unauthorized access.
• Used to control access to data stored in a database.
In particular, it is a component of Structured Query
Language (SQL).
• Examples of DCL commands include
• GRANT - gives user's access privileges to database
• REVOKE - withdraw access privileges given with
the GRANT command
TCL:-Transaction Control Language

• Transaction Control (TCL) statements are


used to manage the changes made by DML
statements.
• It allows statements to be grouped together
into logical transactions.
• TCL Commands:-
• COMMIT - save work done
• SAVEPOINT - identify a point in a
transaction to which you can later roll back
• ROLLBACK - restore database to original
since the last COMMIT.
Instance
• The data in the database at a
particular moment of time is
called an “instance” or a
database state.
• Every time we update(i.e. insert,
delete or modify ) the value of a
data item in record, that time one
state of the database changes
into another state.
Schema
• The overall design of the database is
called the database schema.
• A database schema is the skeleton structure
that represents the logical view of the entire
database.
• It defines how the data is organized and
how the relations among them are
associated. It formulates all the constraints
that are to be applied on the data.
• A database schema defines its entities and
the relationship among them.
Types of Schema
1. Physical Database Schema − It describes the
database design at the physical level.
• This schema pertains to the actual storage of
data and its form of storage like files, indices,
etc.
• It defines how the data will be stored in a
secondary storage.
2. Logical Database Schema −It describes the
database design at the logical level. (what data
are stored in the database & what
relationship exists among those data.)
• It defines tables, views, and integrity constraints.
Types of Schema

3. View or Subschema − A
database may also have several
schema at the view level sometime
called “Subschema”.
It defines the portion of the
database as seen by application
programs & application programs
can have different view of data
stored in the database
Data independence
• The ability to modify schema definition in one level
without affecting a schema definition in the next
higher level is called ..
• For example, it stores data about data, known as
metadata, to locate and retrieve data easily. It is
rather difficult to modify or update a set of metadata
once it is stored in the database. But as a DBMS
expands, it needs to change over time to satisfy the
requirements of the users. If the entire data is
dependent, it would become a tedious and highly
complex job. Metadata itself follows a layered
architecture, so that when we change data at one
layer, it does not affect the data at another level.
This data is independent but mapped to each
other.
Physical Data Independence
• It refers to the ability to modify the schema
followed at the physical level without
affecting the schema followed at the logical
level/conceptual level.
• The application programs remain the same
even though the schema at the physical level
gets modified.
• For example, in case we want to change or
upgrade the storage system itself − suppose
we want to replace hard-disks − it should
not have any impact on the logical data or
schemas.
Logical Data Independence

• It refers to the ability to modify the Logical


or Conceptual schema without causing any
changes in schema followed at view levels.
• The logical data independence ensures that
the application programs remain the same.
• Logical data is data about database, that is,
it stores information about how data is
managed inside. For example, a table
(relation) stored in the database and all its
constraints, applied on that relation.
Components of DBMS & Overall
Structure of DBMS

• A database system is partitioned


into modules that deal with each of
the responsibilities of the overall
system.
• The functional components of a
database system can be broadly
divided into the storage manager,
Query processor & Disk Storage.
Query Processor Components

• DDL Interpreter : DDL interpreter


converts DDL statements into a set of
tables containing meta data or data
dictionary.
• DML Compiler : It translates DML
statements in a query language into low
level instructions that query evaluation
engine understands.
• Query Evaluation Engine : It executes
low-level instructions generated by the
DML compiler.
Storage Manager Components

• They provide the interface between the low-level


data stored in the database and application
programs and queries submitted to the system.
• Authorization and Integrity Manager : It tests
for the satisfaction of integrity constraints checks
the authority of users to access data.
• Transaction Manager : It ensures that the
database remains in a consistent(correct) state.
• File Manager : it manages the allocation of space
on disk storage & the data structure used to
represent information stored on disk.
• Buffer Manager : It is responsible for fetching data
from disk storage into main memory and deciding
what data to cache in memory.
Data Structures
• Following data structures are required as a part of
the physical system implementation.

• Data Files : It stores the database.


• Data Dictionary : It stores meta data (data about
data) about the structure of the database.
• Indices : Provide fast access to data items that
hold particular values.
• Statistical Data : It stores statistical information
about the data in the database. This information is
used by query processor to select efficient ways to
execute query.
Database Users
• There are different types of database users:-
1.Naive Users:- Naive means Lacking Experience
(untrain) these are the users who need not be aware of
the presence of the Data Base System.
Example of these type of users is the user of an ATM
machine. Because these users only responds to the
instructions displayed on the screen (enter your pin
number, click here, enter the required money etc).
Obviously operations performed by these users are
very limited
2. Application Programmers:- Professional / Application
programmers are those who are responsible for
developing application programs or user interface. The
application programs could be written in a general-
purpose programming language or the commands
available to manipulate a database.
Database Users
3. Sophisticated Users:- Simply we can say that
these are the EXPERIENCED users. These people
interact with the system without writing
programs. They form requests by writing queries
in database query language.
▪ Sophisticated users are the users who are
familiar with the structure of database &
facilities of DBMS.
4. Specialized Users:- These are the
sophisticated users who write specialized
database applications.
• Among these applications are computer aided
design(CAD) systems, knowledge-based and
expert systems.
Database Users
5. Database Administrator:-
• It is responsible for managing the whole
database system.
• He/She designs, creates & maintains the
database.
• He/She manages the users who can access
this db & controls integrity issues.
6. Database Designers:-
• Db designers are the computer professionals
which responsible for developing db
oriented application /software's.
Functions of Database Administrator

• The DBA(Database Administrator) is a person or group of


persons who is responsible for the management of the database.
• The person having central control over the system is called
DBA. The functions of DBA are listed below:-
• 1. Schema Definition:- The Database Administrator creates
the database schema by executing DDL statements. Schema
includes the logical structure of database table(Relation) like
data types of attributes, length of attributes, integrity
constraints etc.
• 2. Storage structure and access method definition:-
Database tables or indexes are stored in the following ways:
Flat files, Heaps, B+ Tree etc
• 3. Schema and physical organization modification:-
The DBA carries out changes to the existing schema and
physical organization.
Functions of Database Administrator
4. Granting authorization for data access:-
• The DBA provides different access rights to the users
according to their level. Ordinary users might have highly
restricted access to data.
• DBA is responsible for granting the access to the database.
5. Integrity- constraint specification: Integrity
constraints are written by DBA and they are stored in a
special file, which is accessed by database manager,
while updating the data.
6. Routine Maintenance:- Some of the routine
maintenance activities of a DBA is given below.
a) Taking backup of database periodically
b) Ensuring enough disk space is available all the time.
c) Monitoring jobs running on the database.
d) Ensure that performance is not degraded by some expensive
task submitted by some users.
e) Performance Tuning
Introduction to Client Server Architecture.
• In client-server architectures the application program
functions are divided up between clients and servers.
• Client:- PCs or workstations on which users run
applications.
• Server:- it is powerful computers dedicated to
managing printers or network traffic.
• Application logic may reside on the client, server or be
split up between the two.
• Most networks today use a client-server architecture .
• Client-Server architecture consists of front end & back
end. Front end is the GUI & back end is where the db is
stored.
• In client-server architectures, remote procedure
calls(RPCs) or standard query language(SQL)
statements are typically used to communicate between
the client & server.
• Example of front End is Visual Basic, VC++ etc. &
back end is SQL, Ms-Access, SQL server etc.
• Computer networking allows some task to be
executed on a server system and some tasks on
client system.
• There are different types of client/server
architecture such as two tier, three tier
architecture.
Two & Three Tier
Architecture.
Two Tier Architecture.
Two-Tier Architecture:-
• The two-tier is based on Client Server architecture.
• The two-tier architecture is like client server
application.
• The direct communication takes place between client
and server.
• There is no intermediate between client and server.
Because of tight coupling a 2 tiered application will
run faster.
• The above figure shows the architecture of two-tier.
Here the communication is one to one.
• Let us see the concept of two tier with real time
application.
• For example now we have a need to save the employee
details in database. The two tiers of two-tier
architecture is.
Two Tier Architecture.
• Database (Data tier)
• Client Application (Client tier)
• So, in client application the client writes the
program for saving the record in SQL Server
and thereby saving the data in the database.
• Advantages:- Understanding &
maintenance is easier.
• Disadvantages:- Performance will be
reduced when there are more users.
Three-Tier Architecture
• In three tier architecture the communication taken
place from client to application server and then
application server to database system to access the
data.
• The application server or web server is sometimes
called middle layer or intermediate layer.
• The middle layer which processes applications and
database server processes the queries.
• This type of communication system is used in the
large applications or the world web applications. On
WWW all clients requests for data and server serves
it.
• There are multiple servers used like fax server,
proxy server, mail server etc.
Three-Tier Architecture:

Three tier architecture having three


layers. They are
1. Client layer
2. Business layer
3. Data layer
1. Client layer: Here we design the
form using textbox, label etc.
2. Business layer: It is the
intermediate layer which has the
functions for client layer and it is used
to make communication faster
between client and data layer. It
provides the business processes logic
and the data access.
• Advantages
• Easy to modify with out affecting other modules
• Fast communication
• Performance will be good in three tier architecture.
The 12 Rules (Codd’s laws) for fully
functional RDBMS.
•Rule 1: Information Rule:- The data stored in a
database, may it be user data or metadata, must be a
value of some table cell. Everything in a database
must be stored in a table format.
•Rule 2: Guaranteed Access Rule:- Every single
data element (value) is guaranteed to be accessible
logically with a combination of table-name, primary-
key (row value), and attribute-name (column value).
No other means, such as pointers, can be used to
access data.
•Rule 3: Systematic Treatment of NULL Values:-
The NULL values in a database must be given a
systematic and uniform treatment. This is a very
important rule because a NULL can be interpreted as
one the following − data is missing, data is not
• Rule 4: Active Online catalog based on the
relational model :- The structure description of
the entire database must be stored in an online
catalog, known as data dictionary, which can be
accessed by authorized users.
• Rule 5: Comprehensive Data Sub-Language
Rule:- A database can only be accessed using a
language having linear syntax that supports data
definition, data manipulation, and transaction
management operations. This language can be used
directly or by means of some application. If the
database allows access to data without any help of
this language, then it is considered as a violation.
• Rule 6: View Updating Rule:- All the views of a
database, which can theoretically be updated, must
also be updatable by the system.
• Rule 7: High-Level Insert, Update, and
Delete Rule:- A database must support high-
level insertion, updation, and deletion.
• Rule 8: Physical Data Independence:- The
data stored in a database must be independent
of the applications that access the database.
Any change in the physical structure of a
database must not have any impact on how the
data is being accessed by external applications.
• Rule 9: Logical Data Independence:-The
logical data in a database must be independent
of its user’s view (application). Any change in
logical data must not affect the applications
using it.
• Rule 10: Integrity Independence:- A database
must be independent of the application that uses
it. All its integrity constraints can be
independently modified without the need of any
change in the application.
• Rule 11: Distribution Independence:- The
end-user must not be able to see that the data is
distributed over various locations. Users should
always get the impression that the data is located
at one site only.
• Rule 12: Non-Subversion Rule:- If the RDBMS
has a language that accesses the information of a
record at a time, this language should not be used
to bypass the security and integrity constraints.
1
Discuss about different types of Data models?
2
Briefly explain about Database system architecture
3
State four advantages of DBMS over file processing system.
4
Explain the difference between physical and logical data Independence.
5
What is Schema ? Explain Different types of Schema ?
6
Define Abstraction .
7
Disadvantages of file processing system,
Advantages of DBMS over file processing system
8
List Application of database
9
What is View ? Explain different ttpes of Views?

You might also like