Architecture
Architecture
and Architecture
2
The Levels of Abstraction
Three level ANSI/SPARC architecture
External Level
(Individual User View)
concerned with the way the data is
seen by individual users
Conceptual Level
(Community User View)
a level of indirection between the other two
Internal level
(Storage View)
concerned with the way the data is
stored inside the system
3
What is in each Level?
Implementation level: defined in machine-
◆ Internal Level oriented constructs such as bits and bytes
◼ Data storage details, access path
5
The External Level (Individual User Level)
15
DBMS Component Modules
The dotted
lines and
5
2 circles
4 illustrate
Canned transactions accesses that
are under the
1
control of
3 stored data
manager
16
DBMS Component Modules
◆ Stored Data Manager
◼ May use basic OS services to carry out low-level
data transfer b/w the disk and main storage
◼ But it controls other aspects of data transfer, such
as handling buffers in main mem
◆ Once the data is in the main mem buffers, it can
be processed by other DBMS modules, as well
as by application programs
◆ Some DBMS have their own buffer manager
module, while others use the OS for handling
the buffering of disk pages 17
DBMS Component Module:
DDL Compiler
Human Interfaces
Data Dictionary
Software and
DBMS Interfaces
Integrity
Compilers / Application Programs / Constraint
Precompilers Report Generators Enforcer
27
Utilities – Some Examples
◼ Load routines: Loading data stored in files into a database.
Includes data conversion tools
◼ Dump/Restore routines: periodic database backup on tape
◼ Reorganization routines: to rearrange data in the stored DB
for various reasons (usually performance)
◆ For ex: to cluster data in some particular way on disk, or to
reclaim space occupied by logically deleted data
◼ Report generation utilities
◼ Performance monitoring or Statistical utilities
◼ Analysis routines: to analyze the statistics just mentioned
◼ Other functions, such as sorting, monitoring access by users,
data compression, etc.
28
Classification of DBMSs
◼ Based on the data model used:
◆ Traditional: Relational, Network, Hierarchical
◆ Object-oriented, Object-relational
◆ NoSQL (“not only SQL” or “non-SQL”)
◼ Other classifications:
◆ Single-user (typically used with personal
computers) vs. multi-user (most DBMSs).
◆ Centralized (uses a single computer with one
database) vs. distributed (uses multiple computers,
multiple databases)
29
How the Programmer Sees the
DBMS
◆ Start with DDL to create tables:
IF everything-went-OK
THEN COMMIT;
ELSE ROLLBACK
If system crashes, the transaction is still either committed or aborted 32
Transactions
◆ A transaction = sequence of statements that either all
succeed, or all fail
◆ Transactions have the ACID properties:
SELECT C.name
FROM Students S, Registers R, Courses C
WHERE S.name=“Rakesh” and
S.Rollno = R.Rollno and R.Cid = C.Cid
34
DBMS Interfaces
◆ User-friendly interfaces
◼ Menu-based, forms-based, graphics-based, etc.
35
DBMS Programming Language
Interfaces
◆ Forembedding DML in a programming
languages:
◼ Embedded Approach: e.g., embedded SQL (for C,
C++, etc.), SQLJ (for Java)
◼ Procedure Call Approach: e.g., JDBC for Java,
ODBC for other programming languages
◼ Database Programming Language Approach:
e.g., ORACLE has PL/SQL, a programming
language based on SQL; incorporates SQL and its
data types as integral components
36
User-Friendly DBMS Interfaces
38