SlideShare una empresa de Scribd logo
1 de 30
By :
Mrs. V. Gowri,
AP/CSE
Unit 1: Introduction to DBMS
Set of programs to access the data
DBMS contains information about a particular enterprise
DBMS provides an environment that is both convenient and efficient to
use.
Database Applications:
• Banking: all transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Manufacturing: production, inventory, orders, supply chain
• Human resources: employee records, salaries, tax deductions
Databases touch all aspects of our lives
Database Management System (DBMS)
Collection of interrelated data
In the early days, database applications were
built on top of file systems.
Drawbacks of using file systems to store data:
Data redundancy and inconsistency - duplication of
information in different files.
• Uncontrolled duplication of data is undesirable for
following reasons:
Duplication costs time and money to enter data more than
once.
It takes additional storage space thus again increasing
associated costs. It can be avoided by sharing data files.
It may lead to data inconsistency.
Difficulty in accessing data
Need to write a new program to carry out each new
task.
Purpose of Database System
• Data isolation — multiple files and formats.
• When data is isolated in separate files, it is more difficult to
access data and to ensure that data is correct.
• Also, the structure of file depends on application
programming language. Thus the direct incompatibility of
such files makes it difficult to process jointly.
• Integrity problems
Integrity constraints (e.g. account balance > 0) become part
of program code
Hard to add new constraints or change existing ones.
Drawbacks of file systems (cont.)
• Atomicity of updates
Failures may leave database in an inconsistent state with
partial updates carried out.
E.g. transfer of funds from one account to another should
either complete or not happen at all.
• Concurrent access by multiple users
Concurrent accessed needed for performance.
Uncontrolled concurrent accesses can lead to inconsistencies
E.g. two people reading a balance and updating it at the same
time.
• Security problems
Database systems offer solutions to all the above
problems
Drawbacks of file systems (cont.)
Advantage of DBMS over file system
•No redundant data: Redundancy removed by data normalization. No data
duplication saves storage and improves access time.
•Data Consistency and Integrity:data normalization takes care of the data
redundancy, data inconsistency also been. taken care of as part of it.
•Data Security: It is easier to apply access constraints in database systems
so that only authorized user is able to access the data.
Each user has a different set of access thus data is secured from the issues
such as identity theft, data leaks and misuse of data.
•Privacy: Limited access means privacy of data.
•Easy access to data – Database systems manages data in such a way so
that the data is easily accessible with fast response times.
•Easy recovery: Since database systems keeps the backup of data, it is
easier to do a full recovery of data in case of a failure.
•Flexible: Database systems are more flexible than file processing systems
Physical level/Internal level : It describes how a
record (e.g., customer) is stored.
Logical level/Conceptual level: It describes data
stored in database, and the relationships among
the data.
type customer = record
name : string;
street : string;
city : integer;
end;
View level/ External Level: Application programs
hide details of data types. Views can also hide
information (e.g., salary) for security purposes.
Levels of Abstraction
Views of Data
External
view: User &
Data
Designer
Conceptual
Schema:
Data
Designer
Physical
Storage:
DBA
An architecture for a database system
Views of Data
Physical level/Internal level : The physical
representation of the database on the computer.
This level describes how the data is stored in the
database.
• It includes :
 Where the data is located
 File structures
 Access methods
 Indexes.
