This content originally appeared on DEV Community and was authored by Gilbert korir
Introduction to database
What is a database?
A database is a tool for collecting and organizing information. Databases can store information about people, products, orders, or anything else.
A computerized database is a container of objects. One database can contain more than one table. For example, an inventory tracking system that uses three tables is not three databases, but one database that contains three tables.
Types of databases
Databases can be classified into two primary types Relational (SQL) and NoSQL Databases.
NoSQL is then further divided into four types: Document-oriented, Key-Value, Wide-Column, and Graph databases.
1. Relational Databases (RDBMS)
Relational databases organize data into tables made up of rows (records) and columns (fields). They use schemas (blueprints) to define how data is structured and how different tables relate to each other.
- Strict schema-based structure.
- Primary Keys (unique IDs) and Foreign Keys (relationships between tables).
- Strong ACID compliance (Atomicity, Consistency, Isolation, Durability).
- Ideal for structured data.
- Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server.
2. NoSQL Databases
"NoSQL" stands for "Not Only SQL". These databases are designed to handle unstructured or semi-structured data, such as text, images, videos or sensor data. They don’t rely on the traditional table format.
Key examples include MongoDB, Cassandra, and DynamoDB.
- Flexible data models (no fixed schema).
- Scales horizontally for high-volume data.
- Often optimized for specific use cases like graphs or time-series data.
Sub-Types of NoSQL Databases are:
Document Databases – Store data as JSON-like documents. (Example: MongoDB)
Key-Value Stores – Store simple key–value pairs for fast lookups. (Example: Redis)
Columnar Databases – Store data by columns for analytics. (Example: Apache Cassandra)
Graph Databases – Store nodes & relationships for connected data. (Example: Neo4j)
Database Usage
1. Uses of RDBMS.
- RDBMS is used in Customer Relationship Management.
- It is used in Business Intelligence.
- It is used in Data Warehousing.
- It is used in Online Retail Platforms.
- It is used in Hospital Management Systems.
- Banking and Finance: Handles financial transactions, account balances, and credit card processing.
- Healthcare: Manages patient records, medical information, lab results, and other electronic health data.
- Education: Stores student information, academic records, and course details.
- Airlines: Manages flight schedules, passenger data, and ticket information.
2. Use of NoSQL
- Big Data Applications: Efficiently stores and processes massive amounts of unstructured and semi-structured data.
- Real-Time Analytics: Supports fast queries and analysis for use cases like recommendation engines or fraud detection.
- Scalable Web Applications: Handles high traffic and large user bases by scaling horizontally across servers.
- Flexible Data Storage: Manages diverse data formats (JSON, key-value, documents, graphs) without rigid schemas.
Database schemas
A database schema provides a comprehensive blueprint for the organization of data, detailing how tables, fields, and relationships are structured. Read to learn about the schema types, such as star, snowflake, and relational schemas.
example
Key components are and how they contribute to the overall database schema:
- Table is a collection of related data organized in rows and columns.
- Field is a column that contains information within a table.
- Data type specifies the kind of data a field can contain (e.g., integer, varchar, date).
DDL and DML
DDL stands for Data Definition Language and refers to SQL commands used to create, modify, and delete database structures such as tables, indexes, and views. DML stands for Data Manipulation Language and refers to SQL commands used to insert, update, and delete data within a database.
DDL Commands in SQL with Examples
CREATE TABLE Employees (
EmployeeID INT,
FirstName VARCHAR(255),
LastName VARCHAR(255),
Department VARCHAR(255)
);
ALTER TABLE Employees
ADD Salary INT;
DROP TABLE Employees;
DML Commands in SQL with Examples
INSERT INTO Employees (EmployeeID, FirstName, LastName, Department)
VALUES (1, 'John', 'Smith', 'IT');
UPDATE Employees
SET Salary = 50000
WHERE EmployeeID = 1;
SELECT * FROM Employees;
DELETE FROM Employees
WHERE EmployeeID = 1;
This content originally appeared on DEV Community and was authored by Gilbert korir

Gilbert korir | Sciencx (2025-10-04T16:18:09+00:00) Database Fundamentals. Retrieved from https://www.scien.cx/2025/10/04/database-fundamentals-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.