Featured Post

SQL Interview Success: Unlocking the Top 5 Frequently Asked Queries

Image
 Here are the five top commonly asked SQL queries in the interviews. These you can expect in Data Analyst, or, Data Engineer interviews. Top SQL Queries for Interviews 01. Joins The commonly asked question pertains to providing two tables, determining the number of rows that will return on various join types, and the resultant. Table1 -------- id ---- 1 1 2 3 Table2 -------- id ---- 1 3 1 NULL Output ------- Inner join --------------- 5 rows will return The result will be: =============== 1  1 1   1 1   1 1    1 3    3 02. Substring and Concat Here, we need to write an SQL query to make the upper case of the first letter and the small case of the remaining letter. Table1 ------ ename ===== raJu venKat kRIshna Solution: ========== SELECT CONCAT(UPPER(SUBSTRING(name, 1, 1)), LOWER(SUBSTRING(name, 2))) AS capitalized_name FROM Table1; 03. Case statement SQL Query ========= SELECT Code1, Code2,      CASE         WHEN Code1 = 'A' AND Code2 = 'AA' THEN "A" | "A

4 Modern databases Every Developer Should Know

Below is the complete list of NoSQL databases currently available in the market.

NoSQL Databases
NoSQL Databases

1. Sorted Order Column Oriented Stores

  1. Google's Bigtable espouses a model where data is stored in a column-oriented way. This contrasts with the row-oriented format in RDBMS.
  2. The column-oriented storage allows data to be stored effectively. It avoids consuming space when storing nulls by simply not storing a column when a value doesn't exist for that column.
  3. Each unit of data can be thought of as a set of key/value pairs, where the unit itself is identified with the help of a primary identifier, often referred to as the primary key. Bigtable and its clones tend to call this primary key to the row-key.
Example:
The name column-family bucket stores the following values:
 For row-key: 1
 first_name: John
 last_name: Doe
 For row-key: 2
 first_name: Jane
The location column-family stores the following:
For row-key: 1
zip_code: 10001
For row-key: 2
zip_code: 94303
The profile column-family has values only for the data point with row-key 1 so it stores only the following:
 For row-key: 1
 gender: male
Databases under this category:
  • Hyper Table
  • Cloudera
  • Hbase

2. Key/Value Pair Stores

  1. HashMap or an associative array is the simplest data structure that can hold a set of key/value pairs. Such data structures are extremely popular because they provide a very efficient, big O(1) average algorithm running time for accessing data.
  2. The key of a key/value pair is a unique value in the set and can be easily looked up to access the data.
  3. Key/value pairs are of varied types: some keep the data in memory and some provide the capability to persist the data to disk. Key/value pairs can be distributed and held in a cluster of nodes.
  4. Oracle's Berkeley DB. Berkeley DB is a pure storage engine where both key and value are an array of bytes. The core storage engine of Berkeley DB doesn't attach meaning to the key or the value. It takes byte array pairs in and returns the same back to the calling client.
  5. Berkeley DB allows data to be cached in memory and flushed to disk as it grows. There is also a notion of indexing the keys for faster lookup and access.
Databases under this category:
  • Membase
  • Kyoto Cabinet
  • Redis
  • Cassandra
  • Voldemart
  • Riak

3. Document Databases

  1. Document databases are not document management systems. More often than not, developers starting out with NoSQL confuse document databases with document and content management systems. The word document in document databases connotes loosely structured sets of key/ value pairs in documents, typically JSON (JavaScript Object Notation), and not documents or spreadsheets (though these could be stored too).
  2. Document databases treat a document as a whole and avoid splitting a document into its constituent name/value pairs. At a collection level, this allows for putting together a diverse set of documents into a single collection. Document databases allow indexing of documents on the basis of not only its primary identifier but also its properties. 
  3. A few different open-source document databases are available today but the most prominent among the available options are MongoDB and CouchDB.
Databases under this category:
  • MongoDB
  • CouchDB

4. Graph Database

Graph databases and XML data stores could also qualify as NoSQL databases.
Databases under this category:
  • Neo4j
  • FlockDB

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

Explained Ideal Structure of Python Class

How to Check Kafka Available Brokers