Featured Post

15 Python Tips : How to Write Code Effectively

Image
 Here are some Python tips to keep in mind that will help you write clean, efficient, and bug-free code.     Python Tips for Effective Coding 1. Code Readability and PEP 8  Always aim for clean and readable code by following PEP 8 guidelines.  Use meaningful variable names, avoid excessively long lines (stick to 79 characters), and organize imports properly. 2. Use List Comprehensions List comprehensions are concise and often faster than regular for-loops. Example: squares = [x**2 for x in range(10)] instead of creating an empty list and appending each square value. 3. Take Advantage of Python’s Built-in Libraries  Libraries like itertools, collections, math, and datetime provide powerful functions and data structures that can simplify your code.   For example, collections.Counter can quickly count elements in a list, and itertools.chain can flatten nested lists. 4. Use enumerate Instead of Range     When you need both the index ...

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

SQL Query: 3 Methods for Calculating Cumulative SUM

Big Data: Top Cloud Computing Interview Questions (1 of 4)