System Design-1

Hello friends, in this article we will learn about what is system design and why it is important to build scalable and robust applications.

Who am I ? I am a professional programmer and system architect and I’ll guide you in the journey to build scalable and robust system.

What is System Design?

System design is the process of defining the elements of a system, as well as their interactions and relationships, in order to satisfy a set of specified requirements.

Basically, we break the problem statement into small component and we design those component in such way that all component works efficient as whole to achieve the requirements.

What is data Intensive Application ?

In the realm of system design, data stands as a central pillar. we can not change the system at the speed at which data is changing. Therefore, when we design any system then we must place data at the center of the whole system.

Recognizing this, distributed systems emerge as a potent solution. They offer a pathway to design systems that are not only scalable but also capable of keeping pace with the ever-changing landscape of data. By decentralizing data across multiple nodes, we can enhance system performance, improve reliability, and ensure seamless scalability.

What is distributed system In terms of database?

In terms of database, a database that runs and stores data across multiple servers, as opposed to doing everything on a single server.

Distributed databases operate on two or more interconnected servers on a computer network. so to understand distributed systems first we have to understand database.

Types of database?

. SQL (Relation Database)

. NO-SQL

SQL have fixed schema. while designing database we need to think a lot that how schema should be, also we need to take care of relation between different tables. SQL does not support horizontal scaling.

NO-SQL does not have fixed schema so to store complex data NO-SQL play’s a significant role also it support horizontal scaling that’s why usually NO-SQL have some advantage over SQL while designing scalable distributed system.

— >Types of NO-SQL database

. Key-Value DB :- is a type of database that stores data as a collection of key-value pairs. In this type of data store, each data item is identified by a unique key, and the value associated with that key can be anything, such as a string, number, object, or even another data structure. One of the example of Key-Value DB is Redis, which is an in-memory database which we use for caching.

. Document DB :- In a document database, the data is stored in documents. Each document is typically a nested structure of keys and values. The values can be atomic data types, or complex elements such as lists, arrays, nested objects, or child collections. MongoDB is an example of Document oriented NO-SQL database.

. Graph DB:- are used to store and query highly connected data. Data can be modeled in the form of entities (also referred to as nodes, or vertices) and the relationships between those entities (also referred to as edges).

. Column oriented DB:- is a type of NoSQL database that stores data in columns rather than rows, making it highly scalable and flexible. Unlike traditional relational databases, which have a fixed number of columns and data types, wide column data stores allow for a variable number of columns and support multiple data types.

Next we will deep dive into distributed system and CAP theorem.