Watching:  

Getting Started with NoSQL


Author: Subject Coach
Added on: 2nd Jan 2015

 
Please note: You need to login to view this resource

This course introduces you to NoSQL databases and touch on various subjects. We will use CouchDb to explain things that are common with many NoSQL databases. 

This course is divided into 16 chapters

  1. Intro
  2. Prerequisites 
  3. What is NoSQL
  4. What kinds of data stores are available.
  5. Learn CAP theorem
  6. When to use NoSQL databases.
  7. CouchDB
  8. Install CouchDB on Windows
  9. Install CouchDB on Linux.
  10. Storing data
  11. Retreive stored data
  12. Querying data, Creating customer views and using Map Reduce function
  13. A word on attachments, querying attachments and deplying a simple webpage application on CouchDB
  14. Securing CouchDB
  15. Partitioning
  16. Other NoSQL databases and  A word on where to go from here.

 

We hope that you will enjoy this course. If you have any feedback please send it through.

Author: Subject Coach
Added on: 2nd Jan 2015

Please get in touch with your teacher or tutor in case you have a question related to this lesson

None just yet!

What is database partitioning?

Partitioning is where we split data into distinct individual parts, to improve manageability, performace etc.

Partitioning is performed using a consitent partitioning criteria. There are 4 such criterias.

One! Range partitioning, Selects a partition by determining if the partitioning key is inside a certain range. An example could be a partition for all rows where the column zipcode has a value between 3000 and 3999.

Two! List partitioning, A partition is assigned a list of values. If the partitioning key has one of these values, the partition is chosen. For example all rows where the column Country is either Iceland, Norway, Sweden, Finland or Denmark could build a partition for the Nordic countries.

Three! Hash partitioning, The value of a hash function determines membership in a partition. Assuming there are four partitions, the hash function could return a value from 0 to 3.

Four! allows for certain combinations of the above partitioning schemes, by for example first applying a range partitioning and then a hash partitioning. Consistent hashing could be considered a composite of hash and list partitioning where the hash reduces the key space to a size that can be listed.


What are the benefits of partitioning?


Partitioning can provide tremendous benefits to a wide variety of applications by improving manageability, performance, and availability. It is not unusual for partitioning to improve the performance of certain queries or maintenance operations by an order of magnitude. Moreover, partitioning can greatly reduce the total cost of data ownership, using a “tiered archiving” approach of keeping older relevant information still online on low cost storage devices. Oracle Partitioning enables an efficient and simple, yet very powerful approach when considering Information Lifecycle Management for large environments.
Partitioning also enables database designers and administrators to tackle some of the toughest problems posed by cutting-edge applications. Partitioning is a key tool for building multi-terabyte systems or systems with extremely high availability requirements.

So When is partitioning is not required?
There are some scenarios where partitioning is not required. These scenarios include,
one! If your Dataset is too small.
two! When traffic to your website or application is not too much and you are not expecting it to peak, and few dataset is not more than few Gigs of data.

Horizontal versus Vertical partitioning!

Horizontal partitioning also known as Sharding, involves putting different rows into different tables. Perhaps customers with ZIP codes less than 3000 are stored in Melbourne East, while customers with ZIP codes greater than or equal to 3000 are stored in Melbourne City. A view can be created with a union between 2 tables to provide user with a complete view.
Vertical partitioning involves creating tables with fewer columns and using additional tables to store the remaining columns. Normalization also involves this splitting of columns across tables, but vertical partitioning goes beyond that and partitions columns even when already normalized. In vertical partitioning, different physical storage might be used.

With regards to partitioning in NoSQL and RDBMS, NoSQL and RDBMS partitioning is very similar, Most NoSQL databases are designed with partitioning in mind. Knowing how partitioning works is key to making informed decisions about your DB performance.