The physical schema is managed by the DBA.
Logical level/Conceptual level: The community view of
the database. This level describes what data is stored
in the database and the relationships among the data.
• What are the entities and Relationships in
organization.
• What information these entities and relationships
should store in database.
• What integrity constraints/business rules it should
have?
• It consists of the schemas we have described with
CREATE TABLE statements.
Views of Data
View level/ External Level: The users view of the
database. This level describes that part of the
database that is relevant to each user.
• Each external schema is a combination of base
tables and views, tailored to the needs of a single
user.
• It is managed by the data designer and the user.
Views of Data
Advantages of DBMS
Control of data redundancy
Data consistency
More information from the same amount of data
Sharing of data
Improved data integrity
Improved security
Enforcement of standards
Economy of scale
Balance of conflicting requirements
Improved data accessibility and responsiveness
Increased productivity
Improved maintenance through data independence
Disadvantages of DBMS
Complexity – provision of the functionality we expect
from DBMS makes it extremely complex.
Size – complexity and breadth of functionality makes DBMS
extremely large piece of software.
Cost of DBMSs – it varies significantly depending on
the environment & functionality provided.
Additional hardware costs – to achieve required
performance, it is necessary to procure large memory.
Performance – DBMS is written to be more general, to
cater for many applications rather than just one.
Higher impact of failure – Centralization of resources
increases the vulnerability of the system. Since all users &
applications rely on DBMS, the failure of one component
can bring operations to a halt.
Components of the DBMS
1. Hardware – DBMS and the applications require hardware to
run.
• It can range from PCto mainframe or network of
computers.
• It depends on the organization’s requirements and the
DBMS used.
2. Software – It comprises of following :
• DBMS software itself
• Application program
• Operating System including network software
3. Data - Most important component from end-user’s point
of view.
• It acts as a bridge between the machine components
and the human component.
• The database contains both operational data and the
metadata.
Components of the DBMS
4. Procedures – It refers to the instructions and rules that
govern the design and use of the database.
• Users of the system require documented procedures
on how to use/run the system.
• It may consists of instructions like
• Log on to the DBMS
• Use a particular DBMS facility or application
program.
• Start and stop DBMS
• Make backup copies of the database
• Handle H/W and S/W failures.
• Change structure of table to improve performance
5. People – i.e USERS
Overall System Structure
indices Statistical data
Data files Data dictionary
disk storage
Database Users
Users are differentiated by the way they expect to interact with the
system.
1. Application programmers: They are the developers who interact
with the database by means of DML queries. These DML queries
are written in the application programs like C, C++, JAVA, Pascal
etc. These queries are converted into object code to communicate
with the database.
For example, writing a C program to generate the report of employees
who are working in particular department will involve a query to
fetch the data from database. It will include a embedded SQL query in
the C Program.
Database Users
2. Sophisticated users : They are database developers, who write SQL
queries to select/insert/delete/update data. They do not use any
application or programs to request the database. They directly
interact with the database by means of query language like SQL.
These users will be scientists, engineers, analysts who thoroughly
study SQL and DBMS to apply the concepts in their requirement. In
short, we can say this category includes designers and developers of
DBMS and SQL.
3. Specialized users: These are also sophisticated users, but they write
special database application programs. They are the developers who
develop the complex programs to the requirement.
Database Users
4. Stand-alone Users - These users will have stand –alone
database for their personal use. These kinds of database will
have readymade database packages which will have menus and
graphical interfaces.
5. Naive users: These are the users who use the existing
application to interact with the database. For example, online
library system, ticket booking systems, ATMs etc which has
existing application and users use them to interact with the
database to fulfill their requests.
Database Administrator
Coordinates all the activities of the database system;
the database administrator has a good understanding
of the enterprise’s information resources and needs:
Database administrator’s duties include:
• Schema definition
• Storage structure and access method definition
• Schema and physical organization modification
• Granting user authority to access the database
• Specifying integrity constraints
• Monitoring performance and responding to changes in
requirements
Instances and Schemas
Similar to types and variables in programming languages
Schema – the logical structure of the database
e.g., 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
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.
Storage Manager/Storage Management:
storage manager components include:
Authorization and integrity manager
•Transaction manager
•File manager
•Buffer manager
•Data structures implemented by storage manager.
•Data files: Stored in the database itself.
•Data dictionary: Stores metadata about the structure of the database.
•Indices: Provide fast access to data items.
Data Models
concepts for describing and manipulating the
An integrated collection of
following in an organization:
• Data
• Data relationships
• Data semantics
• Data constraints
Facilitate interaction among the designer, the applications programmer, and the
end user
A data model can be thought of as comprising 3components:
• Structural Part – consisting of set of rules according to which databases can
be structured.
• Manipulative part – defining the types of operations that are allowed on the
data (includes insertion, retrieval or updating)
• Set of integrity rules – for ensuring that data is accurate.
Instance – the actual content of the database i.e. actual data at a particular
point in time .
• Analogous to the value of a variable.
• The actual data in the database may change very frequently.
Thus many database instances can correspond to the same database
schema.
The schema is sometimes called as intension of the database.
The instance is sometimes called as extension or state of the database.
Schemas and Instances
Three-Schema Architecture
• Defines DBMS schemas at three levels:
• Internal schema at the internal level to describe physical
storage structures and access paths. Typically uses a
physical data model.
• Conceptual schema at the conceptual level to describe the
structure and constraints for the whole database for a
community of users. Uses a conceptual or an
implementation data model.
• External schemas at the external level to describe the
various user views. Usually uses the same data model as the
conceptual level.
The disjointing of data descriptions from the application programs (or user-
interfaces) that uses the data is called data independence.
Data independence is one of the main advantages of DBMS.
The three-schema architecture provides the concept of data independence,
which means that upper-levels are unaffected by changes to lower-levels.
The interfaces between the various levels and components should be well
defined so that changes in some parts do not seriously influence others.
There are two kinds of data independence.
• Physical Data Independence
• Logical Data Independence
Data Independence
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.
Logical Data Independence – the ability to modify the conceptual
schema without changing the application program
• Usually done when logical structure of database is altered.
• Logical data independence is harder to achieve as the application
programs are usually heavily dependent on the logical structure of
the data. An analogy is made to abstract data types in
programming languages.
Types of Data Independence
Specification notation for defining the database
schema
◦ E.g.
create table account (
account-number char(10),
balance integer)
DDL compiler generates a set of tables stored in
a data dictionary
Data dictionary contains metadata (i.e., data
about data)
◦ database schema
◦ Data storage and definition language
language in which the storage structure and access
methods used by the database system are specified
Usually an extension of the data definition language
Data Definition Language (DDL)
SQL
SQL: widely used non-procedural language
E.g. find the name of the customer with customer-id 192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-7465’
E.g. find the balances of all accounts held by the customer with customer-id 192-83-
7465
select account.balance
from depositor, account
where depositor.customer-id = ‘192-83-7465’ and
depositor.account-number = account.account-number
Application programs generally access databases through one of
Language extensions to allow embedded SQL
Application program interface (e.g. ODBC/JDBC) which allow SQL queries to be sent to
a database

