SlideShare a Scribd company logo
1 of 44
1
Introduction to Database Management System
2
DBMS File System
DBMS is a collection of data. In DBMS, the user is not required to write the procedures. File system is a collection of data. In this system, the user has to write the procedures for
managing the database.
DBMS gives an abstract view of data that hides the details. File system provides the detail of the data representation and storage of data.
DBMS provides a crash recovery mechanism, i.e., DBMS protects the user from the system failure. File system doesn't have a crash mechanism, i.e., if the system crashes while entering some data,
then the content of the file will lost.
DBMS provides a good protection mechanism. It is very difficult to protect a file under the file system.
DBMS contains a wide variety of sophisticated techniques to store and retrieve the data. File system can't efficiently store and retrieve the data.
DBMS takes care of Concurrent access of data using some form of locking. In the File system, concurrent access has many problems like redirecting the file while other
deleting some information or updating some information.
3
Three schema Architecture
PURPOSE OF DATABASE SYSTEM
4
• Database : It is the collection of interrelated and meaningful data.
• Database Management System(DBMS) :
• DBMS contains information about a particular enterprise
• Collection of interrelated data
• Set of programs to access the data
• An environment that is both convenient and efficient to use
• Goal of DBMS : The primary goal of DBMS is to provide a way to store
and retrieve database information that is both convenient and efficient.
PURPOSE OF DATABASE SYSTEM
5
• Characteristics of DBMS :
• It provides secure and survivable medium for storage and retrieval
of data
• It deals with management of data.
• Defining structures for storing information
• Providing mechanism for the manipulation of information
• The system must ensure the safety of information stored , despite
system crashes.
• The data can be shared among several users and it is persistent.
PURPOSE OF DATABASE SYSTEM
6
Database System Applications :
Banking : For Account, Loan and Customer information
Airlines : For reservations and Schedule information
Universities : For Student information , Regulation and Academic
activities
Credit Card Transactions : For purchases on credit cards and generation
of monthly statements.
Telecommunications : For keeping records of calls, generating monthly
bill, maintaining balances on prepaid calling cards and storing
information on the communication networks.
Finance : For storing information about holdings, sales and purchases of
financial instruments such as stocks and bonds
PURPOSE OF DATABASE SYSTEM
7
• Sales : For customer, product, and purchase information
• Manufacturing : For tracking production of items in factories, inventory and
ordering of items
• Human Resources : For information about employees, salaries, payroll taxes and
benefits.
• Multimedia Databases : For storage and archival of Audio and Video files in online
applications
• Web databases : For keeping track of several web pages
• Data Mining : For discovery of new knowledge
Database System Verses File Systems
8
• The information can be either a conventional file processing system or a
database system.
• In conventional file processing system, each and every subsystem of
information system will have its own set of files and it leads to
duplication.
• But in DBMS, there is a single centralized database which minimizes the
data redundancy of data to a greater extent.
PURPOSE OF DATABASE SYSTEM
9
• Database : It is the collection of interrelated and meaningful data.
• Database Management System(DBMS) :
• DBMS contains information about a particular enterprise
• Collection of interrelated data
• Set of programs to access the data
• An environment that is both convenient and efficient to use
• Goal of DBMS : The primary goal of DBMS is to provide a way to store
and retrieve database information that is both convenient and efficient.
PURPOSE OF DATABASE SYSTEM
10
• Characteristics of DBMS :
• It provides secure and survivable medium for storage and retrieval
of data
• It deals with management of data.
• Defining structures for storing information
• Providing mechanism for the manipulation of information
• The system must ensure the safety of information stored , despite
system crashes.
• The data can be shared among several users and it is persistent.
PURPOSE OF DATABASE SYSTEM
11
Database System Applications :
Banking : For Account, Loan and Customer information
Airlines : For reservations and Schedule information
Universities : For Student information , Regulation and Academic activities
Credit Card Transactions : For purchases on credit cards and generation
of monthly statements.
Telecommunications : For keeping records of calls, generating monthly bill,
maintaining balances on prepaid calling cards and storing information on the
communication networks.
Finance : For storing information about holdings, sales and purchases of financial
instruments such as stocks and bonds
PURPOSE OF DATABASE SYSTEM
12
• Sales : For customer, product, and purchase information
• Manufacturing : For tracking production of items in factories, inventory and
ordering of items
• Human Resources : For information about employees, salaries, payroll taxes and
benefits.
• Multimedia Databases : For storage and archival of Audio and Video files in online
applications
• Web databases : For keeping track of several web pages
• Data Mining : For discovery of new knowledge
Database System Verses File Systems
13
• The information can be either a conventional file processing system or a
database system.
• In conventional file processing system, each and every subsystem of
information system will have its own set of files and it leads to
duplication.
• But in DBMS, there is a single centralized database which minimizes the
data redundancy of data to a greater extent.
ADVANTAGES OF DBMS
14
• Redundancy can be reduced
• Inconsistency can be avoided
• Data can be shared
• Standards can be enforced
• Security restrictions can be applied
• Integrity can be maintained
• Conflicting requirements can be balanced
DIS ADVANTAGES OF DBMS
15
• Complexity and Size
• Additional hardware Cost
• Cost of conversion
• Performance
• High impact of failure
DML
16
• Deals with
• The insertion of new information into database.
• The retrieval of information stored in the database
• The deletion of information from the database
• The modification of information in the database
DML COMMANDS
17
DML COMMANDS
18
DML COMMANDS
19
• Two types of DML :
• Procedural DML : Require a user to specify what data are needed
and how to get those data. E.g. Relational Algebra
• Non Procedural DML : Require a user to specify what data are
needed without specifying how to get those data. E.g. Tuple
Relational Calculus
• Query Language : The portion of DML that involves
information retrieval is called query language. A query is
statement requesting the retrieval of information .
• E.g Select statement is the example of query.
DATABASE SYSTEM STRUCTURE
20
DB ARCHITECTURE
21
• A database system is partitioned into modules that deal with each
of the responsibilities of the overall system.
• The main functional components of database system are :
• Storage Manager : It which handles the storage space required
for database manager.
• Query Processor :It helps the database system simplify and
facilitate access to data.
DB ARCHITECTURE
22
DB ARCHITECTURE
23
• Storage Manager :
• Since the storage space for corporate databases ranges in the size
from hundreds of gigabytes to terabytes of data, the main memory
cannot handle such large amount of data and hence disk can be
used.
DB ARCHITECTURE
24
• Functions
• It is the program module that provides the interface between the
low-level data stored in database and application programs and
queries submitted to the system.
• It translates the various DML statements into low-level system
commands.
• It is responsible for storing, retrieving and updating the data.
DB ARCHITECTURE
25
• Components
• Authorization and Integrity Manager : Performs the test for
ensuring Integrity constraint and authority of user.
• Transaction Manager : Ensures that database remains in a
consistent state despite system failure, and that concurrent
transaction execution proceed without conflicting.
• File Manager : It manages the allocation of space on the disk
storage and the data structures used to represent information
stored on the disk.
• Buffer Manager : It is responsible for fetching data from disk
storage into main memory and deciding what data to cache in
main memory. It enables the database to handle data sizes that are
larger than the size of main memory.
DB ARCHITECTURE
26
• Data Structures used by the Storage Manager
• Data Files : It store the database itself
• Data Dictionary : It stores the metadata about the structure of the
database, in particular the schema of the database. Metadata
means data about the data.
• Indices : It provide fast access to data items that hold particular
values.
DB ARCHITECTURE
27
• Query Processor :
• DDL Interpreter : It interprets DDL statement and records the definition in
data dictionary.
• DML Compiler : It translates the DML statement in query language into an
evaluation plan consisting of low-level instructions that the query evaluation
engine understands. It performs the query optimization for finding the lowest
cost evaluation plan.
• Query Evaluation Engine : It executes low-level instructions generated by
the DML compiler.
DB ARCHITECTURE
28
• DATABASE USERS :
• There are three types of database-system users, differentiated by
the way they expect to interact with the system.
• Naive Users : They are unsophisticated users who interact with
the system by invoking one of application programs that have been
written previously. These users interact with the system using
forms interface.
DB ARCHITECTURE
29
• Application Programmers : They are computer professionals
who write application programs. They can choose from many tools
to develop user interfaces.
• Sophisticated Users : They interact with the system without
writing programs. They form their requests in database query
language. As analyst, they use Online Analytical
Processing(OLAP) tool to analyze the statistical data and use
Data Mining tools for generating certain kinds of patterns in data.
DB ARCHITECTURE
30
• DATABASE ADMINISTRATOR (DBA)
• DBA is a person one who has central control of both the data and
programs that access those data.
• The functions of DBA include :
• Schema Definition
• Storage structures and access-method definition
• Schema and Physical organization modification
• Granting of authorization for data access
• Routine Maintenance Periodic backup,
• upgrading disk space as required.
• Monitoring
DATA MODELS
31
• A collection of conceptual tools for describing
• Data
• Data relationships
• Data semantics
• Data constraints
• Data model provides a way to describe the logical structure of database.
• Data models define how data is connected to each other and how they are
processed and stored inside the system.
DATA MODELS
32
• Types of data model :
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-relational)
• Semi-structured data model (XML)- Semi structured data model is a self describing
data model
• Other older models:
• Network model
• Hierarchical model
DATA MODELS
33
• The Relational Model
• It consists of collection of tables which stores data and represents
relationship among the data.
• Table is called as relation.
• Rows of table are called as tuples and columns of table are called as
field or attribute. The describing properties of table are called
attributes.
• The set of permitted values of attribute are called as domain.
DATA MODELS
34
DATA MODELS
35
• Advantages
– Structural independence
– Improved conceptual simplicity
– Easier database design, implementation, management, and use
– Ad hoc query capability
– Powerful database management system
• Disadvantages
– Substantial hardware and system software overhead
– Can facilitate poor design and implementation
– May promote “islands of information” problems
DATA MODELS
36
• The Entity Relationship Model(ER model)
• This model is popular for high level database design, mainly used to represent
entities and relationships exists between entities.
• Entity : a ‘thing’ or ‘object’ in the real world that is distinguishable from all
other objects. E.g. Each student in a college is an entity.
• Relationship : used to provide association between two or more entities
DATA MODELS
37
• This model represents overall logical structure of a database
• It is an aid for database design
• It is easy to visualize and understand
DATA MODELS
38
DATA MODELS
39
• Advantages
– Exceptional conceptual simplicity
– Visual representation
– Effective communication tool
– Integrated with the relational data model
• Disadvantages
– Limited constraint representation
– Limited relationship representation
– No data manipulation language
– Loss of information content
DATA MODELS
40
• Object-based data models (Object-oriented and Object-relational)
• Models both data and their relationships in a single structure
known as an object.
• Object: abstraction of a real-world entity
• Attributes describe the properties of an object
• Objects that share similar characteristics are grouped in classes.
• Includes information about relationships between facts within object and
relationships with other objects.
• Classes are organized in a class hierarchy
• Inheritance is the ability of an object within the class hierarchy to inherit
the attributes and methods of classes above it
DATA MODELS
41
• The object oriented data model extends the definition of an entity
to include, not only the attributes that describe the state of the
object but also the actions that are associated with the object, that
is, its behavior.
DATA MODELS
42
• Advantages
-Adds semantic content
-Reusability (inheritance, polymorphism)
-Support for schema evolution
-Improved performance
• Disadvantages
-Lack of universal data model
-Lack of experience
-Complex
DATA MODELS
43
• Semi-structured data model (XML) :
• Permits specification of data where individual data items of same
type may have different sets of attributes.
• The semi-structured model is a database model where there is
no separation between the data and the schema, and the amount
of structure used depends on the purpose.
DATA MODELS
44
• Advantages:
• It can represent the information of some data sources that cannot be
constrained by schema.
• It provides a flexible format for data exchange between different types of
databases.
• It can be helpful to view structured data as semi-structured (for browsing
purposes).
• The schema can easily be changed.
• The data transfer format may be portable.

