Comparing and Contrasting Different Data Systems

Comparing and Contrasting Different Data Systems — Interactive Notes
2 · INTERACTIVE NOTES

Comparing and Contrasting Different Data Systems

Explore how data moves from operational source systems into analytical repositories, how warehouses, marts, lakes, and lakehouses differ, how cloud infrastructure changes responsibility, and how historical data changes are controlled.

OLTP vs OLAPWarehouses & LakesStar vs SnowflakeCloud InfrastructureSCD & TCL
SOURCE SYSTEMS
PROCESSING
REPOSITORIES
INFRASTRUCTURE
DATA CHANGES
01

Data Processing: OLTP vs OLAP

This section introduces two primary processing patterns. OLTP supports large numbers of real-time database transactions, while OLAP supports complex analysis on large databases without negatively affecting transactional systems.

OLTP

Online transactional processing handles operational activity such as inserts, deletions, and queries in real time. An ATM is a familiar example of an OLTP system.

Real timeTransactionsOperational

OLAP

Online analytical processing is designed for high-volume, multidimensional analysis and can support summaries such as counts and totals across very large datasets.

AnalysisLarge datasetsReporting
QuestionOLTPOLAP
Main purposeProcess operational transactionsAnalyze data
Typical exampleATM balance, deposit, withdrawalAnalyze large volumes of transaction history
Analyst cautionPoor production queries can slow systems or alter dataDesigned to support analytical workloads
Analyst perspective

If you work directly in a production transactional system, queries require care. A warehouse or data lake is more likely to support analytical work.

02

Source Systems & Data Lineage

A source system is the system of record for a given data element—the trusted source of truth from which that information originates. Understanding lineage means knowing where data came from and how it reached the dataset you are analyzing.

Source Systems → Analytical Repository → Reporting

Different business systems can be authoritative for different data elements. Follow the arrows to see how their data can be brought together for downstream reporting.

CRM Customer information SALES Sales / order data ACCOUNTING Financial data LOGISTICS Logistics data SOURCE SYSTEMS / SYSTEMS OF RECORD ANALYTICAL REPOSITORY Integrated downstream data for analysis REPORTING & ANALYSIS downstream use Data lineage = trace a reported value backward through downstream copies REPORT → REPOSITORY → ORIGINAL SOURCE SYSTEM
How to read this illustration

The boxes on the left are separate business systems, not sequential processing steps. Each may be the system of record for particular data elements. Their data can flow into a downstream analytical repository and then into reporting. If a value in a report needs to be verified, data lineage helps the analyst trace it back toward its original source.

Why it matters

Organizations often have separate accounting, payroll, HR, CRM, sales, production, and logistics systems. A data analyst should identify the original source before relying on downstream copies.

03

Data Warehouses, Data Marts & Schemas

A data warehouse unifies company data from multiple source systems for reporting and decision-making. A data mart is a subset dedicated to a particular department or group, with access controlled around that group's needs.

CRM
HR
Accounting
DATA WAREHOUSE
Unified reporting data
Sales Mart
Finance Mart

Fact Table

Holds facts about a business process or event—often measurements or metrics—and keys that connect to dimensions. The 's Fact_ProductSales example includes product, date/time, customer, salesperson, and TotalQty.

Dimension Table

Holds descriptive or categorical attributes that give context to facts, such as customer, salesperson, product, and date details.

Example — Fact Table and Dimension Tables

The fact table records the measurable business event. Keys connect each sale to descriptive dimension tables that explain what, when, who, and which salesperson.

Fact_ProductSales
ProductKey DateKey CustomerKey SalesPersonKey TotalQty SalesAmount
10120260901501212$1,200
10220260901502221$750
10120260902503213$1,800
KEYS IN THE FACT TABLE → MATCH KEYS IN DIMENSION TABLES
Dim_Product
ProductKeyProductNameCategory
101Road BikeBikes
102HelmetAccessories
Dim_Date
DateKeyDateMonth
20260901Sep 1, 2026September
20260902Sep 2, 2026September
Dim_Customer
CustomerKeyCustomerNameRegion
501AishaCentral
502DanielNorth
503MeiSouth
Dim_SalesPerson
SalesPersonKeyNameTeam
21AlexRetail
22PriyaCorporate
Follow one row

In the first fact row, ProductKey 101 points to Road Bike, DateKey 20260901 points to Sep 1, 2026, CustomerKey 501 points to Aisha, and SalesPersonKey 21 points to Alex. The measurable facts for that event are TotalQty = 2 and SalesAmount = $1,200.

Practice with the Example SQLite Database

Download the SQLite database containing Fact_ProductSales, Dim_Product, Dim_Date, Dim_Customer, and Dim_SalesPerson. The sample rows match the tables shown above.