Más contenido relacionado

La actualidad más candente

2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
Kumar
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
welcometofacebook
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
ahfiki
 

La actualidad más candente (20)

Dbms slides
Dbms slidesDbms slides
Dbms slides
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
DATABASE CONSTRAINTS
DATABASE CONSTRAINTSDATABASE CONSTRAINTS
DATABASE CONSTRAINTS
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
Schema
SchemaSchema
Schema
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMS
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Adbms 16 object definition language
Adbms 16 object definition languageAdbms 16 object definition language
Adbms 16 object definition language
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 

Similar a Unit1 dbms

Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
sethu pm
 
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.ppt
LisaMalar
 

Similar a Unit1 dbms (20)

Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
 
Chapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxChapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptx
 
Intoduction- Database Management System
Intoduction- Database Management SystemIntoduction- Database Management System
Intoduction- Database Management System
 
PHP/MySQL First Session Material
PHP/MySQL First Session MaterialPHP/MySQL First Session Material
PHP/MySQL First Session Material
 
Beginning Of DBMS (data base)
Beginning Of DBMS (data base)Beginning Of DBMS (data base)
Beginning Of DBMS (data base)
 
DBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptxDBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptx
 
unit 1.pdf
unit 1.pdfunit 1.pdf
unit 1.pdf
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
1-introduction to DB.pdf
1-introduction to DB.pdf1-introduction to DB.pdf
1-introduction to DB.pdf
 
Ch01
Ch01Ch01
Ch01
 
Intro.pptx
Intro.pptxIntro.pptx
Intro.pptx
 
Introduction to DBMS.pptx
Introduction to DBMS.pptxIntroduction to DBMS.pptx
Introduction to DBMS.pptx
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Unit 2 rdbms study_material
Unit 2  rdbms study_materialUnit 2  rdbms study_material
Unit 2 rdbms study_material
 
Introduction to DBMS.pptx
Introduction to DBMS.pptxIntroduction to DBMS.pptx
Introduction to DBMS.pptx
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.ppt
 
1. intro
1. intro1. intro
1. intro
 

Último

+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Último (20)

Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 