More Related Content

Similar to Unit-I mech for studendts for btech .ppt

Similar to Unit-I mech for studendts for btech .ppt (20)

DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
1-introduction to DB.pdf
1-introduction to DB.pdf1-introduction to DB.pdf
1-introduction to DB.pdf
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)
 
Dbms
DbmsDbms
Dbms
 
Dbms Useful PPT
Dbms Useful PPTDbms Useful PPT
Dbms Useful PPT
 
CST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptxCST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptx
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptx
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
PHP/MySQL First Session Material
PHP/MySQL First Session MaterialPHP/MySQL First Session Material
PHP/MySQL First Session Material
 
Database Management System.pptx
Database Management System.pptxDatabase Management System.pptx
Database Management System.pptx
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
DBMS introduction
DBMS introductionDBMS introduction
DBMS introduction
 
Intro.pptx
Intro.pptxIntro.pptx
Intro.pptx
 
Chapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management SystemsChapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management Systems
 
Database
DatabaseDatabase
Database
 
Beginning Of DBMS (data base)
Beginning Of DBMS (data base)Beginning Of DBMS (data base)
Beginning Of DBMS (data base)
 
Database Systems
Database SystemsDatabase Systems
Database Systems
 
Database Management.pptxqqwwqwqwqqweqwqw
Database Management.pptxqqwwqwqwqqweqwqwDatabase Management.pptxqqwwqwqwqqweqwqw
Database Management.pptxqqwwqwqwqqweqwqw
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