↓ Download Example SQLite Database .sqlite
Warehouse schema

Data warehousing commonly uses star and snowflake schemas. Both connect fact and dimension tables using keys, but organize dimensions differently.

04

Star Schema vs Snowflake Schema

Both schemas center analysis around facts and dimensions. A star schema generally uses denormalized dimensions for simplicity and performance. A snowflake schema can normalize dimensions into additional related dimension tables to reduce redundancy.

Star Schema — dimensions connect directly to the fact table
Click a table or use the buttons below. Animated dashed lines show the relationships.
FACT ProductSales TotalQty + keys DIM_PRODUCT name · category DIM_CUSTOMER name · territory DIM_DATE date · month · year DIM_SALESPERSON name · team
Star schema: the fact table is in the center and each dimension joins directly to it. The dimensions are generally denormalized, making the structure simple to understand.

Practice with Example SQLite Schemas

Download both database designs and inspect how the same sales data is modeled differently. The Star Schema keeps descriptive attributes inside its main dimension tables, while the Snowflake Schema normalizes Category, Month, Territory, and Team into additional related dimension tables.

STAR: 1 FACT + 4 DIMENSIONS SNOWFLAKE: 1 FACT + NORMALIZED DIMENSIONS
FeatureStarSnowflake
CenterSingle fact tableSingle fact table
DimensionsJoined directly to factDimensions may connect to other dimensions
Dimension designGenerally denormalizedNormalized to reduce redundancy
Visual appearanceStar-likeBranching snowflake-like structure
05

Data Lakes & Data Lakehouses

When data does not yet fit a rigid warehouse structure, organizations can use a data lake. A data lakehouse is a hybrid intended to combine useful characteristics of data lakes and data warehouses.

Data Lake

A flexible repository for large quantities of structured, semi-structured, and unstructured data. It can act as a “catch all” while data waits for cleaning or analysis.

Schema-on-readFlexible storage

Data Warehouse

Uses a pre-designed structure for reporting and decision-making, with rigor around what enters the warehouse and how it relates.

Schema-on-writeReporting

Data Lakehouse

Combines warehouse and lake characteristics, aiming for flexibility and scalable analytical use while supporting BI, analytics, machine learning, and data science.

HybridAnalytics + ML

Repository Continuum

Raw / varied data
DATA LAKE
flexible holding
LAKEHOUSE
hybrid
WAREHOUSE
structured reporting
Data Mart
06

Infrastructure: On-Premise & Cloud

Infrastructure affects how analysts connect to data. On-premise environments are controlled by the organization; cloud environments are hosted through third-party providers over the internet.

On-Premise

The organization hosts and controls its own environment and architecture, whether servers are physically onsite or in a datacenter it controls.

Public Cloud

A cloud service provider offers shared resources to multiple tenants, commonly through subscription or pay-as-you-go models.

Private Cloud

Cloud infrastructure exclusively owned and managed by an organization, providing greater control over privacy and security.

Community Cloud

Several organizations share a hosted or private cloud around common requirements such as security or standardization.

Hybrid Cloud

Combines public, private, community, and/or on-premise elements to meet different workload needs.

Multicloud

Uses services from multiple cloud service providers.

07

IaaS, PaaS, SaaS & Containerization

Cloud service models differ mainly in how responsibility is divided between the provider and the customer. Containerization packages an application with the libraries and dependencies it needs for easier deployment and scaling.

Hosted Applications
Infrastructure Software
Operating Systems
Virtualization
Servers / CPU / Memory / Storage
Networking
Datacenter Power / Cooling / Physical Security

Hands-On Examples

Open these browser-based examples to connect each service model with a practical environment.

IaaS Example — Incus

Explore remotely hosted Linux virtual machines and instances. Use this as a hands-on infrastructure example.

Open Incus Try It ↗

PaaS Example — Google Colab

Open a hosted notebook environment where you can write and execute code without managing the underlying servers.

Open Google Colab ↗

SaaS Example — Google Drive

Use a finished cloud application through the browser to store, manage, access, and share files.

Open Google Drive ↗

Container Example — Killercoda

Use interactive browser playgrounds to explore container and cloud-native technologies without a local installation.

Open Killercoda Playgrounds ↗
Learning tip

Compare how much infrastructure you directly manage in each example: infrastructure-focused environments expose more underlying resources, while SaaS presents the finished application to the user.

Containerization

Packages an application together with required libraries and packages so it can be deployed through a network more consistently and scaled more easily. Containerization can be used alongside IaaS, PaaS, or SaaS environments.

08

How Data Changes: SCD & TCL

Data warehouses must decide how to preserve changes in dimension data. Slowly changing dimensions (SCDs) define common history strategies, while Transaction Control Language (TCL) controls database transactions generated by data modifications.

