π Amazon Redshift
Storing data isn't enough β organizations need to analyze it for trends and decisions.
Redshift is AWS's fully managed data warehouse, built for analytics and BI on large datasets β unlike RDS, which handles everyday app transactions
π― Exam Tip
β RDS = OLTP (application databases)
β Redshift = OLAP (analytics/data warehousing)
β Redshift uses columnar storage
β Common BI pairing: Tableau, QuickSight
β Redshift Serverless auto-manages infra and scales on demand
π§ Core Idea: OLTP vs OLAP
<meta charset="utf-8">
<!-- OLTP (RDS): frequent small transactions. OLAP (Redshift): slow scans over historical data. Runs both loops concurrently to contrast speed & weight. -->
<div class="infographic-oltpolap-anim">
<header class="oa-head">
<div class="oa-controls">
<button class="oa-btn oa-play" type="button" aria-label="Play">
<svg class="icon-play" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>
<svg class="icon-pause" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/></svg>
<span class="oa-btn-label">Play</span>
</button>
<button class="oa-btn oa-restart" type="button" aria-label="Restart">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7"/><path d="M3 4v5h5"/></svg>
</button>
</div>
</header>
<div class="oa-canvas">
<svg viewBox="0 0 900 410" xmlns="http://www.w3.org/2000/svg" class="oa-svg">
<defs>
<marker id="oa-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" class="arrow-fill"/>
</marker>
<clipPath id="oa-stack-clip"><rect x="600" y="86" width="150" height="72" rx="6"/></clipPath>
</defs>
<line x1="450" y1="20" x2="450" y2="410" class="divider"/>
<!-- ================= OLTP (left) ================= -->
<text x="225" y="36" text-anchor="middle" class="col-title col-title--oltp">OLTP</text>
<text x="225" y="54" text-anchor="middle" class="col-caption">Online Transaction Processing</text>
<circle cx="225" cy="96" r="24" class="slot-ring slot-ring--oltp"/>
<g id="oa-oltp-icon" transform="translate(225,96)"></g>
<text id="oa-oltp-label" x="225" y="140" text-anchor="middle" class="action-label action-label--oltp">Sign up</text>
<line x1="225" y1="150" x2="225" y2="200" class="connector solid" marker-end="url(#oa-arrow)"/>
<path id="oa-path-oltp" d="M225,152 L225,198" fill="none" stroke="none"/>
<circle r="6" class="pulse pulse--oltp" id="oa-pulse-oltp" opacity="0">
<animateMotion id="oa-motion-oltp" dur="0.32s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#oa-path-oltp"/></animateMotion>
</circle>
<g id="oa-rds-node">
<circle id="oa-rds-ring" cx="225" cy="242" r="40" class="hit-ring hit-ring--oltp"/>
<rect x="197" y="214" width="56" height="56" rx="12" class="svc-tile svc-tile--oltp"/>
<g transform="translate(225,242)">
<g stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<ellipse cx="0" cy="-12" rx="15" ry="5.5"/><path d="M-15,-12 V12 A15,5.5 0 0 0 15,12 V-12"/><path d="M-15,0 A15,5.5 0 0 0 15,0"/>
</g>
</g>
</g>
<text x="225" y="308" text-anchor="middle" class="svc-name svc-name--oltp">Amazon RDS</text>
<text x="225" y="326" text-anchor="middle" class="svc-caption">constant small reads & writes, all day</text>
<!-- throughput ticks -->
<g id="oa-oltp-ticks" class="tick-row">
<circle cx="185" cy="362" r="4" class="tick" data-i="0"/>
<circle cx="205" cy="362" r="4" class="tick" data-i="1"/>
<circle cx="225" cy="362" r="4" class="tick" data-i="2"/>
<circle cx="245" cy="362" r="4" class="tick" data-i="3"/>
<circle cx="265" cy="362" r="4" class="tick" data-i="4"/>
</g>
<text x="225" y="388" text-anchor="middle" class="oa-freq-label">many small transactions / second</text>
<!-- ================= OLAP (right) ================= -->
<text x="675" y="36" text-anchor="middle" class="col-title col-title--olap">OLAP</text>
<text x="675" y="54" text-anchor="middle" class="col-caption">Online Analytical Processing</text>
<text id="oa-olap-query" x="675" y="76" text-anchor="middle" class="query-label">Best-selling products this month?</text>
<rect x="600" y="86" width="150" height="72" rx="6" class="stack-frame"/>
<g clip-path="url(#oa-stack-clip)">
<g id="oa-record-grid">
<!-- 3x2 grid of record icons -->
<g class="record" transform="translate(625,104)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
<g class="record" transform="translate(675,104)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
<g class="record" transform="translate(725,104)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
<g class="record" transform="translate(625,138)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
<g class="record" transform="translate(675,138)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
<g class="record" transform="translate(725,138)"><rect x="-11" y="-13" width="22" height="26" rx="2" class="record-doc"/><line x1="-6" y1="-6" x2="6" y2="-6" class="record-line"/><line x1="-6" y1="0" x2="6" y2="0" class="record-line"/><line x1="-6" y1="6" x2="3" y2="6" class="record-line"/></g>
</g>
<rect id="oa-scan-bar" x="600" y="86" width="150" height="18" class="scan-bar" opacity="0"/>
</g>
<text x="675" y="182" text-anchor="middle" class="oa-freq-label">scanning months of historical data</text>
<line x1="675" y1="192" x2="675" y2="200" class="connector solid" marker-end="url(#oa-arrow)"/>
<path id="oa-path-olap" d="M675,192 L675,198" fill="none" stroke="none"/>
<circle r="6" class="pulse pulse--olap" id="oa-pulse-olap" opacity="0">
<animateMotion id="oa-motion-olap" dur="1.1s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#oa-path-olap"/></animateMotion>
</circle>
<g id="oa-redshift-node">
<circle id="oa-redshift-ring" cx="675" cy="242" r="40" class="hit-ring hit-ring--olap"/>
<rect x="647" y="214" width="56" height="56" rx="12" class="svc-tile svc-tile--olap"/>
<g transform="translate(675,242)">
<g stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<ellipse cx="0" cy="-12" rx="15" ry="5.5"/><path d="M-15,-12 V12 A15,5.5 0 0 0 15,12 V-12"/><path d="M-15,0 A15,5.5 0 0 0 15,0"/>
</g>
</g>
</g>
<text x="675" y="308" text-anchor="middle" class="svc-name svc-name--olap">Amazon Redshift</text>
<text x="675" y="326" text-anchor="middle" class="svc-caption">built to scan huge volumes of history</text>
<g id="oa-insight-badge" class="insight-badge" opacity="0">
<rect x="600" y="350" width="150" height="26" rx="13" class="insight-pill"/>
<text x="675" y="367" text-anchor="middle" class="insight-text">Insight ready</text>
</g>
</svg>
</div>
</div>
<style>
.infographic-oltpolap-anim {
--ink: #1a1a1a;
--ink-soft: #5c5c5c;
--paper: #ffffff;
--paper-alt: #f6f4ef;
--line: #e2ddd0;
--oltp: #2563eb;
--oltp-soft: #e3ebfd;
--olap: #d6482f;
--olap-soft: #fce7e1;
--accent: #2563eb;
--display-font: 'Fraunces', Georgia, serif;
--body-font: 'Inter', system-ui, -apple-system, sans-serif;
box-sizing: border-box;
max-width: 900px;
margin: 0 auto;
font-family: var(--body-font);
color: var(--ink);
background: var(--paper);
}
.infographic-oltpolap-anim[data-theme="dark"] {
--ink: #e8e6e1;
--ink-soft: #9a968c;
--paper: #121212;
--paper-alt: #1c1c22;
--line: #2c313d;
--oltp: #6d95ef;
--oltp-soft: #1c2740;
--olap: #e8896f;
--olap-soft: #33201b;
--accent: #5b8def;
}
.infographic-oltpolap-anim * { box-sizing: border-box; }
.infographic-oltpolap-anim .oa-head { text-align: center; padding: 0.5rem clamp(1rem, 4vw, 2rem) 0.75rem; }
.infographic-oltpolap-anim .oa-controls { display: inline-flex; align-items: center; gap: 0.6rem; }
.infographic-oltpolap-anim .oa-btn {
display: inline-flex; align-items: center; gap: 0.45rem;
background: var(--accent); color: var(--paper); border: none; border-radius: 999px;
padding: 0.55rem 1.1rem; font-family: inherit; font-size: 0.88rem; font-weight: 600;
cursor: pointer; transition: opacity 0.15s;
}
.infographic-oltpolap-anim .oa-btn:hover { opacity: 0.88; }
.infographic-oltpolap-anim .oa-restart { background: var(--paper-alt); color: var(--ink); border: 1px solid var(--line); padding: 0.55rem 0.7rem; }
.infographic-oltpolap-anim .oa-btn svg { width: 15px; height: 15px; }
.infographic-oltpolap-anim .icon-pause { display: none; }
.infographic-oltpolap-anim .oa-play.is-playing .icon-play { display: none; }
.infographic-oltpolap-anim .oa-play.is-playing .icon-pause { display: inline-block; }
.infographic-oltpolap-anim .oa-canvas { padding: 0 clamp(0.75rem, 3vw, 2rem) 1rem; }
.infographic-oltpolap-anim .oa-svg { width: 100%; height: auto; display: block; overflow: visible; }
.infographic-oltpolap-anim .divider { stroke: var(--line); stroke-width: 1; }
.infographic-oltpolap-anim .col-title { font-family: var(--display-font); font-weight: 700; font-size: 22px; }
.infographic-oltpolap-anim .col-title--oltp { fill: var(--oltp); }
.infographic-oltpolap-anim .col-title--olap { fill: var(--olap); }
.infographic-oltpolap-anim .col-caption { font-size: 12.5px; fill: var(--ink-soft); font-family: var(--body-font); }
.infographic-oltpolap-anim .slot-ring { fill: var(--paper-alt); stroke: var(--line); stroke-width: 1.25; }
.infographic-oltpolap-anim .slot-ring--oltp { stroke: var(--oltp); }
.infographic-oltpolap-anim .action-label { font-size: 13.5px; font-weight: 600; font-family: var(--body-font); }
.infographic-oltpolap-anim .action-label--oltp { fill: var(--oltp); }
.infographic-oltpolap-anim .connector { stroke: var(--ink-soft); stroke-width: 1.5; fill: none; opacity: 0.5; }
.infographic-oltpolap-anim .arrow-fill { fill: var(--ink-soft); opacity: 0.7; }
.infographic-oltpolap-anim .pulse--oltp { fill: var(--oltp); }
.infographic-oltpolap-anim .pulse--olap { fill: var(--olap); }
.infographic-oltpolap-anim .hit-ring { fill: none; stroke-width: 3; stroke-dasharray: 8 7; opacity: 0; }
.infographic-oltpolap-anim .hit-ring--oltp { stroke: var(--oltp); }
.infographic-oltpolap-anim .hit-ring--olap { stroke: var(--olap); }
.infographic-oltpolap-anim .hit-ring.is-flashing { opacity: 0.85; animation: oa-ring-pop 0.5s ease-out; transform-box: fill-box; transform-origin: center; }
.infographic-oltpolap-anim .hit-ring.is-scanning { opacity: 0.55; animation: oa-ring-pulse 1s ease-in-out infinite; }
@keyframes oa-ring-pop { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(1.15); } }
@keyframes oa-ring-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.6; } }
.infographic-oltpolap-anim .svc-tile--oltp { fill: var(--oltp); }
.infographic-oltpolap-anim .svc-tile--olap { fill: var(--olap); }
.infographic-oltpolap-anim .svc-name { font-family: var(--display-font); font-weight: 700; font-size: 15px; }
.infographic-oltpolap-anim .svc-name--oltp { fill: var(--oltp); }
.infographic-oltpolap-anim .svc-name--olap { fill: var(--olap); }
.infographic-oltpolap-anim .svc-caption { font-size: 11.5px; fill: var(--ink-soft); font-family: var(--body-font); }
.infographic-oltpolap-anim .tick { fill: var(--line); transition: fill 0.15s; }
.infographic-oltpolap-anim .tick.is-lit { fill: var(--oltp); }
.infographic-oltpolap-anim .oa-freq-label { font-size: 11px; fill: var(--ink-soft); font-family: var(--body-font); font-style: italic; }
.infographic-oltpolap-anim .query-label { font-size: 13px; font-weight: 600; fill: var(--ink); font-family: var(--body-font); }
.infographic-oltpolap-anim .stack-frame { fill: var(--paper-alt); stroke: var(--olap); stroke-width: 1.25; opacity: 0.5; }
.infographic-oltpolap-anim .record-doc { fill: var(--paper); stroke: var(--olap); stroke-width: 1.4; opacity: 0.55; }
.infographic-oltpolap-anim .record-line { stroke: var(--olap); stroke-width: 1.2; opacity: 0.45; }
.infographic-oltpolap-anim .record.is-scanned .record-doc { opacity: 0.9; }
.infographic-oltpolap-anim .scan-bar { fill: var(--olap); opacity: 0; }
.infographic-oltpolap-anim .scan-bar.is-active { opacity: 0.22; }
.infographic-oltpolap-anim .insight-badge { transition: opacity 0.2s; }
.infographic-oltpolap-anim .insight-pill { fill: var(--olap); }
.infographic-oltpolap-anim .insight-text { fill: var(--paper); font-size: 12px; font-weight: 700; font-family: var(--body-font); }
@media (max-width: 640px) {
.infographic-oltpolap-anim .col-title { font-size: 18px; }
.infographic-oltpolap-anim .col-caption, .infographic-oltpolap-anim .oa-freq-label { font-size: 10px; }
.infographic-oltpolap-anim .query-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
.infographic-oltpolap-anim * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
</style>
<script>
(function () {
var wrapper = document.currentScript.closest('.infographic-oltpolap-anim')
|| document.querySelector('.infographic-oltpolap-anim');
var bodyAttr = document.body.getAttribute('data-darkmode');
var dark;
if (bodyAttr === 'true') { dark = true; }
else if (bodyAttr === 'false') { dark = false; }
else {
var match = document.cookie.match(/(?:^|;\s*)darkMode=([^;]+)/);
dark = match ? match[1] === 'true' : false;
}
if (dark) wrapper.setAttribute('data-theme', 'dark');
var reducedMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var playBtn = wrapper.querySelector('.oa-play');
var playLabel = wrapper.querySelector('.oa-btn-label');
var restartBtn = wrapper.querySelector('.oa-restart');
var oltpIconSlot = wrapper.querySelector('#oa-oltp-icon');
var oltpLabel = wrapper.querySelector('#oa-oltp-label');
var oltpPulse = wrapper.querySelector('#oa-pulse-oltp');
var oltpMotion = wrapper.querySelector('#oa-motion-oltp');
var rdsRing = wrapper.querySelector('#oa-rds-ring');
var ticks = wrapper.querySelectorAll('.tick');
var olapQuery = wrapper.querySelector('#oa-olap-query');
var scanBar = wrapper.querySelector('#oa-scan-bar');
var records = wrapper.querySelectorAll('.record');
var olapPulse = wrapper.querySelector('#oa-pulse-olap');
var olapMotion = wrapper.querySelector('#oa-motion-olap');
var redshiftRing = wrapper.querySelector('#oa-redshift-ring');
var insightBadge = wrapper.querySelector('#oa-insight-badge');
var ICONS = {
signup: '<g stroke="var(--paper)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" transform="translate(-9,-9) scale(0.75)"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><line x1="19" x2="19" y1="8" y2="14"/><line x1="22" x2="16" y1="11" y2="11"/></g>',
login: '<g stroke="var(--paper)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" transform="translate(-9,-9) scale(0.75)"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><path d="m10 17 5-5-5-5"/><line x1="15" x2="3" y1="12" y2="12"/></g>',
order: '<g stroke="var(--paper)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" transform="translate(-9,-9) scale(0.75)"><circle cx="8" cy="21" r="1"/><circle cx="19" cy="21" r="1"/><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/></g>',
cart: '<g stroke="var(--paper)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" transform="translate(-9,-9) scale(0.75)"><path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"/><path d="M3 6h18"/><path d="M16 10a4 4 0 0 1-8 0"/></g>',
pay: '<g stroke="var(--paper)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" transform="translate(-9,-9) scale(0.75)"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></g>'
};
var OLTP_ACTIONS = [
{ icon: 'signup', label: 'Sign up' },
{ icon: 'login', label: 'Log in' },
{ icon: 'order', label: 'Place an order' },
{ icon: 'cart', label: 'Update the cart' },
{ icon: 'pay', label: 'Pay' }
];
var OLAP_QUERIES = [
'Best-selling products this month?',
'Which country made the most revenue?',
'What are the holiday trends?'
];
var oltpTimer = null, olapTimer = null;
var oltpIndex = 0, olapIndex = 0;
var playing = false;
var innerTimers = [];
function after(ms, fn) { innerTimers.push(setTimeout(fn, ms)); }
function clearInner() { innerTimers.forEach(clearTimeout); innerTimers = []; }
function oltpStep() {
var action = OLTP_ACTIONS[oltpIndex % OLTP_ACTIONS.length];
oltpIconSlot.innerHTML = ICONS[action.icon].replace('var(--paper)', 'var(--oltp)');
// recolor icon slot background circle via ring color already blue; set icon stroke to accent since slot bg is light
oltpIconSlot.querySelectorAll('g[stroke]').forEach(function (g) { g.setAttribute('stroke', 'var(--oltp)'); });
oltpLabel.textContent = action.label;
ticks.forEach(function (t, i) { t.classList.toggle('is-lit', i === (oltpIndex % ticks.length)); });
var dur = reducedMotion ? 120 : 320;
oltpMotion.setAttribute('dur', (dur / 1000) + 's');
oltpPulse.setAttribute('opacity', reducedMotion ? '0' : '1');
try { oltpMotion.beginElement(); } catch (e) {}
after(dur, function () {
oltpPulse.setAttribute('opacity', '0');
rdsRing.classList.remove('is-flashing');
void rdsRing.offsetWidth;
rdsRing.classList.add('is-flashing');
});
oltpIndex++;
}
function olapStep() {
var query = OLAP_QUERIES[olapIndex % OLAP_QUERIES.length];
olapQuery.textContent = query;
insightBadge.setAttribute('opacity', '0');
records.forEach(function (r) { r.classList.remove('is-scanned'); });
var scanDur = reducedMotion ? 300 : 1100;
scanBar.setAttribute('opacity', '0');
scanBar.setAttribute('y', '86');
scanBar.classList.add('is-active');
redshiftRing.classList.add('is-scanning');
// animate scan bar sweep via requestAnimationFrame-free simple transition through CSS
scanBar.style.transition = 'none';
scanBar.setAttribute('opacity', '0.22');
requestAnimationFrame(function () {
scanBar.style.transition = 'transform ' + scanDur + 'ms linear';
scanBar.style.transform = 'translateY(54px)';
});
records.forEach(function (r, i) {
after((scanDur / records.length) * (i + 1), function () { r.classList.add('is-scanned'); });
});
after(scanDur, function () {
scanBar.classList.remove('is-active');
scanBar.style.transition = 'none';
scanBar.style.transform = 'translateY(0)';
redshiftRing.classList.remove('is-scanning');
var travelDur = reducedMotion ? 200 : 700;
olapMotion.setAttribute('dur', (travelDur / 1000) + 's');
olapPulse.setAttribute('opacity', reducedMotion ? '0' : '1');
try { olapMotion.beginElement(); } catch (e) {}
after(travelDur, function () {
olapPulse.setAttribute('opacity', '0');
redshiftRing.classList.remove('is-flashing');
void redshiftRing.offsetWidth;
redshiftRing.classList.add('is-flashing');
insightBadge.setAttribute('opacity', '1');
});
});
olapIndex++;
}
function scheduleOltp() {
if (!playing) return;
oltpStep();
var interval = reducedMotion ? 1400 : 700;
oltpTimer = setTimeout(scheduleOltp, interval);
}
function scheduleOlap() {
if (!playing) return;
olapStep();
var scanDur = reducedMotion ? 300 : 1100;
var travelDur = reducedMotion ? 200 : 700;
var hold = reducedMotion ? 600 : 1400;
var total = scanDur + travelDur + hold;
olapTimer = setTimeout(scheduleOlap, total);
}
function play() {
if (playing) return;
playing = true;
playBtn.classList.add('is-playing');
playLabel.textContent = 'Pause';
scheduleOltp();
scheduleOlap();
}
function pause() {
playing = false;
clearTimeout(oltpTimer);
clearTimeout(olapTimer);
clearInner();
playBtn.classList.remove('is-playing');
playLabel.textContent = 'Play';
}
function restart() {
pause();
oltpIndex = 0; olapIndex = 0;
oltpPulse.setAttribute('opacity', '0');
olapPulse.setAttribute('opacity', '0');
insightBadge.setAttribute('opacity', '0');
ticks.forEach(function (t) { t.classList.remove('is-lit'); });
records.forEach(function (r) { r.classList.remove('is-scanned'); });
scanBar.classList.remove('is-active');
scanBar.setAttribute('opacity', '0');
scanBar.style.transition = 'none';
scanBar.style.transform = 'translateY(0)';
oltpIconSlot.innerHTML = '';
oltpLabel.textContent = 'Sign up';
olapQuery.textContent = OLAP_QUERIES[0];
play();
}
playBtn.addEventListener('click', function () {
if (playing) { pause(); } else { play(); }
});
restartBtn.addEventListener('click', restart);
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">An online store runs constant small transactions all day β signups, logins, orders, cart updates, payments. That's OLTP (Online Transaction Processing) β exactly what RDS is built for.
Now management asks: Which products sold best this month? Which country made the most revenue? What are the holiday trends?
Answering that means scanning huge volumes of historical data β OLAP (Online Analytical Processing). That's what Redshift is built for.
π’ What is a Data Warehouse?
A centralized repository for large volumes of historical data from multiple sources β built to store massive datasets, run complex analytical queries, generate reports, and power dashboards/BI tools.
π― Exam tip: "Analytics," "reporting," "dashboards," "data warehousing" β Redshift
Unlike transactional databases, Redshift doesn't ingest every transaction live β data loads in batches (hourly, every few hours, or nightly), then gets analyzed.
Traditional databases (like RDS/PostgreSQL) store data row by row. Redshift stores it column by column instead.
Why it matters: need the average of the Sales column? Redshift reads just that column instead of scanning every field in every row β much faster for analytical queries.
π― Exam tip: "Columnar storage" β Redshift
Instead of one computer chewing through a huge query, Redshift splits the work across many compute nodes at once β like 100 people each counting 10,000 records instead of one person counting a million. Much faster on large datasets.
Fast analytical queries, scales to petabytes, and β since Redshift is PostgreSQL-based β you query it with standard SQL.
Redshift plugs into BI tools like Amazon QuickSight and Tableau, turning raw data into charts and dashboards for tracking trends and business performance.
Standard Redshift is provisioned β you choose cluster size/compute in advance and pay for what you provisioned.
π Amazon Redshift Serverless
AWS automatically manages infrastructure, capacity planning, scaling, and provisioning β you just run queries.
βοΈ How It Works
<meta charset="utf-8">
<!-- Redshift Serverless flow: enable -> connect -> run SQL -> auto-scale -> pay per use. Self-contained, drop into codeveda.dev. -->
<div class="infographic-rsserverless">
<header class="rs-head">
<div class="rs-controls">
<button class="rs-btn rs-play" type="button" aria-label="Play">
<svg class="icon-play" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>
<svg class="icon-pause" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/></svg>
<span class="rs-btn-label">Play</span>
</button>
<button class="rs-btn rs-restart" type="button" aria-label="Restart">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7"/><path d="M3 4v5h5"/></svg>
</button>
</div>
<p class="rs-status" aria-live="polite"> </p>
</header>
<div class="rs-canvas">
<svg viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg" class="rs-svg">
<defs>
<marker id="rs-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" class="arrow-fill"/>
</marker>
</defs>
<!-- connectors -->
<line id="rs-conn-1" x1="146" y1="120" x2="264" y2="120" class="connector" marker-end="url(#rs-arrow)"/>
<line id="rs-conn-2" x1="341" y1="120" x2="459" y2="120" class="connector" marker-end="url(#rs-arrow)"/>
<line id="rs-conn-3" x1="536" y1="120" x2="654" y2="120" class="connector" marker-end="url(#rs-arrow)"/>
<line id="rs-conn-4" x1="731" y1="120" x2="849" y2="120" class="connector" marker-end="url(#rs-arrow)"/>
<path id="rs-path-1" d="M148,120 L262,120" fill="none" stroke="none"/>
<path id="rs-path-2" d="M343,120 L457,120" fill="none" stroke="none"/>
<path id="rs-path-3" d="M538,120 L652,120" fill="none" stroke="none"/>
<path id="rs-path-4" d="M733,120 L847,120" fill="none" stroke="none"/>
<circle r="6" class="pulse" id="rs-pulse-1" opacity="0"><animateMotion id="rs-motion-1" dur="0.5s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#rs-path-1"/></animateMotion></circle>
<circle r="6" class="pulse" id="rs-pulse-2" opacity="0"><animateMotion id="rs-motion-2" dur="0.5s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#rs-path-2"/></animateMotion></circle>
<circle r="6" class="pulse" id="rs-pulse-3" opacity="0"><animateMotion id="rs-motion-3" dur="0.5s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#rs-path-3"/></animateMotion></circle>
<circle r="6" class="pulse" id="rs-pulse-4" opacity="0"><animateMotion id="rs-motion-4" dur="0.5s" begin="indefinite" fill="freeze" calcMode="linear"><mpath href="#rs-path-4"/></animateMotion></circle>
<!-- ===== Node 1: Enable ===== -->
<g class="rs-node" data-step="1">
<circle id="rs-ring-1" cx="110" cy="120" r="46" class="hit-ring"/>
<circle cx="110" cy="120" r="36" class="node-tile"/>
<g transform="translate(110,120)">
<g id="rs-toggle-track" class="toggle-track" stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<rect x="-14" y="-8" width="28" height="16" rx="8"/>
<circle id="rs-toggle-knob" cx="-6" cy="0" r="5" fill="var(--paper)" stroke="none"/>
</g>
</g>
</g>
<text x="110" y="180" text-anchor="middle" class="step-num">β </text>
<text x="110" y="200" text-anchor="middle" class="step-label">Enable Redshift</text>
<text x="110" y="216" text-anchor="middle" class="step-label">Serverless</text>
<!-- ===== Node 2: Connect ===== -->
<g class="rs-node" data-step="2">
<circle id="rs-ring-2" cx="305" cy="120" r="46" class="hit-ring"/>
<circle cx="305" cy="120" r="36" class="node-tile"/>
<g transform="translate(305,120)">
<g stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<rect x="-15" y="-12" width="30" height="22" rx="3"/>
<path d="M-9,-5 -4,0 -9,5"/>
<line x1="-1" y1="5" x2="6" y2="5"/>
</g>
</g>
</g>
<text x="305" y="180" text-anchor="middle" class="step-num">β‘</text>
<text x="305" y="200" text-anchor="middle" class="step-label">Connect via Query</text>
<text x="305" y="216" text-anchor="middle" class="step-label">Editor or SQL client</text>
<!-- ===== Node 3: Run SQL ===== -->
<g class="rs-node" data-step="3">
<circle id="rs-ring-3" cx="500" cy="120" r="46" class="hit-ring"/>
<circle cx="500" cy="120" r="36" class="node-tile"/>
<g transform="translate(500,120)">
<g stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<polygon points="-3,-11 12,0 -3,11" fill="var(--paper)" stroke="none"/>
<line x1="-15" y1="-11" x2="-8" y2="-11"/>
<line x1="-15" y1="0" x2="-10" y2="0"/>
<line x1="-15" y1="11" x2="-8" y2="11"/>
</g>
</g>
</g>
<text x="500" y="180" text-anchor="middle" class="step-num">β’</text>
<text x="500" y="200" text-anchor="middle" class="step-label">Run your SQL</text>
<!-- ===== Node 4: Auto-scale ===== -->
<g class="rs-node" data-step="4">
<circle id="rs-ring-4" cx="695" cy="120" r="46" class="hit-ring"/>
<circle cx="695" cy="120" r="36" class="node-tile"/>
<g transform="translate(695,120)">
<g id="rs-scale-bars" stroke="var(--paper)" stroke-width="3" stroke-linecap="round">
<line class="scale-bar" x1="-12" y1="10" x2="-12" y2="4"/>
<line class="scale-bar" x1="0" y1="10" x2="0" y2="-2"/>
<line class="scale-bar" x1="12" y1="10" x2="12" y2="-8"/>
</g>
</g>
</g>
<text x="695" y="180" text-anchor="middle" class="step-num">β£</text>
<text x="695" y="200" text-anchor="middle" class="step-label">AWS auto-provisions</text>
<text x="695" y="216" text-anchor="middle" class="step-label">& scales resources</text>
<!-- ===== Node 5: Pay per use ===== -->
<g class="rs-node" data-step="5">
<circle id="rs-ring-5" cx="890" cy="120" r="46" class="hit-ring"/>
<circle cx="890" cy="120" r="36" class="node-tile"/>
<g transform="translate(890,120)">
<g stroke="var(--paper)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none">
<path d="M0,-11 v22"/>
<path d="M6,-7 a6,4 0 0 0-6-3 6,4 0 0 0 0,8 6,4 0 0 1 0,8 6,4 0 0 1-6-3"/>
</g>
</g>
</g>
<text x="890" y="180" text-anchor="middle" class="step-num">β€</text>
<text x="890" y="200" text-anchor="middle" class="step-label">Pay only for what</text>
<text x="890" y="216" text-anchor="middle" class="step-label">you actually use</text>
<!-- usage meter under node 5 -->
<rect x="855" y="238" width="70" height="10" rx="5" class="meter-track"/>
<rect id="rs-meter-fill" x="855" y="238" width="0" height="10" rx="5" class="meter-fill"/>
<text id="rs-meter-label" x="890" y="264" text-anchor="middle" class="meter-label">idle β $0.00</text>
</svg>
</div>
</div>
<style>
.infographic-rsserverless {
--ink: #1a1a1a;
--ink-soft: #5c5c5c;
--paper: #ffffff;
--paper-alt: #f6f4ef;
--line: #e2ddd0;
--redshift: #d6482f;
--redshift-soft: #fce7e1;
--accent: #d6482f;
--success: #1e8e5a;
--display-font: 'Fraunces', Georgia, serif;
--body-font: 'Inter', system-ui, -apple-system, sans-serif;
box-sizing: border-box;
max-width: 1000px;
margin: 0 auto;
font-family: var(--body-font);
color: var(--ink);
background: var(--paper);
}
.infographic-rsserverless[data-theme="dark"] {
--ink: #e8e6e1;
--ink-soft: #9a968c;
--paper: #121212;
--paper-alt: #1c1c22;
--line: #2c313d;
--redshift: #e8896f;
--redshift-soft: #33201b;
--accent: #e8896f;
--success: #4caf7d;
}
.infographic-rsserverless * { box-sizing: border-box; }
.infographic-rsserverless .rs-head { text-align: center; padding: 0.5rem clamp(1rem, 4vw, 2rem) 0.25rem; }
.infographic-rsserverless .rs-controls { display: inline-flex; align-items: center; gap: 0.6rem; }
.infographic-rsserverless .rs-btn {
display: inline-flex; align-items: center; gap: 0.45rem;
background: var(--accent); color: var(--paper); border: none; border-radius: 999px;
padding: 0.55rem 1.1rem; font-family: inherit; font-size: 0.88rem; font-weight: 600;
cursor: pointer; transition: opacity 0.15s;
}
.infographic-rsserverless .rs-btn:hover { opacity: 0.88; }
.infographic-rsserverless .rs-restart { background: var(--paper-alt); color: var(--ink); border: 1px solid var(--line); padding: 0.55rem 0.7rem; }
.infographic-rsserverless .rs-btn svg { width: 15px; height: 15px; }
.infographic-rsserverless .icon-pause { display: none; }
.infographic-rsserverless .rs-play.is-playing .icon-play { display: none; }
.infographic-rsserverless .rs-play.is-playing .icon-pause { display: inline-block; }
.infographic-rsserverless .rs-status { margin: 0.6rem 0 0; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); min-height: 1.2em; }
.infographic-rsserverless .rs-canvas { padding: 0 clamp(0.75rem, 3vw, 2rem) 1rem; }
.infographic-rsserverless .rs-svg { width: 100%; height: auto; display: block; overflow: visible; }
.infographic-rsserverless .connector { stroke: var(--line); stroke-width: 1.75; fill: none; }
.infographic-rsserverless .connector.is-flowing { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; animation: rs-flow 0.6s linear infinite; }
@keyframes rs-flow { to { stroke-dashoffset: -20; } }
.infographic-rsserverless .arrow-fill { fill: var(--line); }
.infographic-rsserverless .pulse { fill: var(--accent); transition: opacity 0.15s; }
.infographic-rsserverless .node-tile { fill: var(--redshift); }
.infographic-rsserverless .hit-ring { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 8 7; opacity: 0; }
.infographic-rsserverless .hit-ring.is-active { opacity: 0.7; animation: rs-ring-pop 0.7s ease-out forwards; }
@keyframes rs-ring-pop { 0% { opacity: 0.9; transform: scale(0.85); } 100% { opacity: 0; transform: scale(1.18); } }
.infographic-rsserverless .hit-ring { transform-box: fill-box; transform-origin: center; }
.infographic-rsserverless .step-num { font-family: var(--display-font); font-weight: 700; font-size: 15px; fill: var(--accent); }
.infographic-rsserverless .step-label { font-size: 12.5px; fill: var(--ink); font-weight: 600; font-family: var(--body-font); }
.infographic-rsserverless .toggle-track rect { fill: rgba(255,255,255,0.18); transition: fill 0.25s; }
.infographic-rsserverless .rs-node.is-enabled .toggle-track rect { fill: rgba(255,255,255,0.4); }
.infographic-rsserverless #rs-toggle-knob { transition: transform 0.3s ease; }
.infographic-rsserverless .rs-node.is-enabled #rs-toggle-knob { transform: translateX(12px); }
.infographic-rsserverless .scale-bar { transition: transform 0.4s ease; transform-box: fill-box; transform-origin: bottom; }
.infographic-rsserverless .is-scaling .scale-bar { animation: rs-scale-pulse 0.9s ease-in-out; }
@keyframes rs-scale-pulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.6); } }
.infographic-rsserverless .meter-track { fill: var(--paper-alt); stroke: var(--line); stroke-width: 1; }
.infographic-rsserverless .meter-fill { fill: var(--success); transition: width 0.35s ease; }
.infographic-rsserverless .meter-label { font-size: 11px; fill: var(--ink-soft); font-family: var(--body-font); font-weight: 500; }
@media (max-width: 720px) {
.infographic-rsserverless .step-label { font-size: 10.5px; }
.infographic-rsserverless .step-num { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
.infographic-rsserverless * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
</style>
<script>
(function () {
var wrapper = document.currentScript.closest('.infographic-rsserverless')
|| document.querySelector('.infographic-rsserverless');
var bodyAttr = document.body.getAttribute('data-darkmode');
var dark;
if (bodyAttr === 'true') { dark = true; }
else if (bodyAttr === 'false') { dark = false; }
else {
var match = document.cookie.match(/(?:^|;\s*)darkMode=([^;]+)/);
dark = match ? match[1] === 'true' : false;
}
if (dark) wrapper.setAttribute('data-theme', 'dark');
var reducedMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var playBtn = wrapper.querySelector('.rs-play');
var playLabel = wrapper.querySelector('.rs-btn-label');
var restartBtn = wrapper.querySelector('.rs-restart');
var statusEl = wrapper.querySelector('.rs-status');
var nodes = {};
var rings = {};
for (var i = 1; i <= 5; i++) {
nodes[i] = wrapper.querySelector('.rs-node[data-step="' + i + '"]');
rings[i] = wrapper.querySelector('#rs-ring-' + i);
}
var connectors = [1, 2, 3, 4].map(function (i) { return wrapper.querySelector('#rs-conn-' + i); });
var pulses = [1, 2, 3, 4].map(function (i) { return wrapper.querySelector('#rs-pulse-' + i); });
var motions = [1, 2, 3, 4].map(function (i) { return wrapper.querySelector('#rs-motion-' + i); });
var scaleBarsGroup = wrapper.querySelector('#rs-scale-bars');
var meterFill = wrapper.querySelector('#rs-meter-fill');
var meterLabel = wrapper.querySelector('#rs-meter-label');
var STEPS = [
'\u2460 Enable Redshift Serverless',
'\u2461 Connect via Query Editor or a SQL client',
'\u2462 Run your SQL',
'\u2463 AWS auto-provisions and scales resources',
'\u2464 Pay only for compute/storage actually used'
];
function setStatus(text) { statusEl.textContent = text; }
function flashRing(i) {
rings[i].classList.remove('is-active');
void rings[i].offsetWidth;
rings[i].classList.add('is-active');
}
function fireConnector(idx, dur) {
var conn = connectors[idx];
var pulse = pulses[idx];
var motion = motions[idx];
conn.classList.add('is-flowing');
motion.setAttribute('dur', (dur / 1000) + 's');
pulse.setAttribute('opacity', reducedMotion ? '0' : '1');
try { motion.beginElement(); } catch (e) {}
return dur;
}
function hideConnector(idx) {
connectors[idx].classList.remove('is-flowing');
pulses[idx].setAttribute('opacity', '0');
}
var timers = [];
var playing = false;
function after(ms, fn) { timers.push(setTimeout(fn, ms)); }
function clearTimers() { timers.forEach(clearTimeout); timers = []; }
function resetVisuals() {
for (var i = 1; i <= 5; i++) { rings[i].classList.remove('is-active'); nodes[i].classList.remove('is-enabled', 'is-scaling'); }
connectors.forEach(function (c) { c.classList.remove('is-flowing'); });
pulses.forEach(function (p) { p.setAttribute('opacity', '0'); });
scaleBarsGroup.classList.remove('is-scaling');
meterFill.setAttribute('width', '0');
meterLabel.textContent = 'idle \u2014 $0.00';
}
var speed = reducedMotion ? 0.4 : 1;
var stepHold = 550 * speed;
var travelDur = 480 * speed;
var scaleDur = 900 * speed;
var payHold = 1400 * speed;
var loopGap = 700 * speed;
function runCycle() {
if (!playing) return;
var t = 0;
// Step 1: Enable
after(t, function () {
setStatus(STEPS[0]);
flashRing(1);
nodes[1].classList.add('is-enabled');
});
t += stepHold;
// travel 1 -> 2
after(t, function () { fireConnector(0, travelDur); });
t += travelDur;
after(t, function () { hideConnector(0); });
// Step 2: Connect
after(t, function () {
setStatus(STEPS[1]);
flashRing(2);
});
t += stepHold;
// travel 2 -> 3
after(t, function () { fireConnector(1, travelDur); });
t += travelDur;
after(t, function () { hideConnector(1); });
// Step 3: Run SQL
after(t, function () {
setStatus(STEPS[2]);
flashRing(3);
});
t += stepHold;
// travel 3 -> 4
after(t, function () { fireConnector(2, travelDur); });
t += travelDur;
after(t, function () { hideConnector(2); });
// Step 4: Auto-scale
after(t, function () {
setStatus(STEPS[3]);
flashRing(4);
scaleBarsGroup.classList.remove('is-scaling');
void scaleBarsGroup.offsetWidth;
scaleBarsGroup.classList.add('is-scaling');
});
t += scaleDur;
// travel 4 -> 5
after(t, function () { fireConnector(3, travelDur); });
t += travelDur;
after(t, function () { hideConnector(3); });
// Step 5: Pay per use
after(t, function () {
setStatus(STEPS[4]);
flashRing(5);
meterLabel.textContent = 'billing \u2014 metering usage';
meterFill.setAttribute('width', '70');
});
t += payHold;
after(t, function () {
meterFill.setAttribute('width', '0');
meterLabel.textContent = 'idle \u2014 $0.00';
for (var i = 1; i <= 5; i++) { rings[i].classList.remove('is-active'); }
nodes[1].classList.remove('is-enabled');
setStatus('Scales to zero when idle \u2014 no query, no charge');
});
t += loopGap;
after(t, function () { if (playing) runCycle(); });
}
function play() {
if (playing) return;
playing = true;
playBtn.classList.add('is-playing');
playLabel.textContent = 'Pause';
runCycle();
}
function pause() {
playing = false;
clearTimers();
playBtn.classList.remove('is-playing');
playLabel.textContent = 'Play';
}
function restart() {
clearTimers();
resetVisuals();
setStatus('\u00A0');
if (playing) { runCycle(); }
}
playBtn.addEventListener('click', function () {
if (playing) { pause(); } else { play(); }
});
restartBtn.addEventListener('click', restart);
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">No servers or clusters to manage β AWS handles it all.
π― When to Use It
Great for reporting, dashboards, real-time analytics, ad hoc SQL, and workloads where demand is unpredictable β AWS scales automatically as needed.
π Redshift vs Redshift Serverless
Redshift | Redshift Serverless |
|---|---|
You provision and manage the warehouse | AWS provisions and manages it automatically |
Pay for provisioned compute | Pay only for what you use |
Best for predictable workloads | Best for variable/unpredictable workloads |
π Summary
π Redshift = AWS's fully managed data warehouse
π§ Built for OLAP, not transactional workloads
π Use for analytics, reporting, BI, and data warehousing
ποΈ Columnar storage makes analytical queries fast
β‘ MPP processes massive datasets efficiently in parallel
π Integrates with QuickSight and Tableau
π Redshift Serverless = auto-managed infra, auto-scaling, pay-per-use