Unit1 dbms

  • 1. By : Mrs. V. Gowri, AP/CSE Unit 1: Introduction to DBMS
  • 2. Set of programs to access the data DBMS contains information about a particular enterprise DBMS provides an environment that is both convenient and efficient to use. Database Applications: • Banking: all transactions • Airlines: reservations, schedules • Universities: registration, grades • Sales: customers, products, purchases • Manufacturing: production, inventory, orders, supply chain • Human resources: employee records, salaries, tax deductions Databases touch all aspects of our lives Database Management System (DBMS) Collection of interrelated data
  • 3. In the early days, database applications were built on top of file systems. Drawbacks of using file systems to store data: Data redundancy and inconsistency - duplication of information in different files. • Uncontrolled duplication of data is undesirable for following reasons: Duplication costs time and money to enter data more than once. It takes additional storage space thus again increasing associated costs. It can be avoided by sharing data files. It may lead to data inconsistency. Difficulty in accessing data Need to write a new program to carry out each new task. Purpose of Database System
  • 4. • Data isolation — multiple files and formats. • When data is isolated in separate files, it is more difficult to access data and to ensure that data is correct. • Also, the structure of file depends on application programming language. Thus the direct incompatibility of such files makes it difficult to process jointly. • Integrity problems Integrity constraints (e.g. account balance > 0) become part of program code Hard to add new constraints or change existing ones. Drawbacks of file systems (cont.)
  • 5. • Atomicity of updates Failures may leave database in an inconsistent state with partial updates carried out. E.g. transfer of funds from one account to another should either complete or not happen at all. • Concurrent access by multiple users Concurrent accessed needed for performance. Uncontrolled concurrent accesses can lead to inconsistencies E.g. two people reading a balance and updating it at the same time. • Security problems Database systems offer solutions to all the above problems Drawbacks of file systems (cont.)
  • 6. Advantage of DBMS over file system •No redundant data: Redundancy removed by data normalization. No data duplication saves storage and improves access time. •Data Consistency and Integrity:data normalization takes care of the data redundancy, data inconsistency also been. taken care of as part of it. •Data Security: It is easier to apply access constraints in database systems so that only authorized user is able to access the data. Each user has a different set of access thus data is secured from the issues such as identity theft, data leaks and misuse of data. •Privacy: Limited access means privacy of data.
  • 7. •Easy access to data – Database systems manages data in such a way so that the data is easily accessible with fast response times. •Easy recovery: Since database systems keeps the backup of data, it is easier to do a full recovery of data in case of a failure. •Flexible: Database systems are more flexible than file processing systems
  • 8. Physical level/Internal level : It describes how a record (e.g., customer) is stored. Logical level/Conceptual level: It describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end; View level/ External Level: Application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes. Levels of Abstraction
  • 9. Views of Data External view: User & Data Designer Conceptual Schema: Data Designer Physical Storage: DBA An architecture for a database system
  • 10. Views of Data Physical level/Internal level : The physical representation of the database on the computer. This level describes how the data is stored in the database. • It includes :  Where the data is located  File structures  Access methods  Indexes. The physical schema is managed by the DBA.
  • 11. Logical level/Conceptual level: The community view of the database. This level describes what data is stored in the database and the relationships among the data. • What are the entities and Relationships in organization. • What information these entities and relationships should store in database. • What integrity constraints/business rules it should have? • It consists of the schemas we have described with CREATE TABLE statements. Views of Data
  • 12. View level/ External Level: The users view of the database. This level describes that part of the database that is relevant to each user. • Each external schema is a combination of base tables and views, tailored to the needs of a single user. • It is managed by the data designer and the user. Views of Data
  • 13. Advantages of DBMS Control of data redundancy Data consistency More information from the same amount of data Sharing of data Improved data integrity Improved security Enforcement of standards Economy of scale Balance of conflicting requirements Improved data accessibility and responsiveness Increased productivity Improved maintenance through data independence
  • 14. Disadvantages of DBMS Complexity – provision of the functionality we expect from DBMS makes it extremely complex. Size – complexity and breadth of functionality makes DBMS extremely large piece of software. Cost of DBMSs – it varies significantly depending on the environment & functionality provided. Additional hardware costs – to achieve required performance, it is necessary to procure large memory. Performance – DBMS is written to be more general, to cater for many applications rather than just one. Higher impact of failure – Centralization of resources increases the vulnerability of the system. Since all users & applications rely on DBMS, the failure of one component can bring operations to a halt.
  • 15. Components of the DBMS 1. Hardware – DBMS and the applications require hardware to run. • It can range from PCto mainframe or network of computers. • It depends on the organization’s requirements and the DBMS used. 2. Software – It comprises of following : • DBMS software itself • Application program • Operating System including network software 3. Data - Most important component from end-user’s point of view. • It acts as a bridge between the machine components and the human component. • The database contains both operational data and the metadata.
  • 16. Components of the DBMS 4. Procedures – It refers to the instructions and rules that govern the design and use of the database. • Users of the system require documented procedures on how to use/run the system. • It may consists of instructions like • Log on to the DBMS • Use a particular DBMS facility or application program. • Start and stop DBMS • Make backup copies of the database • Handle H/W and S/W failures. • Change structure of table to improve performance 5. People – i.e USERS
  • 17. Overall System Structure indices Statistical data Data files Data dictionary disk storage
  • 18. Database Users Users are differentiated by the way they expect to interact with the system. 1. Application programmers: They are the developers who interact with the database by means of DML queries. These DML queries are written in the application programs like C, C++, JAVA, Pascal etc. These queries are converted into object code to communicate with the database. For example, writing a C program to generate the report of employees who are working in particular department will involve a query to fetch the data from database. It will include a embedded SQL query in the C Program.
  • 19. Database Users 2. Sophisticated users : They are database developers, who write SQL queries to select/insert/delete/update data. They do not use any application or programs to request the database. They directly interact with the database by means of query language like SQL. These users will be scientists, engineers, analysts who thoroughly study SQL and DBMS to apply the concepts in their requirement. In short, we can say this category includes designers and developers of DBMS and SQL. 3. Specialized users: These are also sophisticated users, but they write special database application programs. They are the developers who develop the complex programs to the requirement.
  • 20. Database Users 4. Stand-alone Users - These users will have stand –alone database for their personal use. These kinds of database will have readymade database packages which will have menus and graphical interfaces. 5. Naive users: These are the users who use the existing application to interact with the database. For example, online library system, ticket booking systems, ATMs etc which has existing application and users use them to interact with the database to fulfill their requests.
  • 21. Database Administrator Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise’s information resources and needs: Database administrator’s duties include: • Schema definition • Storage structure and access method definition • Schema and physical organization modification • Granting user authority to access the database • Specifying integrity constraints • Monitoring performance and responding to changes in requirements
  • 22. Instances and Schemas Similar to types and variables in programming languages Schema – the logical structure of the database e.g., 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 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.
  • 23. Storage Manager/Storage Management: storage manager components include: Authorization and integrity manager •Transaction manager •File manager •Buffer manager •Data structures implemented by storage manager. •Data files: Stored in the database itself. •Data dictionary: Stores metadata about the structure of the database. •Indices: Provide fast access to data items.
  • 24. Data Models concepts for describing and manipulating the An integrated collection of following in an organization: • Data • Data relationships • Data semantics • Data constraints Facilitate interaction among the designer, the applications programmer, and the end user A data model can be thought of as comprising 3components: • Structural Part – consisting of set of rules according to which databases can be structured. • Manipulative part – defining the types of operations that are allowed on the data (includes insertion, retrieval or updating) • Set of integrity rules – for ensuring that data is accurate.
  • 25. Instance – the actual content of the database i.e. actual data at a particular point in time . • Analogous to the value of a variable. • The actual data in the database may change very frequently. Thus many database instances can correspond to the same database schema. The schema is sometimes called as intension of the database. The instance is sometimes called as extension or state of the database. Schemas and Instances
  • 26. Three-Schema Architecture • Defines DBMS schemas at three levels: • Internal schema at the internal level to describe physical storage structures and access paths. Typically uses a physical data model. • Conceptual schema at the conceptual level to describe the structure and constraints for the whole database for a community of users. Uses a conceptual or an implementation data model. • External schemas at the external level to describe the various user views. Usually uses the same data model as the conceptual level.
  • 27. The disjointing of data descriptions from the application programs (or user- interfaces) that uses the data is called data independence. Data independence is one of the main advantages of DBMS. The three-schema architecture provides the concept of data independence, which means that upper-levels are unaffected by changes to lower-levels. The interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others. There are two kinds of data independence. • Physical Data Independence • Logical Data Independence Data Independence
  • 28. 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. Logical Data Independence – the ability to modify the conceptual schema without changing the application program • Usually done when logical structure of database is altered. • Logical data independence is harder to achieve as the application programs are usually heavily dependent on the logical structure of the data. An analogy is made to abstract data types in programming languages. Types of Data Independence
  • 29. Specification notation for defining the database schema ◦ E.g. create table account ( account-number char(10), balance integer) DDL compiler generates a set of tables stored in a data dictionary Data dictionary contains metadata (i.e., data about data) ◦ database schema ◦ Data storage and definition language language in which the storage structure and access methods used by the database system are specified Usually an extension of the data definition language Data Definition Language (DDL)
  • 30. SQL SQL: widely used non-procedural language E.g. find the name of the customer with customer-id 192-83-7465 select customer.customer-name from customer where customer.customer-id = ‘192-83-7465’ E.g. find the balances of all accounts held by the customer with customer-id 192-83- 7465 select account.balance from depositor, account where depositor.customer-id = ‘192-83-7465’ and depositor.account-number = account.account-number Application programs generally access databases through one of Language extensions to allow embedded SQL Application program interface (e.g. ODBC/JDBC) which allow SQL queries to be sent to a database