관계 데이터 모델과 제약조건

Embed Size (px)

DESCRIPTION

관계 데이터 모델과 제약조건. 개념 , 특성 , 키 , 무결성 제약조건. 목차 I. 관계 데이터 모델의 개념 II. 릴레이션의 특성 III. 릴레이션의 키 IV. 무결성 제약조건. 2. 관계 데이터 모델과 제약조건. 관계 데이터 모델은 지금까지 제안된 데이터 모델들 중에서 가장 개념이 단순한 데이터 모델의 하나 IBM 연구소에 근무하던 E.F. Codd 가 1970 년에 관계 데이터 모델을 제안함 - PowerPoint PPT Presentation

Text of 관계 데이터 모델과 제약조건

  • , , ,

  • *

    I. II.

    III.

    IV.

  • *2. IBM E.F. Codd 1970 DBMS 1970 IBM System R1980 DBMS DBMS

  • *2. [2. 1] DBMS

    ORACLE MS SQL Server DB2(SQL/DS) INFORMIXSYBASE MSFT/Access InstanceDB Simple Text

  • *2. ()

  • *2.1 () (what) , (how)

  • *2.1 (relation): 2 ( ) (record): (tuple): (attribute):

  • *2.1 ()()EMPLOYEE[2. 1]

    EMPNOEMPNAMETITLEDNOSALARY210622000000342632500000301113000000100312000000

  • *2.1 (domain) CREAT DOMAIN EMPNAME CHAR(10)CREAT DOMAIN EMPNO INTEGERCREAT DOMAIN DNO INTEGER

  • *2.1 EMPLOYEE EMPNAME , , , , . 2.2 EMPNAME .: EMPNAME [2. 2] EMPNAME

  • *2.1 (degree) (cardinality): 1: 0

  • *2.1 [2. 2]

    /

  • *2.1 (null value) : , DNO() 0 DBMS

  • *2.1 (relation schema) (framework)(1, 2, ... N) (intension)

  • *2.1 (relation instance) (extension)

  • *2.1 [2. 3] EMPLOYEE

    EMPNOEMPNAMETITLEDNOSALARY210622000000342632500000301113000000100312000000

  • *2.1 (relational database)

    DEPARTMENT(DEPTNO, DEPTNEMA, FLOOR)EMPLOYEE(EMPNO, EMPNAME, TITLE, DNO, SALARY)[2. 4]

  • *2.1 [2. 5] EMPLOYEEDEPARTMENT

    EMPNOEMPNAMETITLEDNOSALARY210622000000342632500000301113000000100312000000

    DEPTNODEPTNAMEFLOOR1821039

  • *

    I. II.

    III.

    IV.

  • *2.2 DEPARTMENT[2. 6]

    DEPTNODEPTNAMEFLOOR1821039

    FLOORDEPTNODEPTNAME8110293

  • *2.2 () DEPARTMENT[2. 7]

    DEPTNODEPTNAMEFLOOR1{8, 9}2103{7, 9}

  • *2.2 ()

    DEPARTMENTDEPARTMENT=[2. 8]

    DEPTNODEPTNAMEFLOOR1821039

    DEPTNODEPTNAMEFLOOR3921018

  • *

    I. II.

    III.

    IV.

  • *2.3 (superkey), (candidate key), (primary key), (alternate key), (foreign key) : (, ) (, ) ()

  • *2.3 : (, ) () (composite key) : (, ) [2. 9]

    11002CS310A011002CS313B+24036CS345B024036CS310A+

  • *2.3 2.10 ? 2.10 ? [2. 10]

    11002sea@hanmail.net24036smkim@iweb.cwunet.ac.kr13427blue@hanmir.com

  • *2.3 : .

  • *2.3

  • *2.3 :

  • *2.3 [2. 11]

  • *2.3

    EMPLOYEEDEPARTMENT[2. 13]

    EMPNOEMPNAMEDNO2106234263301111003134273

    DEPTNODEPTNAMEFLOOR1821039

  • *2.3 ()

    [2. 13]

    EMPNOEMPNAMEMANAGERDNO2106342623426301133011^1100330111342721063

  • *2.3 ()

    ()[2. 14]

    11002CS310A011002CS313B+24036CS345B024036CS310A+

    1100224036

    CS310CS313CS345

  • *

    I. II.

    III.

    IV.

  • *2.4 (data integrity) . . . DBMS

  • *2.4 (domain constraint) , , CHECK SQL2

    (key constraint)

  • *2.4 (entity integrity constraint) DBMS

  • *2.4 (referential integrity constraint) , R2 R1 R1

    R1R2

  • *2.4 , , DBMS DBMS , EMPLOYEE DNO DEPARTMENT DEPTNO , DEPARTMENT , EMPLOYEE

  • *2.4 EMPLOYEEDEPARTMENT[2. 17]

    EMPNOEMPNAMEDNO2106234263301111003134273

    DEPTNODEPTNAMEFLOOR182103948

  • *2.4 DEPARTMENT , , , , : EMPLOYEE (4325, , 6)

  • *2.4 , , , 1: DEPARTMENT (4, , 8) 2: DEPARTMENT (3, , 9)

  • *2.4 DBMS (restricted) : DEPARTMENT (3, , 9) (cascade) , : DEPARTMENT (3, , 9) EMPLOYEE 3

  • *2.4 EMPLOYEEDEPARTMENT[2. 18]

    EMPNOEMPNAMEDNO2106234263301111003134273

    DEPTNODEPTNAMEFLOOR182103948

  • *2.4 DBMS ()(nullify) , : DEPARTMENT (3, , 9) EMPLOYEE 3

  • *2.4 DBMS DBMS , , , ,