Database: Explained!!!

Database: Explained!!!

In the age of technology, your phone serves you byte-sized juicy information every time you open it. From where this information comes??? Yes, you are right from Databases.

Data is everywhere. This is how it used to store so much data in the pre-digital age, data → pages → file → folders → cupboards → rooms

But now we live in the digital age, data(bits) → transistors → memory chip → database → data centers

Data organized in the databases is in the form of tables, rows, columns, and indexes.

Technically database is the collection of data where data is easy to access and manage.

There are various type of databases such as,

  • Single file: Like excel sheets
  • Relational DB: Where data is stored in tables and these tables have some relations between them
  • Non-Relational DB: Here data is stored using the storage models

To work with all these databases we have DataBase Management Systems(DBMS).

DBMS is the software that helps us to retrieve, update and store data.

Some of the examples are,

Relation DBMS : MySQL, PostgreSQL, MariaDB etc.

Non-Relation DBMS : MongoDB, CouchDB etc.

There are various architectures of Databases that are self-explanatory like,

1-Tier architecture: Where your database is present in your computer and all operations you perform reflect the local environment.

2-Tier Architecture: Where all the multiple clients are connected to single memory storage aka database.

The operations performed by the different clients get reflected in that single central storage.

3-Tier Architecture:
Here we have servers in between clients and the database.

This middle layer will work to pull and push the data for the users.

3-Tier architecture.png

Here we have servers in between clients and the database.

This middle layer will work to pull and push the data for the users.

Let's take the example of Twitter,

When you write a tweet on your phone and press the tweet button, it will get stored in the database through the application and middle server where the code is written.

This tweet now gets stored inside a database so whenever you want to watch it you just have to do few clicks on your Twitter App and it appears in front of you within a fraction of seconds.

This tweet is now also available for all Twitter users, this tweet is get fetched from the Twitter database in the feed of your followers through the server.

Databases are great to work with and they are the backbone of any application.

You always feel half confident if you don't know how to use them as a developer so go and learn them.

Plenty of free resources are available on the internet, and you can fetch them in your machine within few clicks😉.

For more coding and tech-related content don't forget to follow.