Lec #3 - part 2

Blue·2023년 10월 15일

ER MODEL

Overview of Database Design Process

A Simplified Overview of Database Design Process

Miniworld 를 Banking Service 라 했을때

왼쪽으로 내려가게된다면 최종 Program 이 나오고
오른쪽으로 내려가면 Internal Schema 가 된다.
User에 대한 분석을 하고 Data requirement 를 통해 Data 관련 요구사항이 필요하다.

Entity Types,Entity Sets,Attributes,and Keys

Concepts: Entities & Attributes

Entitiy 는 ER 모델의 기본이고 DB의 가장 작은 단위이다.

Attributes 는 속성으로 Entity 를 설명하는 성질이다.
Entity의 각각 속성에 값을 가지고 있다.

Attribute 는 구체적인 값을 가져야하고,Type을 가져야한다.

Types of Attributes (1/3)

Simple 은 속성 하나가 단일 값을 가지는 것이다.
Composite 는 여러 속성이 하나의 속성을 가지는것이다.
Multi-valued 는 속성에 여러개의 값을 가질수 있는것이다.

Types of Attributes (2/3)

relation - 모든 속성은 Flat 해야한다.
또한 Composite,multivalue 같이 쓰는거 된다.

Types of Attributes (3/3)

Stored attribute 는 기록된 데이터이다
Derived attribute 는 기록된 데이터로 부터 추측,계산이 가능한 정보이다.

Stored attribute 는 fact 이고 ,Derived attribute는 파생된것이라고 보면된다.

Complex attribute 는 Composite 와 multivalue 를 같이 사용한것이다.

Entity Types and Entity Sets

Entity Type 은 같은 속성을 가진 Entity type 이다.
한번 수정되면 잘 안바뀐다.

기술하기 위한 유형이라 보면 된다
DB Schema 와 관련이있다.

Entity Sets 는 특정 Entity type을 가지는 모든 Entity 의 집합이다.
Set 은 바뀔수 있다.

Entity Instance 의 집합으로 DB State 와 관련이 있다.

Key Attributes of an Entity Type

Key attributes 는 unique 한 값을 가져야하고 식별되어야한다.
그 속성의 값만 알면 식별해 낼수 있다.
여러개의 key attribute 가 존재할수 있다.

Value Sets of Attributes

Value Sets 는 속성값의 집합으로 그 Type에 딱 맞는 Data 만 들어가야한다.

Notation and Example for Entity & Attribute in Entity-Relationship(ER) Diagrams

표현법이다.

Relationship Types,Relationship Sets,Roles,and Structural Constraints

Relationships,Relationship Types,Relationship Sets,Instances,Degree of a Relationship Type

Relationship 은 두개 이상의 Entity 가 특성을 가지는 것이다.
실질적인 의미를 가져야한다.

Relationship type 은 관계유형으로 특정 Entity 끼리 연관성에 대한 유형이다.

Relationship Set 은 Entity Set 과 같고 Relation Type 을 따르고 있는 Instance 의 집합이다.

Role Name

누가 어떤 역할을 하는지 모른다. 이런 Detail 을 설명한다.
역활의 이름을 부여한다.

만약 안철수가 R&D,GPT-5 부서에도 참여할수 있을때 Role 이 다를수 있음!

Recursive Relationship

똑같은 Entity 가 서로 다른 relationship 에 참여할때를 말한다.

Structural Constraints on Binary Relationship Types

Relation type에 대해서도 제약조건이 있어야한다.

Cardinality ratio

한 Entity 가 해당 Relationship 에 최대 몇번 참여를 하나?를 뜻한다.

1:N 이면 최대 1번,N번씩 참여를 한다는 말.

Relationship Instances of MANAGES 1:1

Relationship Instances of WORKS_ON M:N

Relationship Instances of WORKS_FOR 1:N

Structural Constraints on Binary Relationship Types

Participation constraints

Participation constraint 는 한 Entity 가 몇번의 relation에 최소로 참여하는 가를 나타낸다.

Total Participant 는 전체 참여
Partial participant 는 참여할수도,안할수도 있다.

Weak Entitiy Types

Concept

Strong Entity 가 있기 때문에 존재하는 Entity 이다.
자식 Entity Type 으로도 부른다.

Concept and Notation in ER

Partial key는 독립,혼자 존재할수 없는 Key 이다.

누가 부양가족을 있게 한 직원인지에 대한 정보가 있어야한다.

profile
할수있다가 아닌 해야한다!!

0개의 댓글