Database
Databse의 정의
: a collection of persistent, interrelated, and integrated data that is used by the application systems of some given enterprise
: a collection of data that is managed by DBMS
File System으로 Database 관리
DBMS가 없을 때 DB를 관리하는 방법.
단점: 데이터 일관성 유지 및 데이터 액세스에 어려움
3 Levels of Data Abstraction

- physical level: describes how data are actually stored
- logical level: describes what data stored in DB & what relationships among the data
- view level: describes only part of the entire DB
- views can hide information for security purposes (ex) salary of employees
Database Design
Database Design Process
1. ISP (information strategy planning) → BPR (business process reengineering)
2. conceptual design (E-R modeling): 사람 관점에서의 개념적 디자인
3. logical design (relational modeling): 컴퓨터 관점에서의 디자인
4. physical design
Data Model
data model: 데이터 요소들을 추상화하고, 실제 세계에서의 요소들 및 각 데이터 요소들이 어떻게 관련되는지 나타냄
data structures, data relationships, data semantics, constraints를 설명하는 도구들의 집합
relational model, E-R model, object-based model, semistructured model 등으로 구분
Database Language
Database Language
DDL: define
DML: manipulate
DCL: control
DDL (Data Definition Language)
database schema 정의
DDL compiler generates a set of table templates stored in a data dictionary
- data dictionary: "data about data", 메타데이터를 저장 (database schema, integrity constraints, authorization 등)
DML (Data Manipulation Language)
데이터 접근 및 조작
query language: data insert, delete, update, retrieval
가장 널리 쓰이는 query language는 SQL
Database Management System (DBMS)
Storage Management
storage manager: database에 저장된 low-level data와 그 데이터에 관련된 프로그램들 간의 인터페이스를 제공하는 프로그램 모듈.
storgage management의 3가지 이슈
- storage access
- file organization
- indexing & hasing
Storage
storage architecture

main memory ↔ disk

Query Processing
1. query가 제대로 작성되었는지 parse & 사용자가 원하는 바대로 translate
2. translation 결과 relational algebra expression 생성
3. 여러 expression 중 최소 비용인 것을 찾기 위해 optimize
4. C 실행 코드로 만들어 실행하는 execution plan
5. 사용자에게 query output 전달
System Failure
failure의 유형
- transaction failure: database 상에서 실행되는 프로그램에서의 오류 발생
- system failure: OS 또는 database에서의 오류 발생
failure 발생 시 리부팅 과정에서 buffer에 있던 트랜잭션 기록들이 사라지면 data inconsistency 문제 발생 가능하므로, all-or-not mechanism 필요
본 포스트 내용은 고려대학교 컴퓨터학과 "데이터베이스" 강의 내용 일부를 개인 공부 목적으로 정리한 것입니다.
'computer science > 데이터베이스' 카테고리의 다른 글
| Concurrency Control (0) | 2024.01.26 |
|---|---|
| Transaction (0) | 2024.01.25 |
| Relational DBMS (0) | 2024.01.17 |
| Relational Algebra (관계대수) (0) | 2024.01.08 |
| Basics of Relational Model (0) | 2024.01.06 |