Databases - Santhi's Blog

BASE Concepts

In this article we will look at concepts of BASE. BASE means Basically Available Soft State Eventual consistency. It’s used in distributed computing to achieve high availability. BASE properties explained below Data is available most of the time Replicas are not consistent all the time Data will become consistent eventually with no guarantee by when

CAP Theorem

In this article, we will look at the basics of CAP Theorem. CAP stands for Consistency, Availability, Partition Tolerance. It’s also called Brewer’s theorem and at best only 2 will be followed & 1 will be sacrificed. Let’s take a look the details below Consistency: User should be able to see the same data irrespective

Distributed ACID Transactions

ACID means Atomicity, Consistency, Isolation and Durability.  Let’s look at each of these properties below Atomicity – Each transaction is all or nothing Consistency – Data should be valid according to all defined rules & remains in consistent state Isolation – Transactions don’t affect each other Durability – Committed data would not be lost, even

Horizontal & Vertical Scalability

In this article, we will look at the details of horizontal and vertical scaling. Scalability describes the ability of the system to adapt to changes and demand. We can scale up, down and out accordingly. Application success mostly rely on the handling traffic during peaktime and we underestimate them during early stages which will result

Comparison of SQL, NoSQL, NewSQL and Distributed SQL

In this article, we will look at the comparison of different databases.   Below table illustrates the comparisons Feature SQL NoSQL NewSQL Distributed SQL Schema Relational Schema-less Both Both Scalability Vertical Horizontal Horizontal Horizontal Consistency Strong Eventual Strong Strong Availability Low High Low High Distributed No Yes Yes Yes ACID Yes No (BASE) Yes Yes

ACID Properties

ACID means Atomicity, Consistency, Isolation and Durability.  Lets look at each of these properties with examples below Atomicity: Each transaction is all or nothing Example: When user purchases any item and does payment, let’s assume we have two transactions. If first transaction fails, then next one will also be a failure. Both will happen together

Distributed SQL Basics

In this article, we will look at the basics of Distributed SQL. In 2012, Google’s spanner has coined the concept of Distributed SQL databases. What is Distributed SQL? Its single relational database deployed on a cluster of network servers. It automatically replicates and distributes data among the server nodes. It is strongly consistent and provides

NewSQL Basics

In this article, we will look at the basics of NewSQL. NewSQL was first conceived in 2011 by Matthew Aslett in a research paper. What is NewSQL? NewSQL is a database language based on concepts of RDBMS & NoSQL. It combines the performance of NoSQL (horizontal scaling) and reliability (ACID properties – Atomicity, Consistency, Isolation

NoSQL Basics

In this article, we will look at the basics of NoSQL and advantages/disadvantages. NoSQL stands for Not Only SQL. It is widely used in big data and other real-time web applications. It supports handling variety of data: structured, semi-structured and unstructured. What is NoSQL? – It is non-relational             . It doesn’t adhere to relational

Types of JOINs in SQL

A join in SQL is a statement that combines data from one or two tables based on common field or matching condition. In this article, we will see the different type of JOINs in SQL with examples. Types of JOINs: Inner JOIN: Example: Student Table: StudentID StudentName 1 Raj 2 Nanda 3 Arjun Course Table: