DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data...

20
DBMS ARCHITECTURE

Transcript of DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data...

Page 1: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

DBMS ARCHITECTURE

Page 2: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

What is a Database?

Definition: A database is a well organized collection of data that are related

in a meaningful way which can be accessed in different logical orders but are stored only once. The data in the database is therefore integrated, structured, and shared.

The main features of data in a database:1. It is well organized 2. It is related 3. It is accessable in different orders without great difficulty 4. It is stored only once

We note that data is 1. a valuable resource and an investment 2. needed to manage other resources efficiently 3. should be managed like other resources (e.g. manpower)

Page 3: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

What is a DBMS?

To be able to carry out operations like insertion, deletion and retrieval, the database needs to be managed by a substantial package of software is usually called a Database Management System (DBMS)

A DBMS is usually a very large software package that carries out many different tasks including the provision of facilities to enable the user to access and modify information in the database

Data Description Languages (DDL) and Data Manipulation Languages (DML) are needed for manipulating and retrieving data stored in the DBMS. These languages are called respectively

Page 4: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Advantages of using a DBMS

There are three main features of a database management system that make it attractive to use a DBMS:

are centralized data management data independence systems integration

Some of the advantages are: 1. Redundancies and inconsistencies can be reduced 2. Better service to the Users 3. Flexibility of the system is improved 4. Cost of developing and maintaining systems is lower 5. Standards can be enforced 6. Security can be improved 7. Integrity can be improved 8. Enterprise requirements can be identified 9. Data model must be developed

Page 5: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Disadvantages of using a DBMS

A database system generally provides on-line access to the database for many users. Because of the larger number of users accessing the data when a database is used, the enterprise may involve additional risks as compared to a conventional data processing system in the following areas:

1. Confidentiality, privacy and security. 2. Data quality. 3. Data integrity. 4. Enterprise vulnerability may be higher. 5. The cost of using DBMS.

Page 6: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

DBMS Architecture

One of the many tasks that DBAs must handle is choosing the correct DBMS to use for each new application being developed

There are many aspects to selecting the proper type of DBMS - there are different types of each DBMS for different architectures and purposes.

Final architecture must be based on the business needs of the organization, not be made by a single person or group, but by a team consisting of business experts and IT experts

The DBMS selected is appropriate for the nature and type of processing plan to implemented. There are basically four levels of DBMS architecture that can be selected:

1. Enterprise2. Departmental3. Personal4. Mobile

Page 7: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Enterprise DBMS is designed for scalability and high performance. It must be

capable of supporting very large databases, a large number of concurrent users, and multiple types of applications. The enterprise DBMS will run on a large-scale machine, typically a mainframe or a high-end Unix, Linux, or Windows NT machine. Furthermore, an enterprise DBMS offers all of the “bells and whistles” available from the DBMS vendor. Multi-processor support, support for parallel queries, clustering, and other advanced DBMS features will be core components of an enterprise DBMS.

DBMS Architecture…cont

Page 8: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Departmental DBMS sometimes referred to as a workgroup DBMS, supports small to

medium sized workgroups within an organization, and typically runs on a Unix, Linux, or Windows 2000 (or NT) server. The dividing line between a departmental database server and an enterprise database server is gray. Hardware and software upgrades often can allow a departmental DBMS to tackle tasks that previously could only be performed by an enterprise DBMS. The steadily falling cost of departmental hardware and software components further contributes to lowering TCO and helping to enable a workgroup environment to scale up to serve the enterprise.

DBMS Architecture…cont

Page 9: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Personal DBMS is designed to be used by a single user, typically on a low- to

medium-powered PC platform. Lotus Approach, Microsoft Access and dBase are examples of personal database software. Of course, the major DBMS vendors also market personal versions of their more high-powered solutions, Personal Oracle and DB2 Everyplace for example. Sometimes the low cost of a personal DBMS causes misguided attempts to choose a personal DBMS for a departmental or enterprise solution. But do not be lured by the low cost. A personal DBMS product is suited only for small scale projects and should not be used to deploy multi-user applications.

DBMS Architecture…cont

Page 10: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Mobile DBMS is a specialized version of a departmental or enterprise DBMS.

It is designed to be used by remote users who are not usually connected to the network. The mobile DBMS enables local database access and modification on a laptop or handheld device, such as a Palm PDA or PocketPC. Furthermore, the mobile DBMS provides a mechanism for synchronizing remote database changes to a centralized, enterprise or departmental database server.

DBMS Architecture…cont

Page 11: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

A database management system is a complex piece of software that usually consists of a number of modules

The DBMS may be considered as an agent that allows communication between the various types of users

The information (data) about the data in a database is called the metadata

A DBMS provides facilities for: 1. describing the database, when a database is being set up 2. authorization specification and checking 3. access path selection 4. concurrency control

5. logging and recovery

DBMS Architecture…cont

Page 12: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

The main components of the DBMS therefore are: 1. A Query Language and a Data Description Language (DDL) to provide

users the access to the database. 2. A translator for users' instructions in the query language and the DDL

including query optimization. 3. A Database manager 4. A file manager 5. The physical database

6. The metadata The above listing of DBMS components does not include

some very important components e.g. concurrency controller and recovery manager.

DBMS Architecture…cont

Page 13: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

DBMS Architecture …cont

A commonly used views of data approach is the three-level architecture suggested by ANSI/SPARC (American National Standards Institute/Standards Planning and Requirements Committee). ANSI/SPARC produced an interim report in 1972 followed by a final report in 1977

The three levels of the architecture are three different views of the data:

1. External - individual user view 2. Conceptual - community user view 3. Internal - physical or storage view

Levels of Abstraction in DBMS Architecture

Page 14: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

DBMS Architecture…cont

Web Forms Application Front Ends SQL Interface

Plan Executor

Operator Evaluator

Parser

Optimizer

Files and Access Methods

Buffer Manager

Disk Space Manager

Transaction Manager

Lock Manager

Recovery Manager

Concurrency ControlDBMS

QueryEvaluationEngine

shows interaction

shows command flowSQL COMMANDS

shows references

DATABASES

Index Files

Data Files

System Catalog

Unsophisticated users (customers, travel agents, etc)Sophisticated users, application Programmers, DB administrators

Architecture of a DBMS

Page 15: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Overall System Architecture

A DBMS is typically run as a back-end server in a (local or global) network, offering services to clients directly or to application servers.

Application Program

1

Application Program

1

Request Reply

Request Reply

Encapsulated dataObjects

Exposed data

Stored Data (Pages)

Users/Clients

Application Server

DataServer

Generally, we call this the “3-tier reference architecture

Page 16: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Layered DBMS Architecture

Typically, a DBMS implements its functionality in a layered architecture that builds up by incrementally adding more abstractions from the low level of block I/O devices up to the high level of a declarative (SQL) user interface.

Page 17: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Storage Structures

Whether the DBMS offers relational, object-relational, or other data structures at the user interface, internally they have to be mapped into fixed-length blocks that serve as the basic I/O-unit of transfer between main and secondary memory.

Page 18: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Access Paths

A DBMS typically provides a number of indexing techniques that allow for fast content-based searching of records, such as tree-structured or hash-based methods. Often, the suite of such indexing techniques can be extended to match the requirements of particular applications.

Page 19: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Query Execution

Declarative query specifications, e.g. expressed in SQL, need to be optimized and transformed into efficient query execution plans (QEPs), i.e., sequential or even parallelized programs that compute the results.

Page 20: DBMS ARCHITECTURE. What is a Database? Definition: A database is a well organized collection of data that are related in a meaningful way which can be.

Implementing lock Manager

Most DBMSs use a locking protocol (e.g., 2PL) for concurrency control.

Efficiently implementing the lock manager and exploiting the synchronization primitives offered by the underlying operating system is crucial for a high degree of parallelism.