Skip to Content
Neo4j: The Definitive Guide
book

Neo4j: The Definitive Guide

by Luanne Misquitta, Christophe Willemsen
July 2025
Beginner to intermediate
410 pages
6h 27m
Korean
O'Reilly Media, Inc.
Content preview from Neo4j: The Definitive Guide

3장. 모델링 결정 재검토하기

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

그래프 모델링( )은 비즈니스의 사용 사례를 명확히 이해해야 하는 직관적인 프로세스입니다. 관계형 스키마 설계와는 다르며, 유연성과 고정된 규칙이 없기 때문에 처음에는 당황스러울 수 있지만, 프로세스에 익숙해지면 보람 있는 작업이라는 것을 알게 될 것입니다.

1장에서 만든 그래프를 사용하여 다음 쿼리 중 몇 가지를 시도해 보겠습니다.

상황에 따라

트랙, 앨범, 아티스트 및 그 장르가 포함된 데이터 세트가 주어졌고 관계형 데이터베이스 관리 시스템(RDBMS)을 위한 스키마를 설계하려고 한다고 가정해 보겠습니다. 아마도 익숙한 정규화 규칙 세트를 적용하여1 을 적용하여 그림 3-1과 같이 비슷한 구조적 모델(테이블과 열 이름은 다를 수 있음)을 만들 수 있습니다.

그림 3-1. RDBMS의 스키마

이것을 어떻게 그래프로 모델링할까요? 노련한 그래프 모델러라면 "상황에 따라 달라집니다!"라고 대답할 수 있을 것입니다. 정말요? 네, 그렇습니다. 그림 3-2에서 3-4는 세 가지 그래프 모델을 보여 주며, 모두 유효합니다.

그림 3-2. 장르를 아티스트의 속성으로 모델링하는 모델 A.
그림 3-3. 장르는 노드이고 앨범은 모델 B의 속성입니다.
그림 3-4. TRACK_VERSION 노드와 장르를 레이블로 사용하는 모델 C

데이터 집합에 더 많은 엔티티를 추가하면 가능한 모델의 수가 늘어납니다. 어떤 모델도 틀린 것은 없으며, 사용 사례에 따라 적합성이 달라집니다. 그렇기 때문에 노련한 그래프 모델러라면 "그래프가 어떤 질문에 답하기를 원하십니까?"라고 묻는 것이 좋습니다. 사용 사례에 따라 그래프에 대한 질문에 답하고 효율적인 쿼리를 수행하기 위해 어떤 모델이 최적인지 결정됩니다.

다른 모든 것과 마찬가지로 단순하게 유지하는 것이 좋습니다. 필요한 만큼만 모델링하고 그 이상은 하지 말고 조급하게 최적화하지 마세요.

그래프 모델은 언제든지 리팩터링할 수 있으며, 이는 안티패턴으로 간주되지 않습니다. 그래프 모델은 비즈니스의 변화에 따라 지속적으로 진화해야 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Neo4j: The Definitive Guide

Neo4j: The Definitive Guide

Luanne Misquitta, Christophe Willemsen
Apache Iceberg: The Definitive Guide

Apache Iceberg: The Definitive Guide

Tomer Shiran, Jason Hughes, Alex Merced
Kafka: The Definitive Guide, 2nd Edition

Kafka: The Definitive Guide, 2nd Edition

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty

Publisher Resources

ISBN: 9798341664869