SCD Table Examples — Product Name Changes

Assume product 101 changes its name from Red Valley Bike to Vibrant Valley Bike. The three SCD types store that change differently.

SCD Type 1 — Overwrite

The existing value is replaced. The old product name is not retained.

Before Change
ProductKeyProductNameCategory
101Red Valley BikeBikes
↓ OVERWRITE SAME ROW ↓
After Change
ProductKeyProductNameCategory
101Vibrant Valley BikeBikes
OLD VALUE LOST ONE ROW

SCD Type 2 — Add a New Row

The historical row is retained and a new row represents the new version. Effective dates can identify when each version applied.

ProductKey ProductName StartDate EndDate Current
101Red Valley Bike 2025-01-012026-08-31No
101Vibrant Valley Bike 2026-09-01Yes
FULL ROW HISTORY NEW ROW EFFECTIVE DATES

SCD Type 3 — Add a Previous-Value Column

The current and previous values are kept in the same record. This preserves limited history.

ProductKey CurrentProductName PreviousProductName Category
101 Vibrant Valley Bike Red Valley Bike Bikes
LIMITED HISTORY ONE ROW PREVIOUS VALUE COLUMN
Quick comparison

Type 1: replace the old value.   Type 2: preserve the old row and add a new row.   Type 3: keep the current and previous values in columns of the same row.

TypeMethodHistory
Type 1Overwrite existing valuePrevious value is not retained
Type 2Add a new row for the new valueHistorical rows are retained, commonly with effective dates
Type 3Add a column for previous/current valueLimited history is retained in one record

Transaction Control Language

BEGIN TRANSACTION

UPDATE ToyProducts
SET ProductName = N'Toy Soldier'
WHERE ProductName = 'Toy Soldeir'

-- Validate the change with a SELECT

COMMIT -- make the transaction changes available
-- or
ROLLBACK -- undo uncommitted changes

SAVEPOINT -- create a point that can be rolled back to
Transaction caution

An open transaction can lock records. COMMIT confirms changes, ROLLBACK reverses uncommitted work, and SAVEPOINT provides an intermediate rollback point.

09

Summary

The connects three ideas: how data is processed and stored, where infrastructure runs, and how changes are managed over time.

DIFFERENT DATA SYSTEMSPROCESS & STOREOLTP · OLAP · Warehouse · LakeINFRASTRUCTUREOn-Prem · Cloud · IaaS/PaaS/SaaSDATA CHANGESSCD 1/2/3 · TCLSource → Repository → ReportingWho hosts and manages what?Current value vs historyKnow where data comes from, lives, and changes
10

Knowledge Check — 20 Questions

Test the core concepts from the . Select your answers, check your score, then reveal the answer key for review.

1. Which processing type supports large numbers of database transactions in real time?

Answer: A. OLTP

2. Which processing type is designed for complex analysis of large databases without negatively affecting transactional systems?

Answer: B. OLAP

3. What is a source system?

Answer: B. The system of record for a given data element

4. What is a primary purpose of a data warehouse?

Answer: B. Unify data from multiple sources for reporting and decision-making

5. A data mart is best described as:

Answer: A. A subset of a data warehouse for a specific group

6. What does a fact table mainly hold?

Answer: A. Business measurements/events plus keys

7. What does a dimension table mainly hold?

Answer: A. Categorical/descriptive attributes

8. Which schema typically has denormalized dimension tables joined directly to one fact table?

Answer: B. Star

9. Which schema may normalize dimensions into additional related dimension tables?

Answer: B. Snowflake

10. Which repository can hold structured, semi-structured, and unstructured data in large quantities?

Answer: A. Data lake

11. Which term describes applying structure when data is read from a data lake?

Answer: A. Schema-on-read

12. A data lakehouse combines characteristics of:

Answer: B. Data warehouses and data lakes

13. On-premise infrastructure is primarily hosted:

Answer: A. On infrastructure controlled by the organization

14. Which cloud model is offered by a provider to multiple tenants?

Answer: B. Public

15. Which service model gives users finished software accessed as a service?

Answer: C. SaaS

16. Which service model provides hosted servers, storage, and hardware while leaving more management to the organization?

Answer: B. IaaS

17. What does SCD Type 1 do?

Answer: B. Overwrites the existing value

18. What does SCD Type 2 do?

Answer: B. Adds a new row and preserves historical records

19. Which TCL command makes a transaction's changes available in the database?

Answer: C. COMMIT

20. Which TCL command can reverse uncommitted changes since the last COMMIT?

Answer: A. ROLLBACK
COMPARING AND CONTRASTING DIFFERENT DATA SYSTEMS · INTERACTIVE NOTES · MARBLE LIGHT BLUE EDITION