relational database기본 개념, 용어 정리

hyungjunn·2024년 1월 12일

데이터베이스

목록 보기
5/14

Set

Set의 특징은 다음과 같다.

  • 값(element)이 중복되면 안된다.
  • element의 순서는 상관이 없다.

relation in mathematics

Cartesian product

set이 n개 일 때 n개의 집합의 곱집합(모든 경우의 수)

n-ary relation

n개의 집합의 Cartesian product의 부분집합, 튜플들의 집합

relational data model에서의 relation

수학에서의 relation과 똑같다. 단지 set이 domain이 되고 튜플들을 가진다.

attribute

각 도메인마다 역할이 다르기 때문에 고유하게 이름을 부여해줘야 한다. 이 각각 다른 이름들을 attribute라고 한다.

relation

위에서 말한 tuple들이 attribute와 함께 표로 나타냈을 때 그 테이블을 뜻한다.

relation schema

relation의 구조를 나타낸다. relationdml dlfmarhk atttributes들의 list로 표기된다.

ex)

MEMBER(id, name, grade, address, phone_num, home_phone_num)

relation database

이 relation을 여러개 구성시킨게 relation database이다. relation data model에 기반해서 구조화된 database이다.

relation database schema

relation schemas set과 integrity constraints set을 합한것

key

superkey

relation에서 tuples를 고유하게 식별할 수 있는 attributers set

candidate key

어느 한 attribute라도 제거하면 unique하게 tuples를 식별할 수 없는 super key, 그냥 key라고도 불린다.

primary key

relation에서 tuples를 unique하게 식별하기 위해 선택된 candidate key, 보통 attribute가 적은걸 pk로 설정한다.

unique key

primary key가 아닌 candidate keys

foreign key

primary key를 참조하는 attributes set

Reference

0개의 댓글