Sie sind auf Seite 1von 19

Database Architecture

Prepared By:
Quratulain
Database Management System (DBMS)
• A database management system (DBMS) is
software that controls the storage,
organization, and retrieval of data.
• Typically, a DBMS has the following elements:
– Kernel code- This code manages memory and
storage for the DBMS.
The kernel is the central module of an operating system (OS). It is the part of
the operating system that loads first, and it remains in main memory. Because
it stays in memory, it is important for the kernel to be as small as possible while
still providing all the essential services required by other parts of the operating
system and applications. The kernel code is usually loaded into a protected
area of memory to prevent it from being overwritten by programs or other
parts of the operating system.
– Repository of metadata- This repository is usually
called a data dictionary.

Metadata is "data [information] that provides


information about other data".
- Query language- This language enables
applications to access the data.
Relational Model
• A relational database is a database that
conforms to the relational model. The relational
model has the following major aspects:
• Structures -Well-defined objects store or access
the data of a database.
• Operations-Clearly defined actions enable
applications to manipulate the data and
structures of a database.
• Integrity rules-Integrity rules govern operations
on the data and structures of a database.
• A relational database stores data in a set of simple
relations.
– A relation is a set of tuples.
• A tuple is an unordered set of attribute values.
• A table is a two-dimensional representation of a relation
in the form of rows (tuples) and columns (attributes).
– Each row in a table has the same set of columns.
– A relational database is a database that stores data in relations
(tables). For example, a relational database could store
information about company employees in an employee table,
a department table, and a salary table.
Role of the DBA
• Types of Oracle Database Users
• The types of users and their roles and
responsibilities depend on the database site.
– A small site can have one database administrator who
administers the database for application developers
and users.
• A very large site can find it necessary to divide the
duties of a database administrator among several
people and among several areas of specialization.
Architecture
• Logical structure
• Physical structure
• Memory structure
– SGA
– PGA
• Background process
• Oracle server
• SQL Statement Execution
What is logical storage structure?
• Logical structures include tablespaces, schema
objects, data blocks, extents and segments.
• These structures are created and recognized
by Oracle Database and are not known to the
operating system.
• Oracle Database allocates logical space for all
data in the database. The logical units of
database space allocation are data blocks,
extents, segments, and tablespaces.
• At a physical level, the data is stored in data
files on disk . The data in the data files is
stored in operating system blocks.
Description of extents , segment and data block with in table
space
Logical storage structure
• Oracle Database stores data in data blocks.

• Data block:
• One logical data block corresponds to a specific number of bytes of
physical disk space, for example, 2 KB.
• Data blocks are the smallest units of storage that Oracle Database can
use or allocate

• Extents: An extent represents continuous data blocks that are used to


store specific data information.
– An extent is a set of logically contiguous data blocks allocated for storing a
specific type of information. the 24 KB extent has 12 data blocks, while the 72
KB extent has 36 data blocks.
• A segment is a set of extents allocated for a
specific database object, such as a table.
– For example, the data for the employees table is
stored in its own data segment, whereas each
index for employees is stored in its own index
segment.
• Every database object that consumes storage
consists of a single segment.
Table space
• Database is logically divided into one or more
tablespaces. Each tablespace creates one or more
datafiles to physically store data.
– Each segment belongs to one and only one tablespace.
Thus, all extents for a segment are stored in the same
tablespace.
– Within a tablespace, a segment can include extents from
multiple data files.
– For example, one extent for a segment may be stored in
users01.dbf, while another is stored in users02.dbf. A single
extent can never span data files.
Physical database structure
• One characteristic of an RDBMS is the independence
of logical data structures such as tables, views, and
indexes from physical storage structures.

Because physical and logical structures are


separate, you can manage physical storage of data
without affecting access to logical structures. For
example, renaming a database file does not rename
the tables stored in it.
• The physical database structure comprises of
datafiles, redo log files and control files
Datafiles
Datafiles contain database's data.
• The data of logical data structures such as tables
and indexes is stored in datafiles of the database.
• One or more datafiles form a logical unit of
database storage called a tablespace.
• Redo log files
The purpose of these files is to record all changes made
to data. These files protect database against failures.

Control files
A control file is a root file that tracks the physical
components of the database.
• Control files contain entries such as database name,
name and location of data files and redo log files and
time stamp of database creation

Das könnte Ihnen auch gefallen