티스토리 뷰

728x90

Basics of Sets and Relations #1

A, B 합집합의 개수? {1,2,3,4,5,6,7,8} => 8

 

Basics of Sets and Relations #2

A, B 교집합의 개수? {2,3,4,5,6} => 5

 

Basics of Sets and Relations #3

A, B 차집합의 개수? {1} => 1

 

Basics of Sets and Relations #4

A x B 카테시안 곱으로 나올 수 있는 총 수는? 6 x 7 = 42

 

Basics of Sets and Relations #5

σ 는 표준편차라고 한다.

σ(Number<3000)(Student)는 Student 테이블에서 Number = 3보다 작은 Student을 count하라는 의미 => 2

select count(*)
from Student
where number < 3000;

Basics of Sets and Relations #6

π(Name, Number)(Student) 이게 정확히 무슨 의미인지 모르겠으나 Student 테이블에서 Name, Number 어트리뷰트의 카운트의 수는 무엇인지 물어보는 것으로 해석했다. 답은 "2"로 맞췄으나 무슨 말인지 모름...

Discussions에서 아래와 같이 설명한 사람이 있다. (결국 컬럼수를 맞추라는 의미)

Π(Name)(Student) - The list of properties to be returned from the projection of the Student table is one.

Π(Name, Number)(Student) - The list of properties to be returned from the projection of the Student table is two.

Π(Name, Number, Sex)(Student) - The list of properties to be returned from the projection of the Student table is three.

 

Basics of Sets and Relations #7

[Student].Number, [Teaching Assistants].id로 join 했을 때 리턴되는 row의 수? 

Number = 3412, 2341 ==> 2개 

728x90
LIST
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함