Font size
  • A-
  • A
  • A+
Site color
  • R
  • A
  • A
  • A
Skip to main content
Readepert
  • Home
  • Calendar
  • Course Categories
    Programming Languages AI, ML And Data Science
  • Exams
  • Results
  • Tutorials
  • Books
  • Colleges
  • Universities
  • Schools
  • Webstes
  • Software & Tools
  • Compilers & Practice Tools
  • More
You are currently using guest access
Log in
Readepert
Home Calendar Course Categories Collapse Expand
Programming Languages AI, ML And Data Science
Exams Results Tutorials Books Colleges Universities Schools Webstes Software & Tools Compilers & Practice Tools
Expand all Collapse all

What is a Database?

  1. Dashboard
  2. Courses
  3. Programming Languages
  4. SQL
  5. Module 1: Introduction to Databases And SQL
  6. What is a Database?
Completion requirements

1. Definition of a Database

A database is an organized collection of data that can be stored, managed, and retrieved efficiently using a computer system.

Think of it as a digital filing cabinet:

  • A file cabinet stores documents β†’ A database stores information.

  • A folder groups related documents β†’ A table groups related records.

  • Each page in a folder has details β†’ Each row in a table has information.

πŸ‘‰ In short:

  • Data = raw facts (e.g., "John", "Salary: 50,000").

  • Database = a structured way of storing these facts so they can be searched, updated, and analyzed efficiently.

Key Features of Databases:

  • Structured storage β†’ Organized into tables, rows, and columns.

  • Efficient retrieval β†’ Allows fast searching and filtering.

  • Data integrity β†’ Ensures accuracy and consistency.

  • Security β†’ Controls who can access or change the data.

  • Scalability β†’ Handles growing amounts of data.

Example:
An Employee Database may have a table like this:

Employee_ID Name Department Salary Hire_Date
101 John HR 50,000 2018-05-20
102 Alice IT 70,000 2019-01-15
103 Raj Finance 65,000 2020-03-01

2. Difference Between Relational (RDBMS) and Non-Relational (NoSQL) Databases

Databases are broadly categorized into two types:

A. Relational Databases (RDBMS)

  • Store data in tables (rows and columns).

  • Relationships are established between tables using primary keys and foreign keys.

  • Use SQL (Structured Query Language) for data retrieval and manipulation.

  • Ensure ACID properties (Atomicity, Consistency, Isolation, Durability) β†’ reliable transactions.

Example:

  • Employees table and Departments table linked by Department_ID.

  • Query to find all employees in IT:

    Β 
    SELECT name FROM employees WHERE department_id = 2;

Pros:
βœ” Structured & reliable
βœ” Strong data integrity
βœ” Great for complex queries

Cons:
✘ Rigid schema β†’ not flexible for rapidly changing data
✘ Scaling horizontally (across many servers) can be difficult


B. Non-Relational Databases (NoSQL)

  • Store data in flexible formats:

    • Document-based (JSON/XML) β†’ MongoDB

    • Key-Value β†’ Redis

    • Columnar β†’ Cassandra

    • Graph-based β†’ Neo4j

  • No fixed schema β†’ data can change frequently.

  • Designed for big data and high scalability.

  • Prioritize speed and flexibility over strict consistency.

Example (Document Database – MongoDB):

Β 
{ "employee_id": 101, "name": "John", "department": "IT", "skills": ["SQL", "Python", "AWS"] }

Pros:
βœ” Handles unstructured/semi-structured data
βœ” Scales easily across servers
βœ” High performance for read/write operations

Cons:
✘ Weaker consistency in some models
✘ Not ideal for complex relational queries


βœ… Quick Comparison:

Feature Relational (RDBMS) Non-Relational (NoSQL)
Data Format Tables (rows & columns) Documents, Key-Value, Graph, Columns
Schema Fixed, structured Flexible, dynamic
Language SQL Varies (MongoQL, CQL, APIs)
Best For Structured data, transactions Big Data, real-time apps
Example Systems MySQL, PostgreSQL, Oracle MongoDB, Redis, Cassandra

3. Popular RDBMS

Let’s look at the most widely used relational databases:

πŸ”Ή MySQL

  • Open-source, widely used for web applications.

  • Powers platforms like WordPress, Facebook (early days).

  • Great for small to medium-sized projects.

πŸ”Ή PostgreSQL

  • Advanced, open-source RDBMS.

  • Supports complex queries, JSON data, full-text search.

  • Strong in analytics, geospatial data, data science use cases.

πŸ”Ή SQL Server (by Microsoft)

  • Enterprise-grade, widely used in corporate environments.

  • Deep integration with Microsoft ecosystem (Excel, Power BI, .NET).

  • Offers both on-premise and cloud (Azure SQL) options.

πŸ”Ή Oracle Database

  • Extremely powerful, secure, and feature-rich.

  • Used by large enterprises (banking, telecom, governments).

  • Strong in performance tuning and large-scale data handling.

πŸ”Ή SQLite

  • Lightweight, file-based database (no server required).

  • Often embedded in mobile apps, IoT devices, local tools.

  • Example: Your phone’s contact list is stored in SQLite.


4. Use-Cases of Databases

Databases are everywhere. Here are some industry examples:

πŸ”Έ Banking & Finance

  • RDBMS is preferred for transactions (must be accurate & consistent).

  • Example: Storing customer accounts, tracking deposits/withdrawals.

  • Queries: Checking balance, fraud detection, loan history.

πŸ”Έ E-commerce

  • Hybrid use (RDBMS + NoSQL).

  • RDBMS β†’ Orders, payments, inventory.

  • NoSQL β†’ Product recommendations, user browsing history.

  • Example: Amazon β†’ structured transactions + NoSQL for personalization.

πŸ”Έ Social Media

  • NoSQL dominant because of unstructured data (posts, likes, comments).

  • Example: Facebook uses Cassandra, Instagram uses PostgreSQL + NoSQL.

  • Graph Databases (Neo4j) for friend relationships.

πŸ”Έ Analytics & Big Data

  • NoSQL + RDBMS combo.

  • Example: Netflix uses Cassandra (NoSQL) for streaming data + MySQL for user accounts.

  • Data warehouses (Snowflake, BigQuery, Redshift) for reporting.


🎯 Summary

  • A database organizes and manages data for efficient use.

  • RDBMS = structured, reliable, SQL-based, great for transactions.

  • NoSQL = flexible, scalable, great for unstructured/big data.

  • Popular RDBMS: MySQL, PostgreSQL, SQL Server, Oracle, SQLite.

  • Real-world use-cases: banking (transactions), e-commerce (orders + recommendations), social media (user data), analytics (big data insights).

This lesson is not ready to be taken.
Previous activity Index and Course Goals
Next activity Understanding Tables, Rows, and Columns

Contact us

Follow us

You are currently using guest access (Log in)
Data retention summary
Get the mobile app
Get the mobile app
Play Store App Store
Powered by Moodle

This theme was proudly developed by

Readexpert.com