Backend Development
So, I'm creating a blog series in which I'll cover backend programming in a way that someone with no coding knowledge can understand.
So, let's start with databases:
When you hear the word database," the first thing that comes to mind is the collection of data. and it is right.
In simple terms, a database is like a well-organised library for storing and managing different types of information. It's a place where you can easily find, add, update, and delete data, just like you would with books on library shelves.
So, there are two types of databases:
Relational Database: They use tables to store data, where each table consists of rows and columns. The data in these tables is related through keys (typically primary and foreign keys), which establish relationships between different tables.
NoSQL Database: There are more boundary divisions of this, but just for simplicity, it can be understood as databases that are different from traditional databases.
Now that you know the types of databases, it's time to understand some fundamental concepts:
Primary Key: Every row of data in a table has a unique primary key, which helps us identify the data we want for further use.
Foreign keys are also unique, but they are used to establish connections between multiple tables.
Database schema is the structuring of data, and from my point of view, it's the most important part. Let me explain this to you with an example:
Suppose you are structuring a database for a shopping app. There is a product table that contains all the product data present on that app. Now, the best practice is to add seller info to that by using a foreign key. Don’t add product to seller info because when a user searches for a product, it has to iterate through all seller table data, which overall increases the time complexity. I hope this example made the database structure understandable to you to some extent.
So, I want the blogs to be short. If you want to deep dive, I am providing some links below.
Thank you for your time.
Pushkar Mishra