• Keine Ergebnisse gefunden

Debit-Credit transaction between Accounts

N/A
N/A
Protected

Academic year: 2022

Aktie "Debit-Credit transaction between Accounts"

Copied!
6
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

1

Database Systems II

Architecture and Implementation of DBS Prof. R. Bayer, SS 99

Chapt. 1 Introduction Chapt. 1.1 Tasks of a DBS

1. Provide the DBS-model: e.g.

• relational model : ralations, views

SQL, System-Schema

• oo – model : class hierarchies methods

• Geo – DBS : geometric objects spatial indexes Geo – SQL

• digital library systems: documents archiving retrieval

• IMS . . .

• Codasyl . . .

2

Goals: high level of abstraction goal conflict efficiency

Example: SQL - - - -

Interpreter

rel. Algebra - - - -

Operators

tuple, attributes - - - - access structures

files and records - - - - File System

Operating System - - - -

HW - - - -

Alltogether 3 – 10 Interfaces

Subtasks: storage of relations translation of SQL identification of tuples indexes, optimization

(2)

2. Multiuser Mode of Operation and Transactions

Goal: common access to large shared datasets

begintrans

{consistency} at user – IF

A1 ; as atomic

A2 ; operation w.r. to .

.

An ; DB – state

{consistency} i.e.

endtrans commit or

abort

⇒ state – transition of the DB must be atomic

achievable by combination of techniques e.g.

synchronization, durability (logging), recovery (including, storage failures), integrity conditions, etc.

ACID – Properties:

A : Atomicity : for author of the transaction I : Isolation : atomicity for others

C : Consistency : correctness of program

or admissibility of the DB-state D: Durability : store data securely and

permanently, survive transactions

Distinguish: transaction – code transaction – execution Question: What is an action?

Question: ACID and single user mode?

(3)

5

Debit-Credit transaction between Accounts

TPC – Benchmark : TPC-A (1989)

Example for key of history?

⇒ long composite key

typical queries:

teller activity?

balance statement?

complete activity Do 16 – 20 h?

acitvity of branch?

⇒ Data – Mining, Data Warehousing

⇒ Integrity

Zweigstelle branch

Konto account

History Schalter

teller

6

Debit-Credit TAP:

read terminal input (acct#, branch#, teller#, delta);

begintrans

update ACCOUNT set balance = balance +:delta where acct_no = :acct # ;

select balance into :abalance from ACCOUNT where acct_no = :acct #;

update TELLER set balance = balance +:delta where teller_no = : teller # ;

update BRANCH set balance = balance +:delta where branch_no = :branch # ;

insert into HISTORY (Tid, Bid, Aid, delta, time)

values (:teller#, :branch#, :acct#, :delta, CURRENT);

endtrans ;

write message to terminal (abalance, ... )

(4)

Questions about Debit-Credit Transaction:

• What is an „Action“?

• Integrity constrains and cecking thereof?

• Why atomic?

• Where are indexes needed?

• Keys for relations and performance?

• Keys for history, reason?

• Optimization across several SQL-statements ?

• Compensation for them?

• Which integrity constrains cannot be checked by DBS?

• Remedy for that?

• Partitioning of DB, criteria?

• Modification of credit line?

• Modification for ATM-Payments? (ATM = automtic teller machine)

• Consequences for performance?

• Collateral execution: Advantages and disadvantages?

3. Parallel Execution of Transactions

- pseudo parallel: i.e. interleaving of several transactions, action?

- truely parallel: on multiprocessor see MIDAS-Project, SFB 342

Problems: Synchronization: locks optimistic

deadlocks: discovery,

breaking of deadlocks Cross connections to logging, recovery

e.g. abort to break deadlocks Granularity of parallelization

e.g. - of sequential transactions (Inter- Trans-Parallelism)

- single SQL-statements - single rel. operations - parallelization of operator

(5)

9

4. General Achitecture of a DBS

C-program with sequence of

embedded SQL – statements or UFI

Relations DB – Manager

DDL with catalogue management DML with compiler, optimizer interpreter

tuple file – management: files of records, B*-Trees, temp. files, utilities, Sorting-Alg., ...

pages Area (Realm): pages, DB-Buffer, DB-Cache/Safe

Disk-Blocks Peripheral-Storage Management Operating Syst., e.g. UNIX-Kernel

call reply BP

DBV

DV

GV

PSV

10

Implenentation – Variants:

- set of procedures, modules bound to applicaion

- process: Pipe on the same computer - Subsystem on other

computer: communication protocol via LAN; GAN

Special problem with DBS:

exchange of large datasets or common acces from several transactions

⇒ Simulation of a common virtual store

⇒ common virtual cache with special coherency – control

(see MIDAS and Diss. Listl)

(6)

let be a functional unit, which offers certain services, may consist itself of several processes, e.g.

to increase parallelism and performance

potential for parallelization on many levels, e.g.

1 manager per area 1 manager per B-Tree

several managers per B-Tree e.g. Bayer, Schkolnick, 1976

PSV

Disk Manager

CD-ROM Jukebox

Internet- DB

NSF- mounted

5. User Requirements

Bequem: high level of abstraction, i.e. declarative language, natural,

set oriented, objectoriented Effizent: fast algorithms,

little storage, optimization indexes

Sicher: against own mistake: C,A against mistakes of others: I, A against HW failures: D, A against SW failures: A,C,I,D Transactionoriented: encapsulation of complex

process in 1 TAC, e.g. booking a flight, retrieval of literature,

ordering and checking out a book

⇒ BEST - Principles

Referenzen

ÄHNLICHE DOKUMENTE

 Evolutionary   conservation  of  a  phosphate  transporter  in  the  arbuscular  mycorrhizal  symbiosis..  Functional  complementarity  in  the  arbuscular

long transaction (summation of account balances) multiple short transactions (debit/credit transfers) parameter: number of concurrent transactions. SQL Server 7, DB2 v7.1 and Oracle

In a case study, we analysed distribution records with high data density of all commonly occurring tree and shrub species of Crete (Greece) with offshore islands..

If more relevant credit data are available for financial service providers, the providers are able to make more accurate assessments of a consumer’s creditworthiness,

TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of

The devices feature high slew rates, low input bias and offset currents, and low offset voltage temperature coefficient.. Offset adjustment and external

— The people of Chinhan claim descent from refugees from the Qin 秦 Dynasty in China who were given land by Mahan; Mahan did not exist at the time of Qin, but refugees at that time

Within our platform, textual debate content is automatically further structured and en- hanced employing argument mining, text analyt- ics, retrieval of external material and