# README

## Databases

Can have a master slave distrubuting reads

Can have sharding handle different parts of requests

*See AWS Storage*

## SQL VS NoSQL

SQL

* battle-tested and refined
* better consistency/ACID(Atomic Consisent Isolation Durability)

NoSQL

* easier to use
* more scalable(not a real problem until massive)
* faster joins

### SQL

**SQL** has tables and a schema managed by a **RDMS**(Relational Database Management System)

* battle-tested and refined
* better consistency/ACID(Atomic Consisent Isolation Durability)

### NoSQL

* easier to use
* more scalable(not a real problem until massive)
* faster joins
* no complex transactions or constraints on data
* BASE(Basically Available Soft-state Eventual Consistency) trades C and I for availability, graceful degradation, and performance

**Types of SQL**

* Key value store i.e Memcached, Redis
* Tabular i.e BigTable(Google)
* Document Oriented i.e Mongodb

#### Data Warehousing

Hadoop is good for huge(PB) analytics using distrubuted file systems based on GFS(google file system) from paper in 2003

Map Reduce is used to do analytics

Hive Query Language is used to turn SQL queries into Map Reduce Jobs


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://openai.gitbook.io/code-cheatsheets/all/databases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
