Exploring Database Management Systems: The Basics and Beyond

Maleesha Kumarasinghe
3 min readAug 13, 2024

--

Database management system is a structured collection of data stored in a way that allows easy access, management, and updating. It uses tables, schemas, or other formats to organize data. a database system helps store, retrieve, and manage data in an organized manner, making it easier to maintain and use large volumes of information.

There are two type of database:

  1. Relational Database
  2. Non- relational database

Relational Database

A relational database is a foundational technology for managing and organizing data in a structured and efficient manner. data is organized into tables, each of which consists of rows and columns. Each table represents a specific entity or concept, such as customers, orders, or products. SQL is the standardized language used to interact with relational databases.

Popular relational databases include MySQL and SQL Server, which use SQL (Structured Query Language) for querying and managing data, earning them the nickname “SQL databases.”

There are types of relationships.

  1. One to one
  2. One to many
  3. Many to many

Lets see them briefly !!

One-to-One Relationship: Imagine each employee having a unique set of details. John Smith in the “Employee” table will have a corresponding unique record in the “EmployeeDetails” table. No one else will share his details.

One-to-Many Relationship: Think of a single customer making multiple orders. Here, one customer record in the “Customer” table links to several order records in the “Orders” table, but each order links back to only one customer.

Many-to-Many Relationship: Envision students enrolling in multiple courses, and each course having multiple students. This complex relationship is managed through a junction table that bridges the connection between students and courses.

Non-Relational Database

A non-relational database, also known as a NoSQL database, is a type of database that does not use the traditional relational model, which organizes data into tables with fixed schemas. Instead, non-relational databases store data in various flexible formats such as key-value pairs, documents, columns, or graphs. They are designed to handle large volumes of unstructured or semi-structured data and offer scalability, high performance, and flexibility, making them suitable for applications with diverse data types or evolving requirements. For example, MongoDB stores data in JSON-like documents, Redis uses key-value pairs for fast access, and Cassandra manages large datasets across multiple nodes with ease.

Non-relational databases are a go-to solution for applications requiring scalability and performance, like real-time analytics or content management systems.

Understanding the fundamental differences between relational and non-relational databases equips you to choose the right tool for your data management needs. Whether you’re working with structured data in a relational system or exploring the flexibility of a NoSQL database, both approaches offer unique advantages suited to different scenarios. 🌟📊

In the next article, we’ll dive into some basic SQL queries to get you started on mastering data manipulation. Until then, happy coding and enjoy exploring the fascinating world of databases! 🚀💻

--

--