Introduction to SQL
PostgreSQL
관계형 DBMS 중 하나이다.
Loading Sample Data
.txt file을 만들고 COPY 명령어로 load할 수 있다. (단 속성(열)이 순서대로 잘 등록 되어 있다면!)

- \i test.sql → sql statements를 포함하는 test.sql(sql source file)을 만들고 psql shell에서 실행할 수 있다.
전체 데이터베이스 예시
- DDL.sql → 테이블 생성
- data.sql → 실제 데이터 입력

DDL (Data Definition Language)
스키마, 테이블의 구조와 같은 것에 관여함. 구체적으로 하는 일은 다음과 같다.
- Schema for each relation : 각 관계의 스키마
- Domain of values : 각 속성과 연관된 값의 도메인(범위)
- Integrity constraints : 무결성 제약 조건
- index, security and authorization, physical storage of structure 등..
Domain Types in SQL