数据库知识下(学习东南大学徐立臻老师)

数据库管理系统ContentsThe Architecture of DBMS The components of DBMS core The process structure of DBMSDatabase Access ManagementQuery Optimization:"Rewrite" the query statements submitted by user first,and then decide the most effective...
摘要由CSDN通过智能技术生成

数据库管理系统

Contents 

The Architecture of DBMS

       The components of DBMS core

       The process structure of DBMS

Database Access Management

Query Optimization:"Rewrite" the query statements submitted by user first,and then decide the most effective operating method and steps to get the result.The goal is to gain the result of user's query with the lowest cost and in shortest time.(Algebra Optimization;Operation Optimization)

Transaction Management

          Recovery

         Concurrent Control

File Organization

 Heap file: records stored according to their inserted order,and retrieved sequentially.This is the most basic and general form of file organization.

Direct file:the record address is mapped through hash function according to some attribute's value

Indexed file:index+heap file/cluster

Dynamic hashing

Grid structure file

Index Technique(B+Tree; Clustering index....)

Basic principles

The target of algebra optimization is to make the scale of the operands which involved in binary operations be as small as possible

The Operation Optimization

Optimization of (1 select operation 2 project operation 3 set operation 4 join operation 5 combined operation)

Optimization of join operation

 Merge scan:order the relation R and S on disk in ahead,then we can compare their tuples in order,and both relation only need to scan one time.If R and S have not ordered in ahead,must consider the ordering cost to see if it is worth to use this method 

Using index or hash to look for mapping tuples :in nested loop method,if there is suitable access route on I(say B+tree index),it can be used to substitute sequence scan.It is best when there is cluster index or hash on join attributes.

Recovery 

Introduction 

The main roles of recovery mechanism in DBMS are:

(1) Reducing the likelihood of failures(prevention)

(2)Recover from failures(solving)

Restore DB to a consistent state after some failures

Redundancy is necessary

Backup+Log

Log:record of all changes on DB since the last backup copy was made

change:1 Old value(before image---B.I)2 New value(after image---A.I) recorded into Log

For update op:B.I    A.I

insert op: -----        A.I

delete op.:     B.I   ---

While recovering:

         Some transactions maybe half done,should undo them with B.I recorded in Log

         Some transactions have finished but the results have not been written into DB in time,should redo them with A.I recorded in Log(finish writing into DB)

        It is possible to recover DB to the most recent consistent state with Log.

Transaction 

A transaction T is a finite sequence of actio

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值