일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- django
- structured_array
- 비둘기목
- keras
- IBK기업은행 인턴
- 참새과
- AI전략게임
- 백로과
- 계수정렬
- ADsP
- 딱다구리과
- 딥러닝공부
- 생일문제
- 참새목
- 딥러닝 공부
- 흰날개해오라기
- 가마우지과
- 맑은소리 스피치학원
- 한국의새
- AI역량평가
- SimpleCraft
- 한국의 새
- 오리과
- 기러기목
- 비둘기과
- 직박구리과
- python3
- Birthday paradox
- Python
- 솔딱새과
- Today
- Total
진박사의 일상
[데베시] 3강 본문
ER 모델 - 개념 모델링 : DB 디자인 프로세스, ER 모델 이해, 개념 데이터 모델링

Miniworld : Realword 중에서 관심있는 부분
Requirements collection and analysis(요구사항 수집 & 분석) : System Analysist가 수행. 인터뷰를 통해 어떤 요구사항이 있는가 분석. -> Data Requirement가 도출
-> 이후로 DB Designer가 설계
-> Conceptual Design : 사람들이 보기에 구성되어야 하는 골격(Schema)을 디자인 -> Conceptual Schema(High-leve data model (ex. ER model) 을 통해 도출) - DB가 이해 X
--여기까진 DBMS에 독립적--
-> Logical Design : DBMS에서 제공하는 Logical Model ( ex. Relational model )을 통해 Logical Schema를 생성
-> Physical Design : Data가 많으면 성능을 위해 Index를 쓰거나... 등등 -> Internal Schema 도출
Example - COMPANY Database 중요!!!!
- Requirements(요구사항) 분석
-Employees, Departments, and Projects
-Company는 여러 Departments로 구성
-Department : 유일한 name, 유일한 number, locations, manager (+ 매니저가 부서 관리를 시작한 시점 정보)
-Department는 여러개의 Projects를 관리할 수 있음
-Project : 유일한 name, 유일한 number, location(1개)
-Employee : 각 사원의 이름, Social Security number, address, salary, sex, and birth date
-Employee는 하나의 Department에 소속됨.
-Employee는 여러 Projects에 소속될 수 있음.
-각각의 Project에서 각 Employee가 몇 시간 씩 일하고 있는지 추적 관리.
-각 Employee에 대해 direct supervisor(직속 상사)도 관리.
-각 Employee에 대해 dependents(부양 가족) 관리.
-Dependent : dependent's first name, sex, birth date, and relationship to the employee.

Entities & Attributes
- Entity(개체) : Thing in real word with independent existence. (실세계의 독립적 존재)
- Attributes(속성) : Particular properties that describe the entity (Entity를 설명하는 특성)
Type of Attributes
- Category 1 :
Simple(Atomic) Attribute : 나눌 수 없는 속성 (ex. name = "홍길동")
Composite Attribute : smaller subparts로 나눌 수 있는 속성. 계층적으로 표현 가능. (ex. name의 하위 attribute로 family name = "홍", last name = "길동")
- Category 2 :
Single-valued Attributes : 하나의 값만 가질 수 있음 (ex. Age)
Multivalued(Set) Attributes : set of values를 가질 수 있음. (ex. Phone numbers - 전화전호가 2개 등록 가능)
- Category 3 :
Stored Attributes : 실제로 DB에 저장된 속성 (ex. Birth Date)
Derived Attributes : 다른 속성으로부터 유추되어 파생된 속성 (ex. Age - Birth Date에서 파생된 경우)
Entity Type
- Entity의 Collection은 같은 set of attributes를 가짐. - (ex. 사원 1의 속성 정보와 사원 2의 속성 정보는 같은 종류)
- set of entites의 Schema or Intension에 해당됨. ( 비교 - Employ(Entity Type) <-> 홍길동 사원(Instance) )
- name과 attributes로 구성. (ex. 사원 Entity Type = (name = "사원", attributes = (name, number, age 등) )

- Domains : 각 entity의 attribute로 할당될 수 있는 value들의 집합 (ex : domain for AGE attribute of Employee entity : 20~70)
Key Attribute : 각 Entity의 Attribute의 value값이 distinct한 Attribute. (각 개체의 속성값이 모두 서로 다른 값을 가짐)
- Key Attribute는 각각의 entity를 유일하게 식별할 수 있음.
- 2개 이상의 Attributes를 합쳐서 하나의 key attribute로 볼 수 있음.
- 하나의 Entity에 2개 이상의 Key Attribute가 존재할 수 있음.
- Key Attribute의 유일성 특성은 반드시 해당 Entity type의 모든 Entity set에 지켜져야 함. (설계 당시부터 유일성을 지키도록 강제되어야 한다. 즉 특정 시점의 Entity Set에서 중복되지 않는 Attribute를 Key Attribute로 보는 것이 아님.)

E-R 모델의 표기법에 따라 Company DB 구성해보기
- Key는 밑줄, { }는 multivalued attribute, ( )는 Composite Attribute
Department : Name, Number, {Locations}, Manager, ManagerStartDate
Project : Name, Number, Location, ControllingDepartment
Employee : Name(FName, MInit, LName), SSN, Sex, Address, Salary, BirthDate, Department, Supervisor, {WorksOn (Project, Hours)}
Dependent : Employee, DependentName, Sex, BirthDate, Relationship (* Employee와 DependentName이 하나의 key)
Conception of Relationship
- Relationship Instances : Entity sets의 두 Entity 간의 관계(Association)
- Relationship Type : Entity types의 relationship instance 집합. 각 Entity tpes와 함께 표현됨.

Relationship Degree : Degree of relationship type / 관계에 참여하고 있는 Entity type의 수 - 대부분 Binary(가끔 3이상)
Binary Relationship : degree=2인 relationship type. 대부분이 해당됨.
Ternary Relationshp : degree=3인 relationship type.

Recursive Relationships (재귀적 관계)
- Role name : 참여하는 Entity types들이 각 relationship instance에서 참여하고 있는 역할
- Recursive relationship type : 하나의 Entity type의 여러 개체가 하나의 relation type에 서로 다른 역할로 참가 -> role name 명시 필요

'프로그래밍 > 공부' 카테고리의 다른 글
[데베시] 4강 (0) | 2021.10.04 |
---|---|
[컴보] 4강 - Access Control (0) | 2021.09.29 |
[정보보안] 3강 - User Authentication (0) | 2021.09.27 |
빅데이터 가명익명조치기술 전문 교육 2일차 요약 (0) | 2021.09.22 |
컴퓨터 일반 요약 공부 - Part1. -2- (0) | 2021.09.16 |