Module 1 - Introduction to SQL

Lesson 1.1: What is a Database?

A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is managed by a database management system (DBMS). The data within databases is modeled in rows and columns in a series of tables to make processing and querying efficient.

Databases are used to store, manage, and retrieve information. They are crucial for applications that require data storage, such as websites, business systems, and mobile apps.

Lesson 1.2: Different Types of Databases

Databases can be categorized based on their structure, the type of data they store, and how they store and manage data. Here are two main types of databases:

Section 1.2.1: Relational Databases (RDBMS)

Relational databases are a type of database that store and organize data in tables consisting of rows and columns. Each row represents a record, and each column represents a field or attribute of the data. These databases use structured query language (SQL) for managing and querying data. They are highly suitable for structured data with well-defined relationships.

<aside> 👉🏻 Real-world scenario: Imagine planning a wedding with a detailed spreadsheet: columns for names, phone numbers, addresses, and RSVP status. Each row represents a guest, and each column represents specific information. This organized format mirrors a relational database that stores and manages data in tables, making it easy to query and update using SQL.

</aside>

Examples: MySQL, PostgreSQL, Oracle Database, Microsoft SQL Server.

Section 1.2.2: NoSQL Databases

Non-relational databases, often referred to as NoSQL databases, are a type of database that diverges from the traditional tabular structure of relational databases. They are designed to handle unstructured or semi-structured data, which doesn't fit neatly into tables.

NoSQL databases use various data models like key-value pairs, documents, column families, and graphs to store and represent data. These databases are known for their flexibility, scalability, and ability to handle large volumes of data efficiently.

<aside> 👉🏻 Real-world scenario: Creating a memory book for a wedding, with diverse content like photos, stories, and videos, is similar to a NoSQL database. Unlike rigid spreadsheets, NoSQL databases handle unstructured or semi-structured data with flexibility and scalability. They store varied data types efficiently, just like your customized scrapbook pages.

</aside>

Examples: MongoDB, Redis, Neo4j, Apache Cassandra.

Lesson 1.3: Understanding Tables, Relationships, and Schemas

In database management, tables, relationships, and schemas are fundamental concepts that structure and define how data is stored, organized, and related.