HS_development_log

Relation model 본문

CS/데이터베이스

Relation model

DevHyeonseong 2020. 4. 22. 22:50
반응형

1. Attribute Types 

  • 각각의 attribute 는 이름을 가지고 있다.

  • 각각의 attribute에 대해 허용된 집합을 domain 이라고 한다.

  • attribute의 값은 분리 될 수 없어야 한다.

  • NULL은 모든 domain의 멤버이다. 값을 가지고 있는 0과 빈칸과는 다르다.

2. Database Schema and instance

  • Database schema : DB의 논리적 구조 

  • Database instance : DB의 snapshot(한순간)

 

3. Relational Alegbra

3.1 select

   relation에서 어떤 조건을 만족하는 tuple을 뽑아내는 연산자 

select 연산의 예

3.2 project

   relation에서 내가 보고자 하는 column들만 추출하는 연산자 

project 연산의 예

3.3 union

   합집합 연산자. union 연산을 할 두개의 Relation의 schema가 같아야 한다

union 연산의 예

3.4 set difference

   차집합 연산자

set difference 연산의 예

3.5 cartesian product

  가능한 조합의 tuple들을 모두 만들어 낸다.

cartesian product 연산의 예

반응형

'CS > 데이터베이스' 카테고리의 다른 글

Database intro  (0) 2020.04.04