Why do we have different types?
Relational (SQL) databases are like an Excel sheet or a filing cabinet. Everything must have a place. If you want to add a "Phone Number" to a student, every student row gets a "Phone Number" column, even if it's empty. This is great for banks where accuracy is key.
NoSQL databases are like a scrapbook. For one student, you might paste a photo. For another, you might write a note. For a third, you might stick a ticket stub. You don't need the same structure for everyone. This is perfect for social media, where one post has text, another has a video, and a third has a location tag.
Distributed databases cut the scrapbook into pieces and store them in different houses (servers). If one house burns down, you have copies elsewhere!
Different jobs need different tools. You wouldn't use a hammer to cut paper. Similarly, we choose the database type based on the data we have.
Relational: Like a phone book (Name, Number). NoSQL: Like a scrapbook (Photos, notes, stickers combined).
Structured Tables
Flexible Documents
Spread Across World