0Pricing
MongoDB Academy · 강의

관계형 데이터베이스의 병목

SQL 데이터베이스의 확장성과 유연성 측면의 문제점이 NoSQL의 등장으로 이어진 배경을 파악합니다.

관계형 데이터베이스의 병목은(는) CoddyKit의 무료 MongoDB Academy 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 MongoDB Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. MongoDB Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

The Rise of Relational Databases

For decades, relational databases like MySQL and PostgreSQL ruled. They store data in neat tables of rows and columns, and they work great. So why look further?

The Rigid Schema Problem

SQL tables use a rigid schema: you must define every column up front. Changing it later means a migration that can lock the table and cause downtime.

-- Adding a column to a large table in PostgreSQL can be slow
ALTER TABLE users ADD COLUMN preferences JSONB;
-- On 100M rows this may require a full table rewrite
-- and blocks reads/writes for minutes

Scaling Up vs. Scaling Out

To grow, SQL usually scales up — a bigger, pricier server. But there's a ceiling. Modern apps need to scale out across many machines, which SQL handles awkwardly.

JOIN Performance at Scale

SQL splits data across tables and stitches it back with JOINs. That's fine when small, but on huge data, joining five tables per query gets slow.

-- A typical normalized SQL query joining 4 tables
SELECT o.id, c.name, p.title, oi.quantity
FROM orders o
JOIN customers c ON c.id = o.customer_id
JOIN order_items oi ON oi.order_id = o.id
JOIN products p ON p.id = oi.product_id
WHERE o.status = 'pending';

The High-Traffic Write Problem

SQL locks rows to keep data safe with ACID transactions. Great for banks, but those locks struggle when you need millions of writes per second.

Unstructured and Semi-Structured Data

The web is full of semi-structured data like messy JSON. Forcing it into fixed columns means tons of empty fields or awkward workarounds.

-- EAV table: flexible but awkward to query
CREATE TABLE product_attributes (
  product_id INT,
  attr_name  VARCHAR(50),
  attr_value VARCHAR(200)
);
-- Querying all electronics by voltage is painful:
SELECT * FROM product_attributes
WHERE attr_name = 'voltage' AND CAST(attr_value AS INT) > 100;

The Internet Scale Wake-Up Call

Around 2006, Google and Amazon hit real scaling walls and published their fixes. That sparked a whole new wave: NoSQL databases built for internet scale.

What NoSQL Does Differently

NoSQL trades some SQL rules for new strengths: flexible schemas, easy scaling across machines, and fast writes. Not always better — just optimized differently.

When RDBMS Still Wins

SQL still wins plenty: financial transactions, complex reports, and stable data. Most apps never outgrow a well-tuned PostgreSQL. Right tool for the job!

The Document Model as a Solution

MongoDB's answer is the document model. Instead of splitting a user across five tables, it stores everything together in one JSON-like document. The code below shows one.

// A MongoDB document stores related data together
{
  _id: ObjectId('...'),
  name: 'Alice',
  email: 'alice@example.com',
  address: { city: 'London', zip: 'EC1A' },
  tags: ['premium', 'newsletter'],
  createdAt: ISODate('2024-01-15')
}

Horizontal Scaling Is Built In

MongoDB scales out with sharding — adding servers as you grow. Replica sets keep copies live, so if one node fails, another takes over automatically.

Quick Check

Test your understanding of MongoDB & NoSQL Databases concepts from this lesson.

Lesson Recap

You saw why SQL bottlenecks at huge scale, where JOINs and heavy writes hurt most, and how MongoDB's document model fixes it. Next: the four NoSQL families.

자주 묻는 질문

“관계형 데이터베이스의 병목” 강의는 무료인가요?

네 — “관계형 데이터베이스의 병목” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 MongoDB Academy 강의 전체를 잠금 해제할 수 있습니다. MongoDB Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“관계형 데이터베이스의 병목”에서 뭘 배우나요?

SQL 데이터베이스의 확장성과 유연성 측면의 문제점이 NoSQL의 등장으로 이어진 배경을 파악합니다. 브라우저에서 직접 실행하는 실습 코드로 MongoDB Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

MongoDB Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 MongoDB Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“관계형 데이터베이스의 병목” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 MongoDB Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 MongoDB Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 관계형 데이터베이스의 병목
  2. NoSQL 유형: 문서, 키-값, 열, 그래프
  3. 쉬운 말로 이해하는 CAP 정리
  4. MongoDB의 위치
← MongoDB Academy(으)로 돌아가기