+ All Categories
Home > Documents > Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS...

Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS...

Date post: 13-Sep-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
26
Structure of a DBMS
Transcript
Page 1: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

Page 2: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

A database system is partitioned into modules thatdeal with each of the responsibilities of the overallsystem.

The functional components of a database systemcan be broadly divided into the storage manager andthe query processor components.

The storage manager is important because databasestypically require a large amount of storage space.

Page 3: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

The query processor is important because ithelps the database system to simplify andfacilitate access to data.

It is the job of the database system to translateupdates and queries written in a nonprocedurallanguage, at the logical level, into an efficientsequence of operations at the physical level.

Page 4: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

Query Processor

• The query processor components include

• DDL interpreter, which interprets DDL statements and records the definitions in the data dictionary.

• DML compiler, which translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands.

Page 5: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

• A query can usually be translated into any of a number of alternative evaluation plans that all give the same result. The DML compiler also performs query optimization, that is, it picks the lowest cost evaluation plan from among the alternatives.

• Query evaluation engine, which executes low-level instructions generated by the DML compiler.

Page 6: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

Storage Manager

• A storage manager is a program module that provides the interface between the lowlevel data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible for the interaction with the file manager. The raw data are stored on the disk using the file system, which is usually provided by a conventional operating system. The storage manager translates the various DML statements into low-level file-system commands. Thus, the storage manager is responsible for storing, retrieving, and updating data in the database.

Page 7: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

The storage manager components include:

• Authorization and integrity manager, whichtests for the satisfaction of integrityconstraints and checks the authority of usersto access data.

• Transaction manager, which ensures thatthe database remains in a consistent(correct) state despite system failures, andthat concurrent transaction executionsproceed without conflicting.

Page 8: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

The storage manager components include:

• File manager, which manages the allocation ofspace on disk storage and the data structuresused to represent information stored on disk.

• Buffer manager, which is responsible forfetching data from disk storage into mainmemory, and deciding what data to cache inmain memory. The buffer manager is a criticalpart of the database system, since it enables thedatabase to handle data sizes that are muchlarger than the size of main memory.

Page 9: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMSTransaction Manager

• A transaction is a collection of operations that performs a single logical function in a database application.

• Each transaction is a unit of both atomicity and consistency. Thus, we require that transactions do not violate any database-consistency constraints. That is, if the database was consistent when a transaction started, the database must be consistent when the transaction successfully terminates.

Page 10: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Structure of a DBMS

Transaction Manager

• Transaction - manager ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures.

Page 11: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Database Users

1. Database Administrator (DBA):

DBA Stands for Database Administrator.

• It is a person or a team, who is responsible for managing the overall database management system.

• It is the leader of the database. It is like a super-user of the system.

• It is responsible for the administration of all the three levels of the database.

Page 12: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Database Users

1. Database Administrator (DBA):

DBA is responsible for:

• Deciding the instances for the database.

• Defining the Schema

• Liaising with Users

• Define Security

• Back-up and Recovery

• Monitoring the performance

Page 13: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Database Users

2. Database Designers:

• Database designers design the appropriate structure for the database, where we share data.

3. System Analyst:

• System analyst analyses the requirements of end users, especially naïve and parametric end users.

4. Application Programmers:

• Application programmers are computer professionals, who write application programs.

Page 14: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Database Users

5. Naïve Users / Parametric Users:• Naïve Users are Un-sophisticated users, which has

no knowledge of the database. These users are like a layman, which has a little bit of knowledge of the database.

• Naive Users are just to work on developed applications and get the desired result.

• For Example: Railway’s ticket booking users are naive users. Or Clerical staff in any bank is a naïve user because they don’t have any DBMS knowledge but they still use the database and perform their given task.

Page 15: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Database Users

6. Sophisticated Users:

• Sophisticated users can be engineers, scientists, business analyst, who are familiar with the database. These users interact with the database but they do not write programs

7. Casual Users / Temporary Users:

• These types of users communicate with the database for a little period of time.

Page 16: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Levels of Database

Before we learn Data Independence, a refresher on Database Levels is important. The database has 3 levels as shown in the diagram below

Physical/Internal

Conceptual

External

Page 17: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Levels of DBMS Architecture Diagram

Page 18: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Data Independence in DBMS

What is Data Independence of DBMS?

• Data Independence is defined as a property of DBMS that helps to change the Database schema at one level of a database system without requiring to change the schema at the next higher level.

• Data independence helps to keep data separated from all programs that make use of it.

• In many systems, data independence is an essential function for components of the system.

Page 19: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Types of Data Independence

In DBMS there are two types of data independence

• Physical data independence

• Logical data independence.

Page 20: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Physical Data Independence

Physical data independence helps to separate conceptual levels from the internal/physical levels.

It allows to provide a logical description of the database without the need to specify physical structures.

Compared to Logical Independence, it is easy to achieve physical data independence.

Page 21: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Physical Data Independence

With Physical independence, we can easily change the physical storage structures or devices with an effect on the conceptual schema.

Any change done would be absorbed by the mapping between the conceptual and internal levels.

Physical data independence is achieved by the presence of the internal level of the database and then the transformation from the conceptual level of the database to the internal level.

Page 22: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Logical Data Independence

Logical Data Independence is the ability to change the conceptual scheme without changing

• External views

• External API or programs

Any change made will be absorbed by the mapping between external and conceptual levels.

When compared to Physical Data independence, it is challenging to achieve logical data independence.

Page 23: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Difference between Physical and Logical

Data Independence

Logical Data Independence Physical Data Independence

Logical Data Independence is mainly concerned with the structure or changing the data definition.

Mainly concerned with the storage of the data.

It is difficult as the retrieving of data is mainly dependent on the logical structure of data.

It is easy to retrieve.

Compared to Logic Physical independence it is difficult to achieve logical data independence.

Compared to Logical Independence it is easy to achieve physical data independence.

Page 24: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Difference between Physical and Logical

Data Independence

Logical Data Independence Physical Data Independence

You need to make changes in the Application program if new fields are added or deleted from the database.

A change in the physical level usually does not need change at the Application program level.

Modification at the logical levels is significant whenever the logical structures of the database are changed.

Modifications made at the internal levels may or may not be needed to improve the performance of the structure.

Concerned with conceptual schema Concerned with internal schema

Example: Add/Modify/Delete a new attribute

Example: change in compression techniques, hashing algorithms, storagedevices, etc

Page 25: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

Importance of Data Independence

• Helps you to improve the quality of the data• Database system maintenance becomes affordable• Enforcement of standards and improvement in

database security• You don't need to alter data structure in application

programs• Permit developers to focus on the general structure

of the Database rather than worrying about the internal implementation

• It allows you to improve state which is undamaged or undivided

• Database incongruity is vastly reduced.• Easily make modifications in the physical level is

needed to improve the performance of the system.

Page 26: Structure of a DBMSlnmuacin.in/studentnotice/2020/dbms1.pdf · 2020. 4. 23. · Structure of a DBMS Query Processor •The query processor components include •DDL interpreter, which

THANK YOU


Recommended