Unit-I mech for studendts for btech .ppt

  • 1. 1 Introduction to Database Management System
  • 2. 2 DBMS File System DBMS is a collection of data. In DBMS, the user is not required to write the procedures. File system is a collection of data. In this system, the user has to write the procedures for managing the database. DBMS gives an abstract view of data that hides the details. File system provides the detail of the data representation and storage of data. DBMS provides a crash recovery mechanism, i.e., DBMS protects the user from the system failure. File system doesn't have a crash mechanism, i.e., if the system crashes while entering some data, then the content of the file will lost. DBMS provides a good protection mechanism. It is very difficult to protect a file under the file system. DBMS contains a wide variety of sophisticated techniques to store and retrieve the data. File system can't efficiently store and retrieve the data. DBMS takes care of Concurrent access of data using some form of locking. In the File system, concurrent access has many problems like redirecting the file while other deleting some information or updating some information.
  • 4. PURPOSE OF DATABASE SYSTEM 4 • Database : It is the collection of interrelated and meaningful data. • Database Management System(DBMS) : • DBMS contains information about a particular enterprise • Collection of interrelated data • Set of programs to access the data • An environment that is both convenient and efficient to use • Goal of DBMS : The primary goal of DBMS is to provide a way to store and retrieve database information that is both convenient and efficient.
  • 5. PURPOSE OF DATABASE SYSTEM 5 • Characteristics of DBMS : • It provides secure and survivable medium for storage and retrieval of data • It deals with management of data. • Defining structures for storing information • Providing mechanism for the manipulation of information • The system must ensure the safety of information stored , despite system crashes. • The data can be shared among several users and it is persistent.
  • 6. PURPOSE OF DATABASE SYSTEM 6 Database System Applications : Banking : For Account, Loan and Customer information Airlines : For reservations and Schedule information Universities : For Student information , Regulation and Academic activities Credit Card Transactions : For purchases on credit cards and generation of monthly statements. Telecommunications : For keeping records of calls, generating monthly bill, maintaining balances on prepaid calling cards and storing information on the communication networks. Finance : For storing information about holdings, sales and purchases of financial instruments such as stocks and bonds
  • 7. PURPOSE OF DATABASE SYSTEM 7 • Sales : For customer, product, and purchase information • Manufacturing : For tracking production of items in factories, inventory and ordering of items • Human Resources : For information about employees, salaries, payroll taxes and benefits. • Multimedia Databases : For storage and archival of Audio and Video files in online applications • Web databases : For keeping track of several web pages • Data Mining : For discovery of new knowledge
  • 8. Database System Verses File Systems 8 • The information can be either a conventional file processing system or a database system. • In conventional file processing system, each and every subsystem of information system will have its own set of files and it leads to duplication. • But in DBMS, there is a single centralized database which minimizes the data redundancy of data to a greater extent.
  • 9. PURPOSE OF DATABASE SYSTEM 9 • Database : It is the collection of interrelated and meaningful data. • Database Management System(DBMS) : • DBMS contains information about a particular enterprise • Collection of interrelated data • Set of programs to access the data • An environment that is both convenient and efficient to use • Goal of DBMS : The primary goal of DBMS is to provide a way to store and retrieve database information that is both convenient and efficient.
  • 10. PURPOSE OF DATABASE SYSTEM 10 • Characteristics of DBMS : • It provides secure and survivable medium for storage and retrieval of data • It deals with management of data. • Defining structures for storing information • Providing mechanism for the manipulation of information • The system must ensure the safety of information stored , despite system crashes. • The data can be shared among several users and it is persistent.
  • 11. PURPOSE OF DATABASE SYSTEM 11 Database System Applications : Banking : For Account, Loan and Customer information Airlines : For reservations and Schedule information Universities : For Student information , Regulation and Academic activities Credit Card Transactions : For purchases on credit cards and generation of monthly statements. Telecommunications : For keeping records of calls, generating monthly bill, maintaining balances on prepaid calling cards and storing information on the communication networks. Finance : For storing information about holdings, sales and purchases of financial instruments such as stocks and bonds
  • 12. PURPOSE OF DATABASE SYSTEM 12 • Sales : For customer, product, and purchase information • Manufacturing : For tracking production of items in factories, inventory and ordering of items • Human Resources : For information about employees, salaries, payroll taxes and benefits. • Multimedia Databases : For storage and archival of Audio and Video files in online applications • Web databases : For keeping track of several web pages • Data Mining : For discovery of new knowledge
  • 13. Database System Verses File Systems 13 • The information can be either a conventional file processing system or a database system. • In conventional file processing system, each and every subsystem of information system will have its own set of files and it leads to duplication. • But in DBMS, there is a single centralized database which minimizes the data redundancy of data to a greater extent.
  • 14. ADVANTAGES OF DBMS 14 • Redundancy can be reduced • Inconsistency can be avoided • Data can be shared • Standards can be enforced • Security restrictions can be applied • Integrity can be maintained • Conflicting requirements can be balanced
  • 15. DIS ADVANTAGES OF DBMS 15 • Complexity and Size • Additional hardware Cost • Cost of conversion • Performance • High impact of failure
  • 16. DML 16 • Deals with • The insertion of new information into database. • The retrieval of information stored in the database • The deletion of information from the database • The modification of information in the database
  • 19. DML COMMANDS 19 • Two types of DML : • Procedural DML : Require a user to specify what data are needed and how to get those data. E.g. Relational Algebra • Non Procedural DML : Require a user to specify what data are needed without specifying how to get those data. E.g. Tuple Relational Calculus • Query Language : The portion of DML that involves information retrieval is called query language. A query is statement requesting the retrieval of information . • E.g Select statement is the example of query.
  • 21. DB ARCHITECTURE 21 • A database system is partitioned into modules that deal with each of the responsibilities of the overall system. • The main functional components of database system are : • Storage Manager : It which handles the storage space required for database manager. • Query Processor :It helps the database system simplify and facilitate access to data.
  • 23. DB ARCHITECTURE 23 • Storage Manager : • Since the storage space for corporate databases ranges in the size from hundreds of gigabytes to terabytes of data, the main memory cannot handle such large amount of data and hence disk can be used.
  • 24. DB ARCHITECTURE 24 • Functions • It is the program module that provides the interface between the low-level data stored in database and application programs and queries submitted to the system. • It translates the various DML statements into low-level system commands. • It is responsible for storing, retrieving and updating the data.
  • 25. DB ARCHITECTURE 25 • Components • Authorization and Integrity Manager : Performs the test for ensuring Integrity constraint and authority of user. • Transaction Manager : Ensures that database remains in a consistent state despite system failure, and that concurrent transaction execution proceed without conflicting. • File Manager : It manages the allocation of space on the disk storage and the data structures used to represent information stored on the disk. • Buffer Manager : It is responsible for fetching data from disk storage into main memory and deciding what data to cache in main memory. It enables the database to handle data sizes that are larger than the size of main memory.
  • 26. DB ARCHITECTURE 26 • Data Structures used by the Storage Manager • Data Files : It store the database itself • Data Dictionary : It stores the metadata about the structure of the database, in particular the schema of the database. Metadata means data about the data. • Indices : It provide fast access to data items that hold particular values.
  • 27. DB ARCHITECTURE 27 • Query Processor : • DDL Interpreter : It interprets DDL statement and records the definition in data dictionary. • DML Compiler : It translates the DML statement in query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands. It performs the query optimization for finding the lowest cost evaluation plan. • Query Evaluation Engine : It executes low-level instructions generated by the DML compiler.
  • 28. DB ARCHITECTURE 28 • DATABASE USERS : • There are three types of database-system users, differentiated by the way they expect to interact with the system. • Naive Users : They are unsophisticated users who interact with the system by invoking one of application programs that have been written previously. These users interact with the system using forms interface.
  • 29. DB ARCHITECTURE 29 • Application Programmers : They are computer professionals who write application programs. They can choose from many tools to develop user interfaces. • Sophisticated Users : They interact with the system without writing programs. They form their requests in database query language. As analyst, they use Online Analytical Processing(OLAP) tool to analyze the statistical data and use Data Mining tools for generating certain kinds of patterns in data.
  • 30. DB ARCHITECTURE 30 • DATABASE ADMINISTRATOR (DBA) • DBA is a person one who has central control of both the data and programs that access those data. • The functions of DBA include : • Schema Definition • Storage structures and access-method definition • Schema and Physical organization modification • Granting of authorization for data access • Routine Maintenance Periodic backup, • upgrading disk space as required. • Monitoring
  • 31. DATA MODELS 31 • A collection of conceptual tools for describing • Data • Data relationships • Data semantics • Data constraints • Data model provides a way to describe the logical structure of database. • Data models define how data is connected to each other and how they are processed and stored inside the system.
  • 32. DATA MODELS 32 • Types of data model : • Relational model • Entity-Relationship data model (mainly for database design) • Object-based data models (Object-oriented and Object-relational) • Semi-structured data model (XML)- Semi structured data model is a self describing data model • Other older models: • Network model • Hierarchical model
  • 33. DATA MODELS 33 • The Relational Model • It consists of collection of tables which stores data and represents relationship among the data. • Table is called as relation. • Rows of table are called as tuples and columns of table are called as field or attribute. The describing properties of table are called attributes. • The set of permitted values of attribute are called as domain.
  • 35. DATA MODELS 35 • Advantages – Structural independence – Improved conceptual simplicity – Easier database design, implementation, management, and use – Ad hoc query capability – Powerful database management system • Disadvantages – Substantial hardware and system software overhead – Can facilitate poor design and implementation – May promote “islands of information” problems
  • 36. DATA MODELS 36 • The Entity Relationship Model(ER model) • This model is popular for high level database design, mainly used to represent entities and relationships exists between entities. • Entity : a ‘thing’ or ‘object’ in the real world that is distinguishable from all other objects. E.g. Each student in a college is an entity. • Relationship : used to provide association between two or more entities
  • 37. DATA MODELS 37 • This model represents overall logical structure of a database • It is an aid for database design • It is easy to visualize and understand
  • 39. DATA MODELS 39 • Advantages – Exceptional conceptual simplicity – Visual representation – Effective communication tool – Integrated with the relational data model • Disadvantages – Limited constraint representation – Limited relationship representation – No data manipulation language – Loss of information content
  • 40. DATA MODELS 40 • Object-based data models (Object-oriented and Object-relational) • Models both data and their relationships in a single structure known as an object. • Object: abstraction of a real-world entity • Attributes describe the properties of an object • Objects that share similar characteristics are grouped in classes. • Includes information about relationships between facts within object and relationships with other objects. • Classes are organized in a class hierarchy • Inheritance is the ability of an object within the class hierarchy to inherit the attributes and methods of classes above it
  • 41. DATA MODELS 41 • The object oriented data model extends the definition of an entity to include, not only the attributes that describe the state of the object but also the actions that are associated with the object, that is, its behavior.
  • 42. DATA MODELS 42 • Advantages -Adds semantic content -Reusability (inheritance, polymorphism) -Support for schema evolution -Improved performance • Disadvantages -Lack of universal data model -Lack of experience -Complex
  • 43. DATA MODELS 43 • Semi-structured data model (XML) : • Permits specification of data where individual data items of same type may have different sets of attributes. • The semi-structured model is a database model where there is no separation between the data and the schema, and the amount of structure used depends on the purpose.
  • 44. DATA MODELS 44 • Advantages: • It can represent the information of some data sources that cannot be constrained by schema. • It provides a flexible format for data exchange between different types of databases. • It can be helpful to view structured data as semi-structured (for browsing purposes). • The schema can easily be changed. • The data transfer format may be portable.