Practical Example: Types of Databases and SQL

Choosing SQL vs. NoSQL for a Project

Problem Statement: You are designing the database architecture for two distinct applications:
  1. A banking application that processes complex financial transactions where accuracy is paramount.
  2. A social media platform's real-time chat application where messages are unstructured and speed/scalability is critical. Determine the best database type for each.

Step-by-Step Solution

0 of 2 Steps Completed
1

Practical Example: Database Normalization

Normalizing a Spread-sheet to 3NF

Problem Statement: A company stores all employee data in a single massive spreadsheet table: EmployeeID, Name, DepartmentName, ManagerName, ProjectID. This causes data redundancy (repeating Department Names for every employee). Normalize this data to the Third Normal Form (3NF).

Step-by-Step Solution

0 of 3 Steps Completed
1

Practical Example: Structured Query Language (SQL)

Writing Basic SQL Queries (CRUD)

Problem Statement: Using a normalized Employees table (Columns: id, name, role, salary), write the four fundamental CRUD operations in SQL.

Step-by-Step Solution

0 of 4 Steps Completed
1

Practical Example: Advanced SQL Queries

Constructing a Complex Selection Query

Problem Statement: You have a table called Employees with columns EmployeeID, Name, Department, and Salary. Write a query to find all employees in the 'Engineering' department who earn more than 50,000, and sort them by salary in descending order.

Step-by-Step Solution

0 of 4 Steps Completed
1

Practical Example: Relational Joins

Combining Data with INNER JOIN

Problem Statement: You have two tables: Orders (OrderID, CustomerID, Date) and Customers (CustomerID, CustomerName). Write a query to list every OrderID alongside the actual name of the customer who placed it.

Step-by-Step Solution

0 of 3 Steps Completed
1

Practical Example: Transaction Management (ACID)

Simulating a Bank Transfer Failure

Problem Statement: A bank customer initiates a $500 transfer from Account A to Account B. Halfway through the transaction, the database server loses power. Explain how the ACID properties (specifically Atomicity and Durability) protect the data in this scenario.

Step-by-Step Solution

0 of 3 Steps Completed
1