Uploaded by cchirag5003

xyz

advertisement
DBMS
Level of Abstraction
●
●
●
Physical level: describes how a record is stored.
Logical level: describes data stored in database, and the relationships
among the data.
View level: application programs hide details of data types. Views can also
hide information (such as an employee’s salary) for security purposes.
View of the Data
Instances and Schemas
●
●
Scheme: The description of the database is the database schema.
Schema includes the definition of the database name, the record type and
the components that make up those records.
● External schema: correspond to different views of the data.
● Logical Schema – the overall logical structure of the database.
● Physical schema– the overall physical structure of the database
Instance – The data in the database at any particular point in time
● External view is described by means of a schema called
external schema that correspond to different views of the
data.
● Similarly the Conceptual view is defined by conceptual
schema, which describes all the entities, attributes, and
relationship together with integrity constraints.
● Internal View is defined by internal schema, which is a
complete description of the internal model, containing
definition of stored records, the methods of
representation, the data fields, and the indexes used.
Database users and Administrators
Users
❏ Naive users are unsophisticated users who interact with the system
by invoking one of the application programs that have been written
previously.
❏ Application programmers are computer professionals who write
application programs. Application programmers can choose from
many tools to develop user interfaces.
❏ Sophisticated users interact with the system without writing
programs. Instead, they form their requests either using a database
query language or by using tools such as data analysis software.
❏
Specialized Users
❏ Specialized users are sophisticated users who write specialized
database applications that do not fit into the traditional
data-processing framework.
❏ Among these applications are computer-aided design systems,
knowledge base and expert systems, systems that store data with
complex data types
DBA
A person who has such central control over the system is called a database
administrator (DBA).
● Schema Definition
● Storage Structure
● Schema and Physical organization modification
● Granting of authorization for data access
● Routine maintenance
Database Engine
●
●
●
Storage manager
Query processing
Transaction manager
Storage Management
●
●
●
Storage manager is a program module that provides the interface between
the low-level data stored in the database and the application programs and
queries submitted to the system.
The storage manager is responsible to the following tasks:
● Interaction with the OS file manager
● Efficient storing, retrieving and updating of data
Issues:
● Storage access
● File organization
● Indexing and hashing
Query Processing
1. Parsing and
translation
2. Optimization
3. Evaluation
Query Processing
●
●
●
Alternative ways of evaluating a given query
● Equivalent expressions
● Different algorithms for each operation
Cost difference between a good and a bad way of evaluating a query can be
enormous
Need to estimate the cost of operations
● Depends critically on statistical information about relations which the
database must maintain
● Need to estimate statistics for intermediate results to compute cost of
complex expressions
Transaction Management
●
●
●
●
●
What if the system fails?
What if more than one user is concurrently updating the same data?
A transaction is a collection of operations that performs a single logical
function in a database application
Transaction-management component ensures that the database remains in
a consistent (correct) state despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
Concurrency-control manager controls the interaction among the
concurrent transactions, to ensure the consistency of the database.
Database System Internals
Contd…
●
●
●
●
Authorization and integrity manager, tests for the satisfaction of
integrity constraints and checks the authority of users to access data.
Transaction manager, ensures that the database remains in a consistent
(correct) state despite system failures, and that concurrent transaction
executions proceed without conflicting.
File manager, manages the allocation of space on disk storage and the
data structures used to represent information stored on disk.
Buffer manager, is responsible for fetching data from disk storage into
main memory, and deciding what data to cache in main memory. The buffer
manager is a critical part of the database system, since it enables the
database to handle data sizes that are much larger than the size of main
memory.
Contd…
●
●
Data dictionary, which stores metadata about the structure of the database,
in particular the schema of the database.
Indices, which can provide fast access to data items.
Data files, which store the database itself.
Contd…
●
●
●
●
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.
A query can usually be translated into any of a number of alternative
evaluation plans that all give the same result. The DMLcompiler 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.
History of Database systems
●
●
1950s and early 1960s:
● Data processing using magnetic tapes for storage
● Tapes provided only sequential access
● Punched cards for input
Late 1960s and 1970s:
● Hard disks allowed direct access to data
● Network and hierarchical data models in widespread use
● Ted Codd defines the relational data model
● Would win the ACM Turing Award for this work
● IBM Research begins System R prototype
● UC Berkeley begins Ingres prototype
● High-performance (for the era) transaction processing
History of Database systems
●
●
●
●
1980s:
● Research relational prototypes evolve into commercial systems
● SQL becomes industrial standard
● Parallel and distributed database systems
● Object-oriented database systems
1990s:
● Large decision support and data-mining applications
● Large multi-terabyte data warehouses
● Emergence of Web commerce
Early 2000s:
● XML and XQuery standards
● Automated database administration
Later 2000s:
Thanks
Download