What is NOSQL??
CAP Theorem
NOSQL Database Types
Elasticsearch Definition
why we use ElasticSearch
ElasticSearch Mapping and Query
Ali Balci
NoSql class of DB Management system that dont follow rules of relation DBMS and cannot use SQL to query data.This type of not generally replacement but rather complemantry to RDBMS and SQL
Database replication for reading performance
Database partition for writing
performance
Scalability is the ability of a system, network, or process to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth.
Building performance into a software system was simple - you either increased your hardware resources (scale up) or modified your application to run more efficiently (performance tuning). Today, there's a third option: horizontal scaling (scale out).
Vertical Scaling (Scale-up): Generally refers to adding more processors and RAM, buying a more expensive and robust server.
Horizontal Scaling (Scale-out): Generally refers to adding more servers with less processors and RAM. This is usually cheaper overall and can literally scale infinitely (although we know that there are usually limits imposed by software or other attributes of an environment’s infrastructure)
The CAP Theorem states that, in a distributed system (a collection of interconnected nodes that share data.), you can only have two out of the following three guarantees across a write/read pair: Consistency, Availability, and Partition Tolerance - one of them must be sacrificed.
Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License.
Inverted index:is an index data structure storing a mapping from content, such as words or numbers
T[0] = "it is what it is" T[1] = "what is it" T[2] = "it is a banana"
"a": {2} "banana": {2} "is": {0, 1, 2} "it": {0, 1, 2} "what": {0, 1}
search for the terms "what", "is" and "it"
full inverted index
"a": {(2, 2)}
"banana": {(2, 3)}
"is": {(0, 1), (0, 4), (1, 1), (2, 1)}
"it": {(0, 0), (0, 3), (1, 2), (2, 0)}
"what": {(0, 2), (1, 0)}
Full Text Search
Clustering
Horizontal Scalability
Read and Write Efficiency
Fault Tolerant
REST API with JSON
post /_search
{
"query": {
"match_all": {}
}
}
post /_search
{
"query": {
"match": {
"brandId": "421"
}
}
}
POST /_search
{
"size": 20,
"from": 10,
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"nested": {
"path": "navigations",
"query": {
"term": {
"navigations.navigationId": {
"value": "736"
}
}
}
}
}
}
}
}
Query DSL