NoSql과 관계형 데이터베이스
최근 NoSQL 은 엄청난 인기를 얻었습니다.
기존 RDBMS에 비해 NoSQL 의 장점은 무엇입니까 ?
모든 데이터가 관계있는 것은 아닙니다. 이러한 상황에서는 NoSQL이 도움이 될 수 있습니다.
그러나 NoSQL은 "Not Only SQL"을 의미합니다. SQL을 중단 시키거나 대체하려는 것은 아닙니다.
SQL에는 몇 가지 큰 장점이 있습니다.
- 강력한 수학적 기초.
- 선언적 구문.
- SQL (Structured Query Language)의 잘 알려진 언어입니다.
그것들은 사라지지 않았습니다.
이것을 하나의 / 또는 논쟁으로 생각하는 것은 실수입니다. NoSQL은 사람들이 필요할 때 고려해야 할 대안입니다.
CouchDB와 같은 비 관계형 데이터베이스에 문서를 저장할 수 있습니다.
역사는 다음과 같습니다.
Google은 역 검색 색인을위한 스토리지 계층이 필요합니다. 그들은 전통적인 RDBMS가 그것을 자르지 않을 것이라고 생각합니다. 따라서 GFS 파일 시스템 위에 NoSQL 데이터 저장소 인 BigTable을 구현합니다. 중요한 부분은 수천 개의 저렴한 상용 하드웨어 시스템이 속도와 중복성을 제공한다는 것입니다.
다른 사람들은 Google이 방금 한 일을 알고 있습니다.
브루어스 CAP 정리 가 입증되었습니다. 모든 RDBMS 사용 시스템은 CA 시스템입니다. 사람들은 CP 및 AP 시스템을 가지고 놀기 시작합니다. K / V 매장 은 훨씬 단순하므로 연구의 주요 수단입니다.
서비스로서의 소프트웨어 시스템은 일반적으로 SQL과 유사한 저장소를 제공하지 않습니다. 따라서 사람들은 NoSQL 유형 저장소에 더 관심을 갖습니다.
이륙의 많은 부분이이 역사와 관련이 있다고 생각합니다. 스케일링 구글은 구글에서 몇 가지 새로운 아이디어를 얻었고 다른 사람들은 스케일링 문제에 대해 알고있는 유일한 솔루션이기 때문에 모든 사람들이 따라갑니다. 따라서 특정 크기 이상으로 확장 할 수있는 유일한 방법이기 때문에 Google의 분산 데이터베이스 아이디어와 관련된 모든 것을 기꺼이 재 작업 할 것입니다.
C-일관성
A-가용성
P-파티션 공차
K / V-키 / 값
NoSQL은 다음과 같은 이유로 인해 RDBMS보다 우수합니다.
- 반 구조적 데이터 및 휘발성 데이터를 지원합니다
- 스키마가 없습니다
- 읽기 / 쓰기 처리량이 매우 높습니다
- 수평 적 확장 성을 쉽게 달성 할 수 있습니다
- 대량의 Terra Bytes 및 Peta Bytes에서 Bigdata를 지원합니다.
- Bigdata를 기반으로 분석 도구를 효과적으로 지원합니다.
- 저렴한 하드웨어 기계에서 호스팅 가능
- 쿼리 성능을 향상시키기 위해 메모리 내 캐싱 옵션 사용 가능
- 개발자를위한 더 빠른 개발 수명주기
편집하다:
"RDBMS가 확장 할 수없는 이유"에 답하려면 Stavros Harizopoulos, Daniel J. Abadi, Samuel Madden 및 Michael Stonebraker가 작성한 RDBMS 오버 헤드 PDF 를 참조하십시오.
RDBMS는 엄청난 양의 테라 바이트 및 페타 바이트를 처리하는 데 어려움을 겪고 있습니다. RAID (Redundant Array of Independent / Inexpensive Disks) 및 데이터 분쇄 기능이 있어도 대량의 데이터에 대해서는 확장 성이 떨어집니다. 매우 비싼 하드웨어가 필요합니다.
로깅 : 로그 레코드를 조합하고 데이터베이스 구조의 모든 변경 사항을 추적하면 성능이 저하됩니다. 복구 기능이 필요하지 않거나 다른 방법 (예 : 네트워크의 다른 사이트)을 통해 복구 기능이 제공되는 경우 로깅이 필요하지 않을 수 있습니다.
잠금 : 기존 2 단계 잠금은 데이터베이스 구조에 대한 모든 액세스가 별도의 엔티티 인 잠금 관리자에 의해 관리되므로 상당한 오버 헤드가 발생합니다.
Latching : 다중 스레드 데이터베이스에서는 많은 데이터 구조가 래치되기 전에 액세스해야합니다. 이 기능을 제거하고 단일 스레드 방식으로 전환하면 성능에 현저한 영향을 미칩니다.
버퍼 관리 : 기본 메모리 데이터베이스 시스템은 버퍼 풀을 통해 페이지에 액세스 할 필요가 없으므로 모든 레코드 액세스에서 간접적 인 레벨을 제거합니다.
이것은 NoSQL over SQL을 사용해야한다는 의미는 아닙니다.
여전히 RDBMS는 RDBMS의 다음과 같은 이유로 인해 NoSQL보다 낫습니다.
- ACID 속성을 사용한 트랜잭션 -원 자성, 일관성, 격리 및 내구성
- 읽고 쓰는 데이터의 강력한 스키마 준수
- 실시간 쿼리 관리 (데이터 크기 <10 테라 바이트 인 경우)
- join & group by 절을 포함하는 복잡한 쿼리 실행
비즈니스 사례 및 요구 사항에 따라 RDBMS (SQL) 및 NoSQL (SQL뿐만 아니라)을 사용해야합니다.
NOSQL has no special advantages over the relational database model. NOSQL does address certain limitations of current SQL DBMSs but it doesn't imply any fundamentally new capabilities over previous data models.
NOSQL means only no SQL (or "not only SQL") but that doesn't mean the same as no relational. A relational database in principle would make a very good NOSQL solution - it's just that none of the current set of NOSQL products uses the relational model.
RDBMS focus more on relationship and NoSQL focus more on storage.
You can consider using NoSQL when your RDBMS reaches bottlenecks. NoSQL makes RDBMS more flexible.
The biggest advantage of NoSQL over RDBMS is Scalability.
NoSQL databases can easily scale-out to many nodes, but for RDBMS it is very hard.
Scalability not only gives you more storage space but also much higher performance since many hosts work at the same time.
If you need to process huge amount of data with high performance
OR
If data model is not predetermined
then
NoSQL database is a better choice.
Just adding to all the information given above
NoSql Advantages:
1) NoSQL is good if you want to be production ready fast due to its support for schema-less and object oriented architecture.
2) NoSql db's are eventually consistent which in simple language means they will not provide any lock on the data(documents) as in case of RDBMS and what does it mean is latest snapshot of data is always available and thus increase the latency of your application.
3) It uses MVCC (Multi view concurrency control) strategy for maintaining and creating snapshot of data(documents).
4) If you want to have indexed data you can create view which will automatically index the data by the view definition you provide.
NoSql Disadvantages:
1) Its definitely not suitable for big heavy transactional applications as it is eventually consistent and does not support ACID properties.
2) Also it creates multiple snapshots (revisions) of your data (documents) as it uses MVCC methodology for concurrency control, as a result of which space get consumed faster than before which makes compaction and hence reindexing more frequent and it will slow down your application response as the data and transaction in your application grows. To counter that you can horizontally scale the nodes but then again it will be higher cost as compare sql database.
From mongodb.com:
NoSQL databases differ from older, relational technology in four main areas:
Data models: A NoSQL database lets you build an application without having to define the schema first unlike relational databases which make you define your schema before you can add any data to the system. No predefined schema makes NoSQL databases much easier to update as your data and requirements change.
Data structure: Relational databases were built in an era where data was fairly structured and clearly defined by their relationships. NoSQL databases are designed to handle unstructured data (e.g., texts, social media posts, video, email) which makes up much of the data that exists today.
Scaling: It’s much cheaper to scale a NoSQL database than a relational database because you can add capacity by scaling out over cheap, commodity servers. Relational databases, on the other hand, require a single server to host your entire database. To scale, you need to buy a bigger, more expensive server.
Development model: NoSQL databases are open source whereas relational databases typically are closed source with licensing fees baked into the use of their software. With NoSQL, you can get started on a project without any heavy investments in software fees upfront.
참고URL : https://stackoverflow.com/questions/4160732/nosql-vs-relational-database
'Programming' 카테고리의 다른 글
| JSON, REST, SOAP, WSDL 및 SOA : 서로 연결하는 방법 (0) | 2020.06.07 |
|---|---|
| C # 문자열 참조 유형? (0) | 2020.06.07 |
| 중지 된 Docker 컨테이너 만 나열 (0) | 2020.06.07 |
| VB.NET의 클래스와 모듈 (0) | 2020.06.07 |
| 파이썬에서 전체 경로 파일 이름 작성 (0) | 2020.06.07 |