본문 바로가기

DB

[DB][데이터베이스] 7-2. BCNF & 3NF & 4NF(MD) 1NF (First Normal Form) Features of Good Relational Design Functional Dependencies Decomposition Using Functional Dependencies BCNF (Boyce-Codd Normal Form) 3NF Multivalued Dependencies and 4NF Overall DB Design Process by Prof. Chang Hwan Lee Boyce-Codd Normal Form (BNCF) FD(Frequency Dependencies)의 집합 F에 대한 관계 R은 F+ 형식의 모든 FD에 대해 BCNF를 만족한다 a -> b 일 때, a -> b 는 trivial 이거나(b는 a의 부분집합), a는 supe.. 더보기
[DB][데이터베이스] 7-1. DB Design / DB 설계 1NF (First Normal Form) Features of Good Relational Design Functional Dependencies Decomposition Using Functional Dependencies BCNF (Boyce-Codd Normal Form) 3NF Multivalued Dependencies and 4NF Overall DB Design Process by Prof. Chang Hwan Lee 1NF (First Normal Form) 릴레이션에 속한 모든 속성의 도메인이 atomic 값으로만 구성되어 있으면 1NF에 속한다 Features of Good Relational Design Non-atomic 값들은 저장공간을 복잡하게 하고, 중복을 만든다 여기서, D.. 더보기
[DB][데이터베이스] 5. Advanced SQL / 고급 sql Accessing SQL From a Programming Language Functions and Procedural Constructs Triggers Recursive Queries Advanced Aggregation Features by Prof. Chang Hwan Lee Accessing SQL From a Programming Language - Embedded SQL SQL 표준은 다양한 프로그래밍 언어(C, C++, JAVA 등으)로 SQL imbedding을 정의한다 -- 전처리에 포함된 SQL 요청을 식별한다 EXEC SQL END-EXEC EXEC SQL -- embedded SQL을 작성한다 declare c cursor for -- SQL select ID, name from .. 더보기
[DB][데이터베이스] 4. Intermediate SQL / 중간 단계의 sql Join Expressions Views Integrity Constraints SQL Data Types and Schemas Index Definition in SQL Authorization by Prof. Chang Hwan Lee Join Expressions - nature join nature join은 모든 공통 속성에 대해 동일한 값을 가진 열을 유지한다 중복이 제거되는 대신에, 생략되는 속성들이 생긴다 select name, title from studnet natural join takes, course where takes.course_id = course.course_id; - inner join 일반적인 join 명령어이다 보통 on, using 등의 조건을 추가해 사용한다 se.. 더보기
[DB][데이터베이스] 3. SQL / sql의 기본 문법 Data Definition 기본 Query Structure 추가 Basic Operations Set Operations Null Values Aggregate Functions Subqueries in the Where Clause Subqueries in the From Clause Subqueries in the Select Clause Modification of the Database (DML) by Prof. Chang Hwan Lee Data Definition - DDL; Data Definition Language - 데이터 정의어 DDL은 데이터를 생성, 수정, 삭제 등 골격을 결정한다. - Create table - Domain Types - not null / primary ke.. 더보기