CS

DB정리 - 개요

냥쟝 2024. 10. 31. 21:10
반응형

db기초는 이미 익숙한 상태이다.

하지만 db를 깊게 응용하고 트러블슈팅능력은 조금 부족한 상태이기 때문에 

서적과 인강을 참고하여 정리할 예정이다

 

ACID 인덱싱 파티셔닝 샤딩 동시성제어 복제 DB엔진 그외 데이터베이스 엔지니어링

- database의 기초 
- acid가 무엇인지 원자성은 무엇인지
- 일관성과 격리 , 내구성
- 인덱스
- 동시성 제어, 파티셔닝, 샤딩
- 깊은 인덱스 아이디어
- 데이터베이스 엔진, 엔진의 개념 및 데이터베이스 시스템의 차이
- 실제 어플리케이션을 설계할 때 중요하게 생각해야할 부분인지, 어플리케이션의 본질적인 부분을 탐구
- 시스템을 배우고 추상적인 것들과 기본적인 것들 가장 기초적인  원리를 배운다

---

agenda 
- what is transaction
- atomicity
- isolation
- consitency

----
transition
- a collection of queries
- one unit of work
- select update update - accoint deposit

transaction lifespan
- transaction begin
- transaction commit
- transaction rollback
- transaction unexpected ending = rollback 

Nature of Transactions

- ususlly transactions are used to change and modify data
- however, it is perfectly normal to have a read onlu transation

Transaction
- A collection of queries
- One unit of work
- E.g Account deposit (select update update)

Transaction Lifespan
- Transaction begin
- transaction commit
- transaction rollback
- transaction unexpected ending = rollback 

Nature of Transactions 
- usually transaction are used to change and modify data
- However, normal to have a read only transaction
- generate a report and you want to get consistent snapshot based at the of transaction

transaction
- select balance from account where id = 1
- balace>100
- update account set balance = balance  - 100 where id = 1
- update account set balance = balance +100 where id =2

commit;