Environment & Database (5) - Further SQL & NoSQL Database

2021. 5. 16. 17:33[AI]/Data Engineering

New Stuff

Key Points

  • NoSQL
    • NoSQL Types
    • NoSQL Properties

  • SQL & NoSQL Properties

  • SQL vs NoSQL Advantages / Disadvantages

Learned Stuff

[NoSQL]

  • Non-Relational Database 를 의미
    • Relational Database (SQL) 와 다름

NoSQL Types


1. Key - Value Store

  • 하나의 Key 와 하나의 Value 로 구성된 Database

Example

Key_Value Store Example


2. Column Store

  • Row 형 Data 가 아닌 Column 형 Data 로 구성된 Database

Example

Column Store Example


3. Document Database

  • Table 의 Row (Record) 를 문서화 시킨 형태의 Database

Relational Database 와의 차이

Relational Database Document Database
Table Collection
Row Document
Column Field

Example

Document Database Example


4. Graph Database

  • 그래프 이론 기반의 Database

[SQL & NoSQL Properties]

  • Performance : 성능
  • Scalability (확장성) : 데이터를 수직 (row) 또는 수평 (column) 추가함에 있어 용이한 지
  • Flexibility (유연성) : Data Schema 가 단순하거나 없다면 유연한 Database 라는 것을 의미
  • Complexity (복잡도) : 복잡도

Property Table

Data Model Performance Scalability Flexibility Complexity
Key - Value Store High High High None
Column Store High High Moderate Low
Document Database High Depends High Low
Graph Database Depends Depends High High
Relational Database (SQL) Depends Depends Low Moderate

[SQL vs NoSQL]

SQL NoSQL
Advantages * 명확한 Schema

* 중복 Data X
* Flexible (언제든지 Data 추가할 수 있음)

* Data 읽어오는 속도 빠름

* 수평 or 수직 으로 Data 확장 가능
Disadvantages * Less Flexible

* Join 문이 많아질수록 복잡해짐
* 중복 Data 가 포함되어 있음 (변경할 경우 여러 개의 Collection 에서 바꿔주어야 함)

References
[https://siyoon210.tistory.com/130]

728x90