Untested Chapter Notes Flashcards
CAP theory
Consistency
* All replicas contain the same version of data
* Client always has the same view of the data(no matter what node)
Availability
* System remains operational on failing nodes
* All clients can always read and write
Partition tolerance
* Partition tolerance means that entire clusters can still work even if a network
partition causes communication interruption between nodes.
* System remains operational on system split(communication malfunction)
* System works well across physical network partitions
What is Oracle RAC
Oracle Real Application Clusters (RAC) allow
customers to run a single Oracle Database across
multiple servers to maximize availability and enable
horizontal scalability, while accessing shared storage.
Sharding
Uses range-based partitioning to distribute documents based on a
specific shard key
* Shard key: a single indexed field for now
How does NoSQL differ from RDBMS?
- Looser schema definition
- Designed to handle distributed, large databases
- Query language through the API
- Relaxation of the ACID (Atomicity, Consistency, Isolation, Durability)
properties
SQL Database is horizontally scalable while NOSQL is vertically scalable T/F
False
Benefits of NoSQL
- Elastic Scaling
- DBA Specialists
- Big Data
- Flexible data models
- Economics:
- No SQL: clusters of cheap commodity servers to manage the data and transaction volumes- Cost per gigabyte or transaction/second for NoSQL can be lower than the cost for a RDBMS
Drawbacks of NoSQL
- Support: New open source projects with startup support; no reputation
- Maturity: still implementing their basic feature set
- Administration: no administrator necessary however NoSQL still requires effort to maintain
- Lack of Expertise
- Analytics and Business Intelligence
MongoDB
Developed in C++ by 10gen founded in 2007
NoSQL database
* Hash-based, schema-less database
* No Data Definition Language
* Uses BSON format: Binary of JSON
* Supports APIs (drivers) in JavaScript, Python, Ruby, Perl, Java, C#, C++.
JSON
JavaScript Object Notation – language independent
* JSON is a lightweight format for storing and transporting data.
JSON Data types
a string, a number, an object (JSON object), an array, a boolean, a null
BSON
a binary-encoded serialization of JSON-like documents.
Advantages of MongoDB
Speed, Sharding, Flexible Database, Horizontal Scalability
Disadvantages of MongoDB
Joins not supported, limited data size
Applications of MongoDB
- Web Content Management
- Real-Time Analytics
- Internet of Things (IoT)
Is MongoDB ACID compliant?
No