Relational DBMSs


What is an RDBMS?

A relational database management system (RDBMS) is

Note: databases provide persistent storage of information

Description of Data

RDBMSs implement the relational model.

Provide facilities to define:

Variations from the relational model:

RDBMS Operations

RDBMSs typically provide at least the following operations:

Most also provide mechanisms for

Access to Data

All modern RDBMSs provide access to the data via SQL.

Each RDBMS has its own dialect the SQL standard.

Most provide SQL via one or more of

Some operations are also implemented as utility commands

e.g. PostgreSQL's createdb, dropdb, createuser, ...


Access to Data (cont)

RDBMSs also provide access to meta-data (catalog).

Meta-data typically presented as collection of tables.

A standard INFORMATION_SCHEMA exists for meta-data.

DB users interact with catalog via meta-commands:

DB admin typically also has SQL access to catalog.

Schema/Data Import/Export

RDBMSs typically provide mechanisms for

Available via command line or interactive SQL shell.

Query Engine

RDBMS query engines implement RA operations


Privilege/Protection

RDBMSs typically provide role-based user management:

Authentication via username/password gives access to DBs.

Roles determine what can be done within a DB.


Transactions/Concurrency

Often in application programming

To faithfully represent the application-level operation: If the transaction fails partway Transactions treat a group of DBMS operations as atomic.

Transactions/Concurrency (cont)

For serious applications, the RDBMS must be ACID ...

Atomicity Either all operations of transaction are reflected in database or none are.
Consistency Execution of a transaction in isolation preserves data consistency (i.e. maps a valid DB to a valid DB).
Isolation Transactions are "unaware" of other transactions executing concurrently.
Durability After successful transaction, changes persist even if system later fails.

DBMSs with these properties provide a strong guarantee that any update operation will result in a valid database (no corruption).


RDBMS Architecture

Typical client-server architecture for modern RDBMS:

[Diagram:Pic/dbmsarch.png]

Core of RDBMS = a relational algebra engine.


Examples of RDBMSs

Examples of ACID (serious) database management systems:


Examples of RDBMSs (cont)

Most serious RDBMS's

Typical variations:

DB/Application Interaction

Database applications typically involve:

Code in multiple languages, stored in different places.

Interaction between app.code and DBMS


DB/Application Interaction (cont)

A typical DB application has several types of code:

Multiple code sources software management problems: Patterns such as Model-View-Controller aim to manage this.

DB/Application Interaction (cont)

Perfomance issues with data-intensive applications

These suggest that

Software engineering suggests minimal interaction between layers.

This conflict is not yet well-resolved.


DB/Application Interaction (cont)

Standard paradigm for accessing DB from app.code

--  establish connection to DBMS
db = dbConnect("dbname=X user=Y passwd=Z");
query = "select a,b from R,S where ... ";
--  invoke query and get handle to result set
results = dbQuery(db, query);
--  for each tuple in result set
while (tuple = dbNext(results)) {
    --  process next tuple
    process(val(tuple,'a'), val(tuple,'b'));
}
dbClose(results);


Produced: 13 Sep 2020