100% found this document useful (6 votes)
17 views

Get (Ebook) Practical Graph Structures in SQL Server and Azure SQL: Enabling Deeper Insights Using Highly Connected Data by Louis Davidson ISBN 9781484294598, 9781484294581, 1484294599, 1484294580 free all chapters

The document provides information about the ebook 'Practical Graph Structures in SQL Server and Azure SQL' by Louis Davidson, which focuses on utilizing graph structures for deeper insights in data management. It includes details on various chapters covering graph fundamentals, SQL graph table basics, tree data structures, and performance optimization techniques. The ebook is available for download in multiple formats, and supplementary materials can be accessed on GitHub.

Uploaded by

furraperrut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (6 votes)
17 views

Get (Ebook) Practical Graph Structures in SQL Server and Azure SQL: Enabling Deeper Insights Using Highly Connected Data by Louis Davidson ISBN 9781484294598, 9781484294581, 1484294599, 1484294580 free all chapters

The document provides information about the ebook 'Practical Graph Structures in SQL Server and Azure SQL' by Louis Davidson, which focuses on utilizing graph structures for deeper insights in data management. It includes details on various chapters covering graph fundamentals, SQL graph table basics, tree data structures, and performance optimization techniques. The ebook is available for download in multiple formats, and supplementary materials can be accessed on GitHub.

Uploaded by

furraperrut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Download the Full Ebook and Access More Features - ebooknice.

com

(Ebook) Practical Graph Structures in SQL Server


and Azure SQL: Enabling Deeper Insights Using
Highly Connected Data by Louis Davidson ISBN
9781484294598, 9781484294581, 1484294599,
1484294580
https://ebooknice.com/product/practical-graph-structures-in-
sql-server-and-azure-sql-enabling-deeper-insights-using-
highly-connected-data-50493490

OR CLICK HERE

DOWLOAD EBOOK

Download more ebook instantly today at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Practical Graph Structures in SQL Server and Azure


SQL: Enabling Deeper Insights Using Highly Connected Data
by Louis Davidson ISBN 9781484294581, 1484294580
https://ebooknice.com/product/practical-graph-structures-in-sql-
server-and-azure-sql-enabling-deeper-insights-using-highly-connected-
data-50165506
ebooknice.com

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason;


Viles, James ISBN 9781459699816, 9781743365571,
9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Pro SQL Server 2022 Wait Statistics: A Practical


Guide to Analyzing Performance in SQL Server and Azure SQL
Database, 3rd Edition by Thomas LaRock, Enrico van de Laar
ISBN 9781484287705, 1484287703
https://ebooknice.com/product/pro-sql-server-2022-wait-statistics-a-
practical-guide-to-analyzing-performance-in-sql-server-and-azure-sql-
database-3rd-edition-47559882
ebooknice.com

(Ebook) Pro SQL Server 2022 Wait Statistics: A Practical


Guide to Analyzing Performance in SQL Server and Azure SQL
Database, 3rd Edition by Thomas LaRock, Enrico van de Laar
ISBN 9781484287712, 1484287711
https://ebooknice.com/product/pro-sql-server-2022-wait-statistics-a-
practical-guide-to-analyzing-performance-in-sql-server-and-azure-sql-
database-3rd-edition-47559896
ebooknice.com
(Ebook) SQL Server Execution Plans. For SQL Server 2008
through to 2017 and Azure SQL Database by Grant Fritchey
ISBN 9781910035221, 191003522X
https://ebooknice.com/product/sql-server-execution-plans-for-sql-
server-2008-through-to-2017-and-azure-sql-database-11063662

ebooknice.com

(Ebook) Practical Database Auditing for Microsoft SQL


Server and Azure SQL: Troubleshooting, Regulatory
Compliance, and Governance by Josephine Bush ISBN
9781484286333, 1484286332
https://ebooknice.com/product/practical-database-auditing-for-
microsoft-sql-server-and-azure-sql-troubleshooting-regulatory-
compliance-and-governance-46188488
ebooknice.com

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena


Alfredsson, Hans Heikne, Sanna Bodemyr ISBN 9789127456600,
9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) Expert Performance Indexing in Azure SQL and SQL


Server 2022 by Edward Pollack, Jason Strate ISBN
9781484292150, 1484292154
https://ebooknice.com/product/expert-performance-indexing-in-azure-
sql-and-sql-server-2022-48211984

ebooknice.com

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT


II Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018

ebooknice.com
Louis Davidson

Practical Graph Structures in SQL


Server and Azure SQL
Enabling Deeper Insights Using Highly Connected
Data
Louis Davidson
Cleveland, TN, USA

ISBN 978-1-4842-9458-1 e-ISBN 978-1-4842-9459-8


https://doi.org/10.1007/978-1-4842-9459-8

© Louis Davidson 2023

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
To Val, what a life we have had so far… here’s to more of it.
Preface
I started working on my first book 23 years ago. It was on relational
database design. I had learned a little about graphs at that point from a
class I took by Dr. David Rozenshtein (his 1997 book The Essence of SQL
: A Guide to Learning Most of SQL in the Least Amount of Time was
essential). His class was very influential and taught me a lot about how
to think about SQL problems. This was a really long time ago (clearly),
but in that same class, one of the sections was on trees in SQL Server. I
was hooked on the subject.
In my 2012 edition of my database design book, I started to include
hierarchies as one of the topics. In my latest book, that came out after
SQL Server 2019 arrived, I promised a book of SQL Graph. This book in
your hands is the answer to that challenge.
This is my first programming-based book in many years. Usually I
am more interested in helping you shape a design, but in this case, I
want to show you the mechanics of building a graph database solution
using SQL Server and leave it more to you to decide what to do with it
from there. Part of this is due to the newness and relative complexity of
the topic, but also because graphs are meant to be very flexible
structures…way more flexible than the standard relational databases.
The chapters of the book are as follows:
Chapter 1: What a graph is and ways graphs can be used. I touch on
some of the underpinnings of what makes a graph a graph and a taste
of the theory that mathematicians use to describe and work with
graph data structures.
Chapter 2: How graphs are implemented and the algorithms that are
used to process them. While the basic structure of the graph is really
simple, there is some value to understanding how graph structures
are built in coding and having some idea of what you will see in the
rest of the book.
Chapter 3: The syntax that Microsoft has implemented for use with
graph data stored in SQL Server tables is similar to what you
probably already know from working with relational tables, but it is
so much more. In this chapter, I teach you how to use the syntax
provided by Microsoft to query graph tables in interesting ways.
Chapter 4: Whereas in Chapter 3 I showed basic query techniques, in
this chapter I show methods that can help you load and protect the
integrity of the data in your SQL Graph tables.
Chapter 5: A tree structure built using SQL Graph objects, including
code to load and manipulate those nodes in ways that you will need
when building production systems. In this chapter, you explore the
code to create and manage a tree in SQL Server, along with an
example of how it all works.
Chapter 6: In this chapter, I dig into performance. You’ll examine a
new method of implementing a tree for comparison to the SQL Graph
objects and build some objects you can use to write queries to report
on data in your trees that operate faster. You will then build some
large, random data sets and compare how these methods perform
with certain larger sized data sets.
Chapter 7: The goal of this chapter is to build a data structure that
can show some of the concerns with working with directed graphs
that are not trees. You will build a fairly simple bill of materials data
structure to demonstrate the techniques you will need when you are
working with these structures, which are similar to trees but still
quite different.
Chapter 8: In this chapter, you will do some querying of larger data
sets in SQL Server’s graph objects. To do this, you will implement a
graph structure and data generation tools to try on large sets of data
to match your expected needs. Finally, you will explore a set of
performance tips for handling graph objects.
SQL Server’s relational engine may never be acceptable as a
complete replacement for a specific graph database system like
CosmosDB, but even in its relative infancy with just a few iterations
complete in the SQL Server lifecycle, it has become a nice way to extend
your data structures inside existing relational data structures quickly
and easily.
You can find the downloads in the book in two locations. First, on
Apress’s website you will find the original code for this book and any
errata that is reported:
https://github.com/Apress/practical-graph-
structures. Second, at
https://github.com/drsqlgithub/GraphBook1 you will find
that code plus any new code and projects I create that pertain to
learning graphs until I start working on a second edition of this book
someday.
If you have any direct questions about the content, send email to
[email protected] and I will do what I can.
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub
(https://github.com/Apress). For more detailed information, please
visit www.apress.com/source-code.
Acknowledgments
My wife, for suffering through yet another long and painful book
writing process.
The Microsoft MVP Program for all the connections it has provided
me to meet wonderful, bizarrely smart people for 18 years. And my
lead, Rie Merritt, for all she has done for me through the years; amazing
how we met so many years ago. Just meeting Bob Ward and Conor
Cunningham is thrill enough, and there have been hundreds besides
them.
Shreya Verma and Arvind Shyamsundar for their help over the past
few years as I attempted to do crazy things with the graph objects on
my local personal computer.
Dr. David Rosenstein, who first got me interested in graphs in
relational structures so many years ago. Paul Nielsen for the talks we
had on graph structures.
Kathi Kellenberger for tech editing this book. I appreciate the hard
work!
All the doctors/medical professionals who kept me alive and kicking
these past few years. (If you want to know more, just ask, if you have a
while to talk. There is a reason this book took me over two years to
write.)
My coworkers at CBN whom I left during the writing of this book. I
hope the graph objects I left you with are serving you nicely.
My new coworkers at Redgate. I have been a friend of Redgate (as
well as a member of Friends of Redgate) for many years, writing for
them. My new manager and teammates have been nothing but
awesome.
Amber Davis, for giving me the chance to be a Dollywood Insider.
Obviously being a Dollywood insider has little to do with this book, but
I just wanted to say it again (which she may never see!) as I am writing
the acknowledgements in the Dollywood Dreammore lobby. I learned a
lot from her that has been useful writing some of this book and in my
new job at Redgate as Simple-Talk editor.
Table of Contents
Chapter 1:​Introduction to Graphs
Graph Fundamentals
Definition
Summary
Chapter 2:​Data Structures and Algorithms
Basic Implementation
Acyclic Graphs
Trees
Other Acyclic Graphs
Cyclic Graphs
Non-Directed Graphs
Summary
Chapter 3:​SQL Graph Table Basics
Object Creation
Creating Data
Querying Data
Node-to-Node Querying
Traversing Variable Level Paths
Summary
Chapter 4:​SQL Graph Tables:​Extended Topics
Advanced Data Creation Techniques
Building an Interface Layer
Loading Data Using Composable JSON Tags
Heterogenous Queries
Integrity Constraints and Indexes
Edge Constraint
Uniqueness Constraints (and Indexes)
Additional Constraints
Metadata Roundup
List Graph Objects in the Database
Types of Graph Columns
Tools for Fetching Graph Information
Summary
Chapter 5:​Tree Data Structures
Creating the Data Structures
Base Table Structures
Demo Sales Structure
Essential Tree Maintenance Code
Code To Create New Nodes
Reparenting Nodes
Deleting a Node
Tree Output Code
Returning Part of the Tree
Determining If a Child Node Exists
Aggregating Child Activity at Every Level
Summary
Chapter 6:​Tree Structures, Algorithms, and Performance
Alternative Tree Implementation
Path Technique
Helper Table
Performance Comparison
Summary
Chapter 7:​Other Directed Acyclic Graphs
The Problem Set
The Example
Determining If a Part Is Used in a Build
Picking Items for a Build
Printing Out the Parts List for a Build
Summary
Chapter 8:​A Graph For Testing
The Example
Creating the Tables
Loading the Data
The Queries
Performance Tuning Results
Performance Tuning Roundup
Test
Index the Internal Columns
Employ a Maximum Degree of Parallelism of One
Consider Breaking Up Some Queries
The End (or Is It the Beginning?​)
Index
About the Author
Louis Davidson
has been working with databases for
more than 25 years as a corporate
database developer and architect. He is
now the editor for the Redgate Simple
Talk website. He has been a Microsoft
MVP for 18 years. In addition to this
book on graphs in SQL Server, he has
written six editions of his general-
purpose SQL Server database design
book (Apress) and has worked on
multiple other book projects over the
years.
Louis has been active in speaking about database design and
implementation at many conferences over the past 25 years, including
SQL PASS, SQL Rally, SQL Saturday events, CA World, Music City Data,
and the devLink Technical Conference. He has a bachelor’s degree in
computer science from the University of Tennessee at Chattanooga. For
more information, please visit his website at drsql.org.
About the Technical Reviewer
Kathi Kellenberger
is a Customer Success Engineer at
Redgate and a Data Platform MVP. She
has worked with SQL Server since 1998
and has authored, co-authored, or tech
reviewed over 20 technical books. Kathi
is a longtime volunteer at LaunchCode in
St. Louis where she has taught T-SQL in
the LaunchCode Women + program.
When Kathi isn’t working, she enjoys
spending time with family and friends,
cycling, singing, and climbing the stairs
of tall buildings.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2023
L. Davidson, Practical Graph Structures in SQL Server and Azure SQL
https://doi.org/10.1007/978-1-4842-9459-8_1

1. Introduction to Graphs
Louis Davidson1
(1) Cleveland, TN, USA

With great power comes great responsibility.--Voltaire (and Spider-


Man’s Uncle Ben)
At its core, a graph data structure is simply a model representing
the connection of one thing to one other thing and then those things to
even more other things. Essentially a graph database formalizes a
database based on many-to-many relationships as the core
relationship.
Everyone who has ever modeled a relational database will either
have modeled a graph purposefully or inadvertently because many-to-
many relationships begin to appear as you add more concepts to your
data model. The vast difference you will see is that relational
implementations, ideally, are rigidly modeled.
The term frequently used to decide whether to model a many-to-
many relationship in a relational database or a graph structure is
whether the data is highly connected. With a graph database
structure, you can connect many tables to many other tables and query
that structure in a different (yet quite similar) manner to how you
query a relational database.
There are many examples of graphs, but some of the most common
examples you probably hear about are
Social networks, where you record the relationship from one person
to another
Suggestion processing systems like online retailers use to record the
relationship between a person and the products they have looked at
and ordered and how that matches up with other people who have
similar interests
Manager-employee relationships where the employee has a manager
who also has a manager who is likely managed by someone else
With this information, you can discover interesting things about an
object based on its relationships and similarity to relationships other
entities have.
Possibly the most famous graph that most people will have heard of
is the basis of the parlor game “Six Degrees of Kevin Bacon.” This game
suggests that everyone is no more than six connections away from
anyone else, including Kevin Bacon (and not just that your favorite
breakfast meat is bacon.)
The fact that graphs are very natural data structures does not make
them easy to work with. Because they are less rigid data structures
than relational tables, the flexibility makes them quite complex to work
with (certainly in the database engine). Graph objects can represent a
very messy reality, and the more complex the data you are modeling,
the more complicated it is to work with. Of course, the reward for that
complexity is the solutions you create are often quite tremendous.
Like many computer science topics, graphs are also a fundamental
mathematical concept. Some of the insights you can get from the math
of graphs will help once we start analyzing data. So, to begin this book
on graphs, I will provide a very cursory look at some mathematical
concepts as I define what a graph is and how it can be used in software.
Note that the concepts in this chapter were gleaned from many
resources and are generally common knowledge. However, when I was
searching for resources to read for an introduction to the concepts of
graphs, including mathematical proofs (none of which will come up in
this book, so no worries!) of such concepts, one was Introduction to
Graph Theory by Richard J. Trudeau from Dover Publications in 1993. It
is far deeper than this chapter and definitely more than you need to
learn to code with SQL Server’s graph database extensions, and
mathematical proofs have always been my Kryptonite! However, I
highly recommend this as a place to ascend to the next level beyond
what I will show you.
This chapter will be a quick, high-level overview of the many topics
you will find in this book and many other sources, plus ideas you may
wish to use in the graph table objects I will cover once you start
building objects. The book itself will be mostly focused on very
practical applications and how to write certain types of code, but I
found that knowing some of the graph fundamentals really helped me
to envision what I was attempting to accomplish.

Graph Fundamentals
While most readers will have the explicit goal of applying a graph to a
specific problem they are trying to solve, it is best to start at the
beginning and discuss what a graph is in the pure sense. (If you don’t
care, you can skip to Chapter 3 where the T-SQL code starts!) Going
through the fundamentals will help you free your mind from
preconceived notions. Perhaps, more importantly, you can ignore the
limitations of the tools and specific problem sets you may wish to solve
and just think about the whole problem set.
In math, there are the concepts of “pure” math and “applied” math.
Pure math is math for math’s sake. It is there to ask, “what can be done
with a construct?” without asking the limiting questions of, “is this
helpful code to solve my problem or, even more importantly, any
problem?” Applied math is more or less the sort of thing we typical
computer architects/programmers are typically interested in since we
have a problem and want to find something to help us with that
problem (and immediately so). Most of the time, solutions are only
interesting if they can solve the specific problems we currently know
about and have a manager riding on our back.
However, I always prefer to start just trying to see what I can
accomplish with a new tool before getting my hands dirty
(metaphorically, of course; as a programmer, my hands never get dirty
at work unless the day’s snack includes chocolate).
Some of the things I will discuss will then be familiar in
understanding what we might do when looking for patterns in the data
and eventually translating into algorithms. Some designs may not be
realistically possible due to current computing limitations in SQL
Server (or any graph database platform) or reasonable hardware
limitations at the time of writing in 2023. Having written my first book
in 2000, it astounds me how different this statement feels to me 23
years later sitting here with a computer on my desk that has more
power that medium to large corporations were running on when I first
wrote T-SQL.
In one of my sample databases you can download, I have millions of
rows in just one table, and I can process reasonable queries on my
desktop computer in mere minutes. Limitations always exist, but there
are fewer and fewer limitations for every generation of computer
architecture that passes.
My goal here in this first chapter (and to a large extent, the second
chapter) is to simply introduce some of the terms and concepts around
graphs to help you understand how graphs are shaped and, eventually,
processed.

Definition
Graphs are based on two primary data structures: nodes (or in math
terms, vertices), and edges. Nodes represent a thing that one might
care about, much like a table in a relational database. Edges establish a
connection between exactly one or two nodes (when the node count is
one, it means the node is related to itself.) A graph is defined as being a
set of nodes and a set of edges.
In a graph database, a node is like most any table with attributes
describing what the node represents. The edge is analogous to a many-
to-many relationship table with at least attributes to represent the
node that the relationship is from and which it is to. You will see that
two major things set these new concepts apart from a relational
implementation.
First, the from and the to in an edge generally can be from any node
object. Whereas a relational table column used to reference another
table value communicates that it is a foreign key from Table X and
nothing else, the from and to attributes of an edge can be from multiple
different node types if you so desire.

Tip I am fully aware that you can put any value into a column, so
every foreign key value in a column needn’t come from the same
table. But that is not how it should be done because data where a
column can mean multiple things is very confusing in a relational
table. Graph structures work very similar to how relational tables
work. Still, they have special properties that allow two rows to
contain data from multiple sources without confusing the
user/engine.

Second, to make use of these flexible structures, a special set of


operations is enabled in a graph engine, allowing easier access to the
meaning of the relationships than we can get using SQL. More detail on
these operations and the basic algorithms are in Chapters 2 and 3.
For the first example, consider the simple graph represented in
Figure 1-1—two nodes connected by a single edge. If the type of node is
important, it will be indicated using different shapes.

Figure 1-1 Simple graph

When diagraming a graph, edges may also have a property of


direction. The direction indicates that the relationship is not reciprocal.
For example, consider Figure 1-2.

Figure 1-2 Simple directed graph

In this graph, N1 connects to N2, but N2 is not connected to N1. This


is analogous to a social media relationship such as when I follow Paul
McCartney, but Paul McCartney doesn’t follow me! It will often be very
important to understand the value of the direction because of the
unbalanced nature of some relationships. Mr. McCartney doesn’t all of
the sudden wish to get any communication about where I am speaking
at a conference, but I wish to be informed of his concerts and new
music being released.
In SQL Graph, and other graph products, edges are almost always
directed. This will become important later but will only complicate our
discussion of graphs concepts in general, so to start with, let’s ignore
the directedness of the edges.
In my first example graph in Figure 1-1, I have two nodes and a
single edge. This is a very simple graph, but it is not the simplest graph.
The simplest graph is a graph with 0 edges and 0 nodes, otherwise
referred to as the NULL graph. You can also have a graph with a single
node and no edges, and a single node with a single edge, and so on. (You
can’t have an edge without a node.)
Just like modeling a relational database, there is an inherent danger
in thinking of a graph as a drawing and not a complex data structure.
Consider a graph with the nodes and edges seen in Figure 1-3.

Figure 1-3 Graph with four edges and four nodes

This graph could be expressed as sets of nodes and edges in the


following manner:
Nodes: {N1,N2,N3,N4}; Edges: {E1:{N1,N2}; E2:{N2,N4}; E3:
{N3,N4}; E4:{N1,N3}}
By definition, all nodes and edges must be distinct, much like a table
requires distinct rows. And just like a table, the order of the items in the
sets has no importance. The following graph is the same as
diagrammed and as defined prior to this paragraph:
Nodes: {N2,N3,N1,N4}; Edges: {E2:{N2,N4}; E1:{N1,N2}; E4:
{N1,N3}; E3:{N3,N4}}
When drawing a graph as an image, there is a very similar
consideration. Every programmer with any skill has frequented a white
board to draw a diagram of a structure. If you were to draw a shape of a
circle, a triangle, and a square on the white board, instinctively you
would believe them to be different things. Even if you drew a rectangle,
square, and a rhombus (all shapes with four sides) you would not think
they were the same.
But, in graph terms (just like when diagramming tables), the two
graphs in Figure 1-4 are the same as each other and the graph in Figure
1-3, in which they are considered “equal.”

Figure 1-4 Two identical graph structures

The two graph diagrams in Figure 1-4 are copies of the same graph.
The next concept is related, in that we will look at graphs with the same
shape but different nodes. When a graph has the same node and edge
shape (meaning the same nodes and edges, not diagram shape,) the
graphs are referred to as being isomorphic graphs. For example, the
two graphs in Figure 1-5 are not equal but they are isomorphic because
they have the same shape in their set of data (regardless of whether you
draw them as a square or not).
Figure 1-5 Two isomorphic graph structures
This concept of isomorphism will be, if not actually referred to using
the exact term, interesting in your usage of graphs on occasion.
Consider the set of nodes in Figure 1-6.

Figure 1-6 Sample graphs for comparison

Now, consider that the nodes {Larry, The Who, Rolling Stones},
which form what is known as a subgraph (a set of nodes and edges
that is a part of a graph) of the more complete graph, are isomorphic to
{Fred, The Who, Rolling Stones}. It isn’t a difficult leap to see that since
Fred and Larry are both connected to two similar nodes, that an
additional edge {Fred, Beatles} might be a possibility for Fred. So, the
company may then wish to suggest “Have you heard of The Beatles (or
do you live under a rock)?” Of course, Fred may not be a fan of John,
Paul, George, and Ringo; but the goal of many graphs may be to look for
common traits and then suggest ways to make them more common.
Take this further and you may see patterns occurring from completely
different subgraphs that may indicate a repeatable pattern.
An important concept in subgraphs is a walk in a graph. This refers
to how you can traverse from node to node. For example, in the first
graph in Figure 1-6, starting at Larry you can find a walk from Larry ->
TheWho -> Rolling Stones -> Beatles -> Larry. You can also find many
other walks from any node to any node in this sample graph, since
every node in the graph is connected to every other node. Another term
for a walk is a path, which may be a bit more common since the
operator you will use in SQL Server 2019 and later to find a walk is
named SHORTEST_PATH.
You will often use this concept of a walk to determine the closest
one node is to another. For example, in the second variant of the graph,
the distance from Fred to The Who and Rolling Stones is 1 and to the
Beatles is 2. If you are a user of LinkedIn, you have seen this concept
when you see that you are a first-level connection or second or more to
other people. A second-level connection means you are connected
through one intermediate node.
A concept that is interesting if likely not particularly necessary in
programming typical graph structures is a Euler (pronounced Oiler)
Walk. An Euler Walk consists of the starting node being touched twice
and every edge in the graph touched exactly once. For example,
consider the graphs in Figure 1-7.
Figure 1-7 Graph diagrams to demonstrate walks

Note This gets a little hard to express in text!

In Figure 1-7A, you can traverse from N1 back to N1 through E1->N2-


>E2->N4->E3->N3->E4. And in 1-7B, you can go starting and ending at
N1, through E1->N2->E5->N1->E4->N3->E6->E3->N3->E7->N2->E2-
>N4->E8. However, in 1-7C, it is impossible to do this, because if you
start at N1 and start a walk such as N1->E1->N2->E5->N1->E4, you will
never be able to return to N1. It turns out that for a graph to have a
Euler Walk, all the nodes must be of an even degree (the degree of a
node indicates the number of edges connected to the node).

Note A graph such as 1-7B and 1-7C is a multigraph. A multigraph


allows that we have more than one edge between the same two
nodes. As we get more complex, we can see that an edge often
indicates a role that the nodes play in a relationship. Some edges
don’t make sense, having multiple edges between the same node;
others may make perfect sense. Remember I said earlier that edges
between nodes must be unique. These edges may not be equal, but
instead say two things about the relationship between to nodes, like
in Figure 1-7b, N1->N2 has E1 and E5. One may be a familial
relationship, the other a social network connection, which you
probably would not want to be the same edge for the reason of
traversing a specific type of edge.

Realistically the limitation will come down to the thing that all
modeling decisions come to: semantics. What does the relationship
mean and how will it be used to mean one or more relationships? For
example, you might only logically have one edge between persons
indicating that person is a biological parent to a person; on the other
hand, multiple edges between person and movie could make sense: one
for actor, one for producer, one for director, and so on.
One last bit of graph theory I want to cover is that of a connected
graph. In a connected graph, there is a walk from every node in the
graph to every other node. The graph will be in one or more pieces in a
disconnected graph. In Figure 1-8, we have the simplest connected
graph with more than one node in 1-8A and the simplest disconnected
graph in 1-8B. The graph in 1-8A is said to be in one piece, and the
graph in 1-8B is in two pieces.

Figure 1-8 Simple connected and disconnected graphs


In Figure 1-9, we have a more complex graph in three pieces.

Figure 1-9 Single graph in three pieces

When you have a connected graphs and removing an edge will cause
it to be broken into more pieces, the edge is referred to as a bridge
edge. Consider the graph in Figure 1-10.

Figure 1-10 Graph to demonstrate bridge edges


There are two bridge edges in this graph. The most obvious is E28.
If you remove it, you will have two multi-node pieces remaining. The
one that is perhaps less obvious is E9. Removing E9 would leave S3
alone and hence one more piece to the graph. When the degree of a
node is 2, removing any edge will leave the remaining edge a bridge
edge.

Graphs In Computing/Directed Graphs


Now that I have introduced a subset of the terminology and shapes of
graphs, it is time move towards the mechanics of graphs you will be
building and using with SQL Server’s SQL Graph feature (or really any
mainstream graph product). All the aforementioned concepts still hold,
but there is one major difference. Edges in computing terms are
generally one way only. An edge that points in one direction only is
referred to as a directed edge and the whole graph as a directed
graph. I will not redefine all the previously introduced concepts in
terms of directed graphs, as the goal of covering the topics was to get
you thinking about graph structures and how they fit together. I will
discuss how they are applicable as it makes sense.
Relationships in a directed graph are in the form shown in Figure 1-
11.

Figure 1-11 Directed edge

Whereas in previous graph examples an edge between N1 and N2


represented that N1 was connected to N2 and N2 connected to N1, now
edge E1 represents only that N1 is connected to N2, not the reciprocal.
All the concepts covered previously hold, with the obvious complication
that one must consider the direction of the edge when determining if
two graphs are equal or isometric and what walks may be present. For
example, consider the graphs in Figure 1-12.
Figure 1-12 Graph examples to demonstrate equality and isomorphism with a
directed graph
1-12A and 1-12B are not equal, but 1-12B is isometric because the
edge is in a different direction, but the basic structure is two nodes
connected by a directed edge.
1-12A and 1-12D are also not equal because the nodes are different,
but they are isometric because structurally they are the same. 1-12C
and 1-12D are exactly alike so they are equal.
When specifying a directed graph, you still can use the same set
notation, except that you need to denote an ordering to the nodes. So,
Figure 1-12A could be expressed as
Nodes: {N1,N2}; Directed Edges: {E1:{N1,N2}}
You can simulate the bidirectional qualities of a non-directed graph
by always having two edges between each node:
Nodes: {N1,N2}; Directed Edges: {E1:{N1,N2}, E2:{N2,N1}}

Cyclic and Acyclic Graphs


With directed graphs comes a very important concept that will play a
major part in of all our uses of graphs in practice: cycles. A graph cycle
refers to a directional graph having a walk from a given node that can
pass through the same node twice. It is similar to the concept of a Euler
Walk, but in this case you can only traverse the graph based on the
direction of the edges.
For examples, the simplest cyclical graph is a single node with a
relationship to the same node, and the next simplest is two nodes and
two edges going from and to each edge, as in Figure 1-13.

Figure 1-13 Cyclic graph examples


This concept of cyclical graphs is important for a couple of reasons.
First, let’s consider the programming concerns. Some algorithms will
work great on acyclic graphs but will not work on cyclic graphs. The
biggest issue is in processing. Consider the two graphs in Figure 1-14.

Figure 1-14 Graph examples to demonstrate processing acyclic and cyclic directed
graph

In Figure 1-14A, an acyclic graph, you can walk the graph from N1-
>N2->N3->N4 directly using a simple algorithm of going node to node,
touching all the nodes with no problem. But in Figure 1-14B, the
algorithm of going from node to node is made difficult by N1->N2->N3-
>N1, because what to do next? Cycle through the nodes again? Or stop
processing? All the results from starting at N1 would be repeated, but
what does this mean for the graph that you are modeling? You can
remember this mentally when manually tracing through, but the
programming gets more complex if you look at millions or billions of
nodes (the programming is not impossible, just more complicated).
This ability to be able to find a simple connection/walk from two
nodes in a graph is referred to as transitive closure. Once you have
hold of this power, you can do all forms of interesting things with
graphs, such as determining if you are connected to Kevin Bacon and
what is the shortest path through the people you are connected to that
you will need to bug to get tickets to see The Bacon Brothers in concert
when they come to your town.
In a more database design-oriented concern, consider what can be
modeled with an acyclic graph versus a cyclic one. More will be covered
in Chapter 2, but if you are modeling containership, like a bill of
materials (a data structure used in packaging/assembling items, where
products that are a part of other products are modeled using a graph), a
cycle in the graph could give you odd results. Consider the graph in
Figure 1-15.

Figure 1-15 Illogically modelled bill of materials

If the tire and wheel assembly contains a wheel assembly, and it in


turn contains lug nuts, and then the lug nuts contain a tire and wheel
assembly… you can see the inherent problem here. If you are modeling
something like a social network, cycles not only make sense, but you
can find important information from them (starting with a simple
reciprocal relationship showing that two people are connected.) In
Chapter 2, I will be discussing some of the different constructs you can
model using graph structures.
Acyclic graphs such as this are generally referred to as a class of
data structures known as a hierarchy. In the case of the bill of materials
structure, it is known as a polyhierarchy. A node in a polyhierarchy
may be the “to” partner in more than one edge, but the graph must be
acyclic. In this manner, one can think of the lug nut pack as a separate
item or as a part of the wheel (and in the real world, the lug nut would
be its own individual part!) but a lug nut pack cannot have the wheel or
wheel assembly as part of its part list for obvious reasons.

Summary
In this chapter, the goal was to introduce some of the core concepts that
are used when discussing graph topics. Many of these topics may show
up all over the book, but also some may not. The goal of this chapter
was to briefly introduce concepts that will help you to envision what a
graph is and how a graph might be used as you start to solve complex
problems with graphs.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2023
L. Davidson, Practical Graph Structures in SQL Server and Azure SQL
https://doi.org/10.1007/978-1-4842-9459-8_2

2. Data Structures and Algorithms


Louis Davidson1
(1) Cleveland, TN, USA

In this chapter, I will introduce the common graph configurations you


can create using objects in SQL Server. I will start by defining the basics
of how almost every graph structure is stored in a relational (or really,
any) database. Creating the tables to hold the graph structures is quite
straightforward; it is the processing of the data where things start to
get complicated.
For each of the data structure configurations I will cover, I will
include a high-level explanation of the algorithms you will use to
process them. This will leave later chapters to simply build the code to
process the data in the data structures.

Basic Implementation
As discussed in the previous chapter, the basic building blocks of a
graph are nodes and edges. A node is basically the same thing as any
relational database table representing some specific concept. An edge
represents a link between two rows in these tables, much like a typical
many-to-many resolution table does in a relational database.
So, say you have the graph shown in Figure 2-1.
Figure 2-1 Simple graph
You need a table to hold the N1 and N2 nodes. These nodes could be
of the same type or different types. For example, they could be one
person being the friend or family member of the other, or a person
being a fan of a certain football team. Let’s assume for this example that
they are the same type (and in the future, if I want them to be two
different types of objects, I will label the nodes as such).
For my examples, I will use data that would be at home in many
relational tables for most examples, simply because that is how you will
typically think of the data. In the following two chapters, I will establish
how SQL Server implements graph structures, but for now, just take the
data structures to be basically as you have built in SQL Server tables
before. To implement the structure in Figure 2-1, say you have the
following rows in a table to represent the two nodes:

Node
------
N1
N2

Now you need a data structure that represents the edge, like this:

FromNode ToNode
-------- -------
N1 N2

A common term for this data structure is an adjacency list. The


goal is to store a list of nodes adjacent to each other in the graph.
Except for one very specialized (and quite common) graph data
structure (a tree, which I will define later in the chapter), this is the way
to implement a graph in a database. Even Microsoft SQL Server’s graph
objects are implemented this way internally. It is common to use the
term neighbor or parent/child to describe the relationship between
nodes. Parent and child are very common for acyclic relationships, and
neighbor is for cases where you are recording that two nodes are next
to one another and the relationship allows cycles. The
child/neighbor node in a relationship is the one that is represented in
the ToNode column.
In practice, beyond the key values, you will always have additional
columns in your node tables, and usually in your edge tables as well.
Using the edge data structures’ from and to columns, plus other
columns, you can create many different shapes of graphs by applying
one or more unique indexes on different columns, as well as using other
methods to limit the types of data that can be placed in a column. This
is what I will introduce in the rest of this chapter.
I will discuss two major types of graph configurations, acyclic and
cyclic. From Chapter 1, it is hopefully clear that the primary
differentiator between them is that one allows cycles in the edges and
the other doesn’t. Of course, the other differentiator is the type of
situations where these data structures are useful.
An acyclic graph is often useful to define something very structured,
whereas a cyclic graph is useful for more organic scenarios. This will
become clearer in each of the major sections.

Acyclic Graphs
The easiest graphs to work with in a relational database are acyclic. The
reason comes down to the method used to process graphs in a
relational setting, the breadth-first algorithm (or relational
recursion). This algorithm was created for relational processing,
because the typical recursion used to process these data structures did
not fit well with the set-based nature of a relational database.
For example, consider the graph in Figure 2-2.
Figure 2-2 Sample graph structure
Processing this using a typical recursive manner, you choose your
starting point as N1 and then see if this node has one unprocessed
child. It does, so fetch N11. See if N11 has unprocessed children. Yes,
N111. N111 has no unprocessed child nodes, so whatever you are doing
with the data of the node, you add that to an output data structure.
Then step back up to N11 and get the next child node. And keep going.
This is referred to as a depth-first algorithm.
Common operations are counting nodes, summing sales from that
node, and so on. For your example, let’s just say you are counting child
nodes. So, you recurse back to N11 and add 1 to the child count. Then
you check for more child nodes, and you have more. Over and over. You
stop when every node has been processed in the subgraph that started
with your starting point.
This works great for certain kinds of programming languages but
terrible for relational ones where set-based processing is the clearly
desired method of programming. It works with sets of data, so that is
the kind of processing that has been devised for working with graphs in
the manner that relations engines work.
For a breadth-first algorithm, instead of digging down in the
structure, you take a starting point and then get all of the children of
that node. Then the children of those nodes, all at once. Taking that
same diagram, let’s break this down into a series of three queries on the
data, as seen in Figure 2-3.

Figure 2-3 Sample graph indicating the different levels that will be fetched in a
breadth-first query

You query for the starting point. In this case, it’s one node, but it
could be any number of nodes (in fact, that is the basis of some of the
code in this book to do things like starting at every node
simultaneously!). Your breadth-first algorithm is to query:

SELECT GraphId
FROM GraphObject
WHERE GraphId = @startingPoint --starting point =
N1

The next step is to take that set of data and query:


SELECT GraphId
FROM GraphObject
WHERE GraphId in (GraphId values from previous
query)
From the diagram, this gives you a set with N11, N12, N13. The next
query does the same join, but the GraphId from the previous query is
now these three nodes. You can sum/count/etc. during each loop
through the data. There is more to it, clearly, which will become clearer
when I implement the non-pseudo-code, but this is the gist of the
algorithm.
This process is pretty easy for an acyclic graph, but you can
probably already start to see the difficulties when working with cyclic
graph structures, in that if you have the graph in Figure 2-4, it will loop
eternally.

Figure 2-4 Sample graph with a cycle

Many operations stop making sense because you have an eternal


loop when processing this with a naïve nested loop algorithm.
One thing to note: If you have been taught repeatedly that relational
processes should avoid iterative code, this may shock you a little.
Practically all graph processing is iterative. Any code you write, and any
code that Microsoft uses to implement its graph structures, is iterative.
The trick will be to make sure the amount you iterate is the least
possible and is as efficient as possible. There are some alternative
methods of processing when dealing with tree algorithms, one of which
will be covered in Chapter 6.

Trees
By far the most common graph that has been implemented in relational
databases for many years is a tree. A tree is a structure that requires
that every node have either zero or one parent, and no more. Consider a
real tree (or in the case of Figure 2-5, a glorious reproduction of a tree
from Disney’s Animal Kingdom theme park).

Figure 2-5 A not-exactly-live tree as an analogy for a tree structure

It has one trunk that goes into the ground. Either direction out
(down to the roots or up to the branches), you can see the analogy. Any
branch can be from the trunk or another branch, but it can only be one
of these. Branches don’t grow together and reform as one. (At least not
typically, and this isn’t botany class!) Nodes that do not have any child
nodes are referred to as leaf nodes, much like the leaves on the
branches stand alone.
My breadth-first example structure was a tree, reincluded as Figure
2-6.
Figure 2-6 Example tree repeated
To represent this in an adjacency list structure, you have rows like

From To
———- ———-
N1 N11
N11 N111
N11 N112
N11 N113
N1 N12

And so on. In order to make sure that the tree is always a tree, you
need to protect one main condition: unique to values. Since a child row
can only have one parent in a tree, having a uniqueness constraint on
that column of the adjacency list ensures it is a tree.
The other thing you typically need to do is include a constraint of
some sort to make sure that the from value does not equal the to
value. This is the only cycle that the uniqueness constraint will not stop
(though a duplicated to and from value basically makes the row a root
and a leaf and would likely be discovered quickly…but one of my mottos
is that bad data doesn’t happen if you don’t let it occur at all).
While all tree structures require a single root, a table structure such
as this could contain multiple tree structures. In some cases, a row with
NULL, N1 could be included in the structure as the starting point
when you create the tree. You can make sure there is only one using a
unique index, which only allows one NULL value. (SQL Server treats a
NULL value as distinct in indexes, unlike in comparisons, so that would
make sure that you had only one root node.). You could allow greater
than one root node by using a filtered UNIQUE index that ignores NULL
values. If you want to make sure the NULL row is never deleted, a
trigger object can be used, which is especially useful if you have users
that can delete rows in an ad-hoc manner.
If you need to model multiple tree structures, it is possible to just
create multiple edge objects, each with a distinct purpose. For example,
consider a company reporting structure. There are multiple projects
going on where a person is in the project management hierarchy, and
typically there is a hierarchy for dealing with HR type things. So, you
could create

ManagementEdge (FromEmployee, ToEmployee)

And you could also create the same table again for every project.

Project1 (FromEmployee, ToEmployee)


Project2 (FromEmployee, ToEmployee)

Alternatively, you could model this as one structure that allows for
many trees to coincide in the same structure.

ReportingHierarchy (FromEmployee, ToEmployee,


HierarchyName)

All the indexes discussed for the general tree structures would still
make sense, but you would include the HierarchyName in the object
because the uniqueness stands only for one project if an employee can
be on multiple projects.
It might just make sense to have the ManagementEdge as
modeled, but then have the project hierarchy be in its own
ProjectManagementEdge since they serve different purposes.
Determining how to model your graph is pretty much the same
challenge as with any database: making the structures match your
requirements with the tightness to prevent bad data and the flexibility
to do what the customer wants to do.
Finally, note that you can implement variations of parent
cardinalities to implement strict types of trees. For example, a binary
or simple tree is defined as a tree where you can only have two
children for each node. Consider Figure 2-7.

Figure 2-7 Sample binary tree

One consideration you must have for creating a binary tree (or
really any limited cardinality of child row) is how to make sure a node
that violates the structure child is not created. There are a few methods
that work. Using triggers to count the number of nodes is one, as is
adding a node number and using a check constraint to only allow values
of 1 and 2, along with a unique index on the from item.
So

BinaryTree (FromNode, ToNode, NodeNumber (Values


IN 1, 2), UNIQUE (From, NodeNumber);

The downside is that you have this column that seems to indicate an
order to the nodes that is important. (In some systems you may desire
that ordering, perhaps to guide the user in a direction or to sort the
nodes.)
It can also be argued that some data integrity of this sort could be
deferred, and you simply check after changes have been made and fix
issues later, especially if your requirements get more complicated.
Regardless of how you make sure integrity is enforced, it needs to be
enforced.
Another important concept when working with trees is how
balanced the tree is. For example, consider Figure 2-8.

Figure 2-8 An unbalanced tree


When using a breadth-first algorithm, a very balanced, shallow
(that is, less hops from root to leaf nodes) structure is quicker to
process since you will have less iterations to go through. This can be
very important if you are making a tree to search with an index to some
data or just a fact of life if you are representing something in the real
world that is what it is.

Note In Chapter 6, I will introduce and demonstrate an alternative


method of implementing tree structures made possible by the rigid
nature of their structures.

Other Acyclic Graphs


While trees are straightforward enough to implement using a basic
adjacency list format (including making sure that the data actually fits
the strict requirements of only one parent and no cycles), other acyclic
graph types are not quite so simple because they are more flexible in
structure.
Common acyclic graph examples that we all generally encounter are
bills of materials, geographies, and classifications. Geographies are
useful in many ways. For example, you could model the world as the
root, then continent, region, and so on. Or perhaps country, then state,
province, and down to city or postal code.
One of the more universal examples of an acyclic graph that isn’t a
tree is that of a bill of materials. This data structure is a very simple,
straightforward example that we should all be able to visualize. A bill of
materials is a breakdown of all the pieces and parts that make up some
product. In Chapter 7, I will implement a bill of materials that contains
the parts of a fictional shelf product.
For example, when you buy a car, it is a single item you purchase.
But that car has many parts that make up that single unit of purchase.
For simplicity, let’s just start with the engine. The engine is a menagerie
of parts that contains other parts. And those parts are often made up of
other parts, generally right down to screws, washers, bolts, and nuts.
Many of the parts that make up that car are also sold individually as
well.
The car’s breakdown is, in and of itself, be a tree. But many of the
parts and assemblies can be in more than one vehicle type.
For a very simple example, consider a company that makes frames.
They have an 11-inch frame and a 10-inch frame, and they both use the
same hanging kit. See Figure 2-9.

Figure 2-9 Simple bill of materials

While items can have more than one predecessor in the graph (in
Figure 2-9, you can see that the Hanging Kit has two predecessors),
every starting node you pick can be treated as if it was the root node of
a tree. Start at the Hanging Kit, and you get a tree where the next level
nodes are Hanger and Nail Pack. The Nail Pack contains two Nails (in
your actual implementation, you will use a magnitude on the Nail Pack
to Nail edge to represent multiples. I will discuss more about edge
magnitudes in Chapter 3 because this is important to some designs).
Hence, when you traverse/process a bill of materials (or any acyclic
graph), you often can treat it like a tree when fetching the child rows,
not having to worry about cycles. When you load the bill of materials
structure, this is when you must make sure to not introduce a cycle.
Unlike trees where you can limit a node to exist in only one parent row
with an index, in this case you cannot protect against cycles with a
simple constraint.
Note that, depending on the tools you are using, the idea of treating
parts of a bill of materials like a tree may fall apart if you need to see
the entire structure due to how some graph code works. This will be
clearer in Chapters 3 and 7.
As you are adding nodes to a polyhierarchy, you need to do a query
to search for cycles. Like the example back in Figure 2-4 (repeated as
Figure 2-10), consider this graph before the edge between N3 and N1
was added.

Figure 2-10 Graph with a cycle

All would have been fine. But that new edge from N3 to N1 creates a
cycle. Finding the cycle condition will basically use the breadth-first
algorithm discussed previously, but in this case, your query is looking
for a match to the node where you start. So, for each iteration, you are
looking for FirstNodeId = CurrentNodeId; if found, then this is
no longer an acyclic graph (and you will have to take the appropriate
action, like rolling back the insert of that edge).
This can be done in a stored procedure or even a trigger if you want
to keep the cycle from happening at all. Of course, if you need optimum
performance, you might have to defer cycle checking (especially for
very large graphs), although this also has downsides if the data is also
actively queried.
As I go through the examples in the book, I will frequently use a
stored procedure to manage and query new nodes because rarely are
the user key values the internal values you use for surrogate keys.
Random documents with unrelated
content Scribd suggests to you:
Vraiment, voilà bien de la poudre perdue et bien noyée! à grande
eau!... C'est de la belle besogne! On ne regarde pas à l'eau, dans la
demeure du Lac! Si ça continue, tout le lac va entrer dans la cave...
Car, en vérité, on ne sait plus maintenant où elle va s'arrêter...
Nous voici sortis de la cave et l'eau monte toujours...
Et l'eau aussi sort de la cave, s'épand sur le plancher... Si cela
continue, toute la demeure du Lac va en être inondée. Le plancher
de la chambre des miroirs est lui-même un vrai petit lac dans lequel
nos pieds barbotent. C'est assez d'eau comme cela! Il faut qu'Erik
ferme le robinet: Erik! Erik! Il y a assez d'eau pour la poudre! Tourne
le robinet! Ferme le scorpion!
Mais Erik ne répond pas... On n'entend plus rien que l'eau qui
monte... nous en avons maintenant jusqu'à mi-jambe!...
—Christine! Christine! l'eau monte! monte jusqu'à nos genoux, crie
M. de Chagny.
Mais Christine ne répond pas... on n'entend plus rien que l'eau qui
monte.
Rien! rien! dans la chambre à côté... Plus personne! personne pour
tourner le robinet! personne pour fermer le scorpion!
Nous sommes tout seuls, dans le noir, avec l'eau noire qui nous
étreint, qui grimpe, qui nous glace! Erik! Erik! Christine! Christine!
Maintenant, nous avons perdu pied et nous tournons dans l'eau,
emportés dans un mouvement de rotation irrésistible, car l'eau
tourne avec nous et nous nous heurtons aux miroirs noirs qui nous
repoussent... et nos gorges soulevées au-dessus du tourbillon
hurlent...
Est-ce que nous allons mourir ici? noyés dans la chambre des
supplices?... Je n'ai jamais vu ça? Erik, au temps des Heures Roses
de Mazenderan, ne m'a jamais montré cela par la petite fenêtre
invisible!... Erik! Erik! Je t'ai sauvé la vie! Souviens-toi!... Tu étais
condamné!... Tu allais mourir!... Je t'ai ouvert les portes de la vie!...
Erik!...
Ah! nous tournons dans l'eau comme des épaves!...
Mais j'ai saisi tout à coup de mes mains égarées le tronc de l'arbre
de fer!... et j'appelle M. de Chagny... et nous voilà tous les deux
suspendus à la branche de l'arbre de fer...
Et l'eau monte toujours!
Ah! ah! rappelez-vous! Combien y a-t-il d'espace entre la branche de
l'arbre de fer et le plafond en coupole de la chambre des miroirs?...
Tâchez à vous souvenir!... Après tout, l'eau va peut-être s'arrêter...
elle trouvera sûrement son niveau... Tenez! il me semble qu'elle
s'arrête!... Non! non! horreur!... À la nage! À la nage!... nos bras qui
nagent s'enlacent; nous étouffons!... nous nous battons dans l'eau
noire!... nous avons déjà peine à respirer l'air noir au-dessus de l'eau
noire... l'air qui fuit, que nous entendons fuir au-dessus de nos têtes
par je ne sais quel appareil de ventilation... Ah! tournons! tournons!
tournons jusqu'à ce que nous ayons trouvé la bouche d'air... nous
collerons notre bouche à la bouche d'air... Mais les forces
m'abandonnent, j'essaie de me raccrocher aux murs! Ah! comme les
parois de glace sont glissantes à mes doigts qui cherchent... Nous
tournons encore!... Nous enfonçons... Un dernier effort!... Un dernier
cri!... Erik!... Christine!... glou, glou, glou!... dans les oreilles!... glou,
glou, glou!... au fond de l'eau noire, nos oreilles font glou-glou!... Et
il me semble encore, avant de perdre tout à fait connaissance,
entendre entre deux glouglous... «Tonneaux!... tonneaux!... Avez-
vous des tonneaux à vendre?»

XXVII

LA FIN DES AMOURS DU FANTOME

C'est ici que se termine le récit écrit que m'a laissé le Persan.
Malgré l'horreur d'une situation qui semblait définitivement les vouer
à la mort, M. de Chagny et son compagnon furent sauvés par le
dévouement sublime de Christine Daaé. Et je tiens tout le reste de
l'aventure de la bouche du daroga lui-même.
Quand j'allai le voir, il habitait toujours son petit appartement de la
rue de Rivoli, en face des Tuileries. Il était bien malade et il ne fallait
rien moins que toute mon ardeur de reporter-historien au service de
la vérité pour le décider à revivre avec moi l'incroyable drame. C'était
toujours son vieux et fidèle domestique Darius qui le servait et me
conduisait auprès de lui. Le daroga me recevait au coin de la fenêtre
qui regarde le jardin, assis dans un vaste fauteuil où il essayait de
redresser un torse qui n'avait pas dû être sans beauté. Notre Persan
avait encore ses yeux magnifiques, mais son pauvre visage était bien
fatigué. Il avait fait raser entièrement sa tête qu'il couvrait à
l'ordinaire d'un bonnet d'astrakan; il était habillé d'une vaste
houppelande très simple dans les manches de laquelle il s'amusait
inconsciemment à tourner les pouces, mais son esprit était resté fort
lucide.
Il ne pouvait se rappeler les affres anciennes sans être repris d'une
certaine fièvre et c'est par bribes que je lui arrachai la fin
surprenante de cette étrange histoire. Parfois, il se faisait prier
longtemps pour répondre à mes questions, et parfois exalté par ses
souvenirs il évoquait spontanément devant moi, avec un relief
saisissant, l'image effroyable d'Erik et les terribles heures que M. de
Chagny et lui avaient vécues dans la demeure du Lac.
Il fallait voir le frémissement qui l'agitait quand il me dépeignait son
réveil dans la pénombre inquiétante de la chambre Louis-Philippe...
après le drame des eaux... Et voici la fin de cette terrible histoire,
telle qu'il me l'a racontée de façon à compléter le récit écrit qu'il
avait bien voulu me confier:
En ouvrant les yeux, le daroga s'était vu étendu sur un lit... M. de
Chagny était couché sur un canapé, à côté de l'armoire à glace. Un
ange et un démon veillaient sur eux...
Après les mirages et illusions de la chambre des supplices, la
précision des détails bourgeois de cette petite pièce tranquille,
semblait avoir été encore inventée dans le dessein de dérouter
l'esprit du mortel assez téméraire pour s'égarer dans ce domaine du
cauchemar vivant. Ce lit-bateau, ces chaises d'acajou ciré, cette
commode et ces cuivres, le soin avec lequel ces petits carrés de
dentelle au crochet étaient placés sur le dos des fauteuils, la pendule
et de chaque côté de la cheminée les petits coffrets à l'apparence si
inoffensive... enfin, cette étagère garnie de coquillages, de pelotes
rouges pour les épingles, de bateaux en nacre et d'un énorme œuf
d'autruche... le tout éclairé discrètement par une lampe à abat-jour
posée sur un guéridon... tout ce mobilier qui était d'une laideur
ménagère touchante, si paisible, si raisonnable «au fond des caves
de l'Opéra», déconcertait l'imagination plus que toutes les
fantasmagories passées.
Et l'ombre de l'homme au masque, dans ce petit cadre vieillot, précis
et propret, n'en apparaissait que plus formidable. Elle se courba
jusqu'à l'oreille du Persan et lui dit à voix basse:
—Ça va mieux, daroga?... Tu regardes mon mobilier?... C'est tout ce
qui me reste de ma pauvre misérable mère...
Il lui dit encore des choses qu'il ne se rappelait plus; mais—et cela
lui paraissait bien singulier—le Persan avait le souvenir précis que,
pendant cette vision surannée de la chambre Louis-Philippe, seul
Erik parlait. Christine Daaé ne disait pas un mot; elle se déplaçait
sans bruit et comme une Sœur de charité qui aurait fait vœu de
silence... Elle apportait dans une tasse un cordial... ou du thé
fumant... L'homme au masque la lui prenait des mains et la tendait
au Persan.
Quant à M. de Chagny, il dormait...
Erik dit en versant un peu de rhum dans la tasse du daroga et en lui
montrant le vicomte étendu:
—Il est revenu à lui bien avant que nous puissions savoir si vous
seriez encore vivant un jour, daroga. Il va très bien... Il dort... Il ne
faut pas le réveiller...
Un instant, Erik quitta la chambre et le Persan, se soulevant sur son
coude, regarda autour de lui... Il aperçut, assise au coin de la
cheminée, la silhouette blanche de Christine Daaé. Il lui adressa la
parole... il l'appela... mais il était encore très faible et il retomba sur
l'oreiller... Christine vint à lui, lui posa la main sur le front, puis
s'éloigna... Et le Persan se rappela qu'alors, en s'en allant, elle n'eut
pas un regard pour M. de Chagny qui, à côté, il est vrai, bien
tranquillement dormait... et elle retourna s'asseoir dans son fauteuil,
au coin de la cheminée, silencieuse comme une Sœur de charité qui
a fait vœu de silence...
Erik revint avec de petits flacons qu'il déposa sur la cheminée. Et
tout bas encore, pour ne pas éveiller M. de Chagny, il dit au Persan,
après s'être assis à son chevet et lui avoir tâté le pouls:
—Maintenant, vous êtes sauvés tous les deux. Et je vais tantôt vous
reconduire sur le dessus de la terre, pour faire plaisir à ma femme.
Sur quoi il se leva, sans autre explication, et disparut encore.
Le Persan regardait maintenant le profil tranquille de Christine Daaé
sous la lampe. Elle lisait dans un tout petit livre à tranche dorée
comme on en voit aux livres religieux. L'Imitation a de ces éditions-
là. Et le Persan avait encore dans l'oreille le ton naturel avec lequel
l'autre avait dit: «Pour faire plaisir à ma femme...»
Tout doucement, le daroga appela encore, mais Christine devait lire
très loin, car elle n'entendit pas...
Erik revint... fit boire au daroga une potion, après lui avoir
recommandé de ne plus adresser une parole à «sa femme» ni à
personne, parce que cela pouvait être très dangereux pour la santé
de tout le monde.
À partir de ce moment, le Persan se souvient encore de l'ombre
noire d'Erik et de la silhouette blanche de Christine qui glissaient
toujours en silence à travers la chambre, se penchaient au-dessus de
lui et au-dessus de M. de Chagny. Le Persan était encore très faible
et le moindre bruit, la porte de l'armoire à glace qui s'ouvrait en
grinçant, par exemple, lui faisait mal à la tête... et puis il s'endormit
comme M. de Chagny.
Cette fois, il ne devait plus se réveiller que chez lui, soigné par son
fidèle Darius, qui lui apprit qu'on l'avait, la nuit précédente, trouvé
contre la porte de son appartement, où il avait dû être transporté
par un inconnu, lequel avait eu soin de sonner avant de s'éloigner.
Aussitôt que le daroga eut recouvré ses forces et sa responsabilité, il
envoya demander des nouvelles du vicomte au domicile du comte
Philippe.
Il lui fut répondu que le jeune homme n'avait pas reparu et que le
comte Philippe était mort. On avait trouvé son cadavre sur la berge
du Lac de l'Opéra, du côté de la rue Scribe. Le Persan se rappela la
messe funèbre à laquelle il avait assisté derrière le mur de la
chambre des miroirs et il ne douta plus du crime ni du criminel. Sans
peine, hélas! connaissant Erik, il reconstitua le drame. Après avoir
cru que son frère avait enlevé Christine Daaé, Philippe s'était
précipité à sa poursuite sur cette route de Bruxelles, où il savait que
tout était préparé pour une telle aventure. N'y ayant point rencontré
les jeunes gens, il était revenu à l'Opéra, s'était rappelé les étranges
confidences de Raoul sur son fantastique rival, avait appris que le
vicomte avait tout tenté pour pénétrer dans les dessous du théâtre
et enfin qu'il avait disparu, laissant son chapeau dans la loge de la
diva, à côté d'une boîte de pistolets. Et le comte, qui ne doutait plus
de la folie de son frère, s'était à son tour lancé dans cet infernal
labyrinthe souterrain. En fallait-il davantage, aux yeux du Persan,
pour que l'on retrouvât le cadavre du comte sur la berge du Lac, où
veillait le chant de la sirène, la sirène d'Erik, cette concierge du Lac
des Morts?
Aussi le Persan n'hésita pas. Épouvanté de ce nouveau forfait, ne
pouvant rester dans l'incertitude où il se trouvait relativement au
sort définitif du vicomte et de Christine Daaé, il se décida à tout dire
à la justice.
Or l'instruction de l'affaire avait été confiée à M. le juge Faure et
c'est chez lui qu'il s'en alla frapper. On se doute de quelle sorte un
esprit sceptique, terre à terre, superficiel (je le dis comme je le
pense) et nullement préparé à une telle confidence, reçut la
déposition du daroga. Celui-ci fut traité comme un fou.
Le Persan, désespérant de se faire jamais entendre, s'était mis alors
à écrire. Puisque la justice ne voulait pas de son témoignage, la
presse s'en emparerait peut-être, et il venait un soir de tracer la
dernière ligne du récit que j'ai fidèlement rapporté ici quand son
domestique Darius lui annonça un étranger qui n'avait point dit son
nom, dont il était impossible de voir le visage et qui avait déclaré
simplement qu'il ne quitterait la place qu'après avoir parlé au
daroga.
Le Persan, pressentant immédiatement la personnalité de ce
singulier visiteur, ordonna qu'on l'introduisît sur-le-champ.
Le daroga ne s'était pas trompé.
C'était le Fantôme! C'était Erik!
Il paraissait d'une faiblesse extrême et se retenait au mur comme s'il
craignait de tomber... Ayant enlevé son chapeau, il montra un front
d'une pâleur de cire. Le reste du visage était caché par le masque.
Le Persan s'était dressé devant lui.
—Assassin du comte Philippe, qu'as-tu fait de son frère et de
Christine Daaé?
À cette apostrophe formidable, Erik chancela et garda un instant le
silence, puis, s'étant traîné jusqu'à un fauteuil, il s'y laissa tomber en
poussant un profond soupir. Et là, il dit à petites phrases, à petits
mots, à court souffle:
—Daroga, ne me parle pas du comte Philippe... Il était mort... déjà...
quand je suis sorti de ma maison... il était mort... déjà... quand... la
sirène a chanté... c'est un accident... un triste... un...
lamentablement triste... accident... Il était tombé bien
maladroitement et simplement et naturellement dans le Lac!...
—Tu mens! s'écria le Persan.
Alors Erik courba la tête et dit:
—Je ne viens pas ici... pour te parler du comte Philippe... mais pour
te dire que... je vais mourir...
—Où sont Raoul de Chagny et Christine Daaé?...
—Je vais mourir.
—Raoul de Chagny et Christine Daaé?
—... d'amour... daroga... je vais mourir d'amour... c'est comme cela...
je l'aimais tant!... Et je l'aime encore, daroga, puisque j'en meurs, je
te dis... Si tu savais comme elle était belle quand elle m'a permis de
l'embrasser vivante, sur son salut éternel... C'était la première fois,
daroga, la première fois, tu entends, que j'embrassais une femme...
Oui, vivante, je l'ai embrassée vivante et elle était belle comme une
morte?...
Le Persan s'était levé et il avait osé toucher Erik. Il lui secoua le
bras.
—Me diras-tu enfin si elle est morte ou vivante?...
—Pourquoi me secoues-tu ainsi? répondit, Erik avec effort... Je te dis
que c'est moi qui vais mourir... oui, je l'ai embrassée vivante...
—Et maintenant, elle est morte?
—Je te dis que je l'ai embrassée comme ça sur le front... et elle n'a
point retiré son front de ma bouche!... Ah! c'est une honnête fille!
Quant à être morte, je ne le pense pas, bien que cela ne me regarde
plus... Non! non! elle n'est pas morte! Et il ne faudrait pas que
j'apprenne que quelqu'un a touché un cheveu de sa tête! C'est une
brave et honnête fille qui t'a sauvé la vie, par-dessus le marché,
daroga, dans un moment où je n'aurais pas donné deux sous de ta
peau de Persan. Au fond, personne ne s'occupait de toi. Pourquoi
étais-tu là avec ce petit jeune homme? Tu allais mourir par-dessus le
marché! Ma parole, elle me suppliait pour son petit jeune homme,
mais je lui avais répondu que, puisqu'elle avait tourné le scorpion,
j'étais devenu par cela même, et de sa bonne volonté, son fiancé et
qu'elle n'avait pas besoin de deux fiancés, ce qui était assez juste;
quant à toi, tu n'existais pas, tu n'existais déjà plus, je te le répète,
et tu allais mourir avec l'autre fiancé!
Seulement, écoute bien, daroga, comme vous criiez comme des
possédés à cause de l'eau, Christine est venue à moi, ses beaux
grands yeux bleus ouverts et elle m'a juré, sur son salut éternel,
qu'elle consentait à être ma femme vivante! Jusqu'alors, dans le
fond de ses yeux, daroga, j'avais toujours vu ma femme morte;
c'était la première fois que j'y voyais ma femme vivante. Elle était
sincère, sur son salut éternel. Elle ne se tuerait point. Marché conclu.
Une demi-minute plus tard, toutes les eaux étaient retournées au
Lac, et je tirais ta langue, daroga, car j'ai bien cru, ma parole, que tu
y resterais!... Enfin!... Voilà! C'était entendu! je devais vous reporter
chez vous sur le dessus de la terre. Enfin, quand vous m'avez eu
débarrassé le plancher de la chambre Louis-Philippe, j'y suis revenu,
moi, tout seul.
—Qu'avais-tu fait du vicomte de Chagny? interrompit le Persan.
—Ah! tu comprends... celui-là, daroga, je n'allais pas comme ça le
reporter tout de suite sur le dessus de la terre... C'était un otage...
Mais je ne pouvais pas non plus le conserver dans la demeure du
lac, à cause de Christine; alors je l'ai enfermé bien confortablement,
je l'ai enchaîné proprement (le parfum de Mazenderan l'avait rendu
mou comme une chiffe) dans le caveau des communards qui est
dans la partie la plus déserte de la plus lointaine cave de l'Opéra,
plus bas que le cinquième dessous, là où personne ne va jamais et
d'où l'on ne peut se faire entendre de personne. J'étais bien
tranquille et je suis revenu auprès de Christine. Elle m'attendait...
À cet endroit de son récit, il paraît que le Fantôme se leva si
solennellement que le Persan qui avait repris sa place dans son
fauteuil dut se lever, lui aussi, comme obéissant au même
mouvement et sentant qu'il était impossible de rester assis dans un
moment aussi solennel et même (m'a dit le Persan lui-même) il ôta,
bien qu'il eût la tête rase, son bonnet d'astrakan.
—Oui! Elle m'attendait, reprit Erik, qui se prit à trembler comme une
feuille, mais à trembler d'une vraie émotion solennelle... elle
m'attendait toute droite, vivante, comme une vraie fiancée vivante,
sur son salut éternel... Et quand je me suis avancé, plus timide qu'un
petit enfant, elle ne s'est point sauvée... non, non... elle est restée...
elle m'a attendu... je crois bien même, daroga, qu'elle a un peu...
oh! pas beaucoup... mais un peu, comme une fiancée vivante, tendu
son front... Et... et... je l'ai... embrassée!... Moi!... moi!... moi!... Et
elle n'est pas morte!... Et elle est restée tout naturellement à côté de
moi, après que je l'ai eu embrassée, comme ça... sur le front... Ab!
que c'est bon, daroga, d'embrasser quelqu'un!... Tu ne peux pas
savoir, toi!... Mais moi! moi!... Ma mère, daroga, ma pauvre
misérable mère n'a jamais voulu que je l'embrasse... Elle se
sauvait... en me jetant mon masque!... ni aucune femme!...
jamais!... jamais!... Ah! ah! ah! Alors, n'est-ce pas?... d'un pareil
bonheur, n'est-ce pas, j'ai pleuré. Et je suis tombé en pleurant à ses
pieds... et j'ai embrassé ses pieds... ses petits pieds, en pleurant...
Toi aussi tu pleures, daroga; et elle aussi pleurait... l'ange a
pleuré!...
Comme il racontait ces choses, Erik sanglotait et le Persan, en effet,
n'avait pu retenir ses larmes devant cet homme masqué qui, les
épaules secouées, les mains à la poitrine, tantôt râlait de douleur et
tantôt d'attendrissement.
—... Oh! daroga, j'ai senti ses larmes couler sur mon front à moi! à
moi! à moi! Elles étaient chaudes... elles étaient douces! elles
allaient partout sous mon masque, ses larmes! elles allaient se mêler
à mes larmes dans mes yeux!... elles coulaient jusque dans ma
bouche... Ah! ses larmes à elle, sur moi! Écoute, daroga, écoute, ce
que j'ai fait... J'ai arraché mon masque pour ne pas perdre une seule
de ses larmes... Et elle ne s'est pas enfuie!... Et elle n'est pas morte!
Elle est restée vivante, à pleurer... sur moi... avec moi... Nous avons
pleuré ensemble!... Seigneur du ciel! vous m'avez donné tout le
bonheur du monde!...
Et Erik s'était effondré, râlant sur le fauteuil.
—Ah! Je ne vais pas encore mourir... tout de suite... mais laisse-moi
pleurer! avait-il dit au Persan.
Au bout d'un instant, l'Homme au masque avait repris:
—Écoute, daroga... écoute bien cela... pendant que j'étais à ses
pieds ...j'ai entendu qu'elle disait, «Pauvre malheureux Erik!» et elle
a pris ma main!... Moi, je n'ai plus été, tu comprends, qu'un pauvre
chien prêt à mourir pour elle... comme je te le dis, daroga!
«Figure-toi que j'avais dans la main un anneau, un anneau d'or que
je lui avais donné... qu'elle avait perdu... et que j'ai retrouvé... une
alliance, quoi!... Je le lui ai glissé dans sa petite main et je lui ai dit:
Tiens!... prends ça!... prends ça pour toi... et pour lui... Ce sera mon
cadeau de noces... le cadeau du pauvre malheureux Erik... Je sais
que tu l'aimes, le jeune homme... ne pleure plus!... Elle m'a
demandé, d'une voix bien douce, ce que je voulais dire; alors, je lui
ai fait comprendre, et elle a compris tout de suite que je n'étais pour
elle qu'un pauvre chien prêt à mourir... mais qu'elle, elle pourrait se
marier avec le jeune homme quand elle voudrait, parce qu'elle avait
pleuré avec moi... Ah! daroga... tu penses... que... lorsque je lui
disais cela, c'était comme si je découpais bien tranquillement mon
cœur en quatre, mais elle avait pleuré avec moi... et elle avait dit:
«Pauvre malheureux Erik!...»
L'émotion d'Erik était telle qu'il dut avertir le Persan de ne point le
regarder, car il étouffait et il était dans la nécessité d'ôter son
masque. À ce propos le daroga m'a raconté qu'il était allé lui-même
à la fenêtre et qu'il l'avait ouverte le cœur soulevé de pitié, mais en
prenant grand soin de fixer la cime des arbres du jardin des Tuileries
pour ne point rencontrer le visage du monstre.
—Je suis allé, avait continué Erik, délivrer le jeune homme et je lui ai
dit de me suivre auprès de Christine... Ils se sont embrassés devant
moi dans la chambre Louis-Philippe... Christine avait mon anneau...
J'ai fait jurer à Christine que lorsque je serais mort elle viendrait une
nuit, en passant par le Lac de la rue Scribe, m'enterrer en grand
secret avec l'anneau d'or qu'elle aurait porté jusqu'à cette minute-
là... je lui ai dit comment elle trouverait mon corps et ce qu'il fallait
en faire... Alors, Christine m'a embrassé pour la première fois, à son
tour, là, sur le front... (ne regarde pas, daroga!) là, sur le front... sur
mon front à moi!... (ne regarde pas, daroga!) et ils sont partis tous
les deux... Christine ne pleurait plus..., moi seul, je pleurais...
daroga, daroga... si Christine tient son serment, elle reviendra
bientôt!...
Et Erik s'était tu. Le Persan ne lui avait plus posé aucune question. Il
était rassuré tout à fait sur le sort de Raoul de Chagny et de
Christine Daaé, et aucun de ceux de la race humaine n'aurait pu,
après l'avoir entendue cette nuit-là, mettre en doute la parole d'Erik
qui pleurait.
Le monstre avait remis son masque et rassemblé ses forces pour
quitter le daroga. Il lui avait annoncé que, lorsqu'il sentirait sa fin
très prochaine, il lui enverrait, pour le remercier du bien que celui-ci
lui avait voulu autrefois, ce qu'il avait de plus cher au monde: tous
les papiers de Christine Daaé, qu'elle avait écrits dans le moment
même de cette aventure à l'intention de Raoul, et qu'elle avait
laissés à Erik, et quelques objets qui lui venaient d'elle, deux
mouchoirs, une paire de gants et un nœud de soulier. Sur une
question du Persan, Erik lui apprit que les deux jeunes gens aussitôt
qu'ils s'étaient vus libres, avaient résolu d'aller chercher un prêtre au
fond de quelque solitude où ils cacheraient leur bonheur et qu'ils
avaient pris, dans ce dessein, «la gare du Nord du; Monde». Enfin
Erik comptait sur le Persan pour, aussitôt que celui-ci aurait reçu les
reliques et les papiers promis, il annonçât sa mort aux deux jeunes
gens. Il devrait pour cela payer une ligne aux annonces
nécrologiques du journal l'Époque.
C'était tout.
Le Persan avait reconduit Erik jusqu'à la porte de son appartement
et Darius l'avait accompagné jusque sur le trottoir, en le soutenant.
Un fiacre attendait. Erik y monta. Le Persan, qui était revenu à la
fenêtre, l'entendit dire au cocher: «Terre-plein de l'Opéra».
Et puis, le fiacre s'était enfoncé dans la nuit. Le Persan avait, pour la
dernière fois, vu le pauvre malheureux Erik.
Trois semaines plus tard, le journal l'Époque avait publié cette
annonce nécrologique:
«ERIK EST MORT.»

ÉPILOGUE

Telle est la véridique histoire du Fantôme de l'Opéra. Comme je


l'annonçais au début de cet ouvrage, on ne saurait douter
maintenant qu'Erik ait réellement vécu. Trop de preuves de cette
existence sont mises aujourd'hui à la portée de chacun pour qu'on
ne puisse suivre, raisonnablement, les faits et les gestes d'Erik à
travers tout le drame des Chagny.
Il n'est point besoin de répéter ici combien cette affaire passionna la
capitale. Cette artiste enlevée, le comte de Chagny mort dans des
conditions si exceptionnelles, son frère disparu et le triple sommeil
des employés de l'éclairage à l'Opéra!... Quels drames! quelles
passions! quels crimes s'étaient déroulés autour de l'idylle de Raoul
et de la douce et charmante Christine!... Qu'était devenue la sublime
et mystérieuse cantatrice dont la terre ne devait plus jamais, jamais
entendre parler?... On la représenta comme la victime de la rivalité
des deux frères, et nul n'imagina ce qui s'était passé; nul ne comprit
que puisque Raoul et Christine avaient disparu tous deux, les deux
fiancés s'étaient retirés loin du monde pour goûter un bonheur qu'ils
n'eussent point voulu public après la mort inexpliquée du comte
Philippe... Ils avaient pris un jour un train à la gare du Nord du
Monde... Moi aussi, peut-être, un jour, je prendrai le train à cette
gare-là et j'irai chercher autour de tes lacs, ô Norvège! ô silencieuse
Scandinavie! les traces peut-être encore vivantes de Raoul et de
Christine, et aussi de la maman Valérius, qui disparut également
dans le même temps!... Peut-être un jour, entendrai-je de mes
oreilles l'Écho solitaire du Nord du Monde, répéter le chant de celle
qui a connu l'Ange de la Musique?...
Bien après que l'affaire, par les soins inintelligents de M. le juge
d'instruction Faure, fut classée, la presse, de temps à autre,
cherchait encore à pénétrer le mystère... et continuait à se
demander où était la main monstrueuse qui avait préparé et exécuté
tant d'inouïes catastrophes! (Crime et disparition.)
Un journal du boulevard, qui était au courant de tous les potins de
coulisses, avait été le seul à écrire:
—Cette main est celle du Fantôme de l'Opéra.
Et encore il l'avait fait naturellement sur le mode ironique.
Seul le Persan qu'on n'avait pas voulu entendre et qui ne renouvela
point, après la visite d'Erik, sa première tentative auprès de la
Justice, possédait toute la vérité.
Et il en détenait les preuves principales qui lui étaient venues avec
les pieuses reliques annoncées par le Fantôme...
Ces preuves, il m'appartenait de les compléter, avec l'aide du daroga
lui-même. Je le mettais au jour le jour, au courant de mes
recherches et il les guidait. Depuis des années et des années il
n'était point retourné à l'Opéra, mais il avait conservé du monument
le souvenir le plus précis et il n'était point de meilleur guide pour
m'en faire découvrir les coins les plus cachés. C'est encore lui qui
m'indiquait les sources où je pouvais puiser, les personnages à
interroger; c'est lui qui me poussa à frapper à la porte de M. Poligny,
dans le moment que le pauvre homme était quasi à l'agonie. Je ne le
savais point si bas et je n'oublierai jamais l'effet que produisirent sur
lui mes questions relatives au fantôme. Il me regarda, comme s'il
voyait le diable et ne me répondit que par quelques phrases sans
suite, mais qui attestaient (c'était là l'essentiel) combien F. de l'O.
avait, dans son temps, jeté la perturbation dans cette vie déjà très
agitée (M. Poligny était ce que l'on est convenu d'appeler un viveur).
Quand je rapportai au Persan le mince résultat de ma visite à M.
Poligny, le daroga eut un vague sourire et me dit: «Jamais Poligny
n'a su combien cette extraordinaire crapule d'Erik (tantôt le Persan
parlait d'Erik comme d'un dieu, tantôt comme d'une vile canaille) l'a
fait «marcher». Poligny était superstitieux et Erik le savait. Erik
savait aussi beaucoup de choses sur les affaires publiques et privées
de l'Opéra.
Quand M. Poligny entendit une voix mystérieuse lui raconter, dans la
loge n° 5, l'emploi qu'il faisait de son temps et de la confiance de
son associé, il ne demanda pas son reste. Frappé d'abord comme
par une voix du ciel, il se crut damné, et puis, comme la voix lui
demandait de l'argent, il vit bien à la fin qu'il était joué par un maître
chanteur dont Debienne lui-même fut victime. Tous deux, las déjà de
leur direction pour de nombreuses raisons, s'en allèrent, sans
essayer de connaître plus à fond la personnalité de cet étrange F. de
l'O., qui leur avait fait parvenir un si singulier cahier des charges. Ils
léguèrent tout le mystère à la direction suivante en poussant un gros
soupir de satisfaction, bien débarrassés d'une histoire qui les avait
fort intrigués sans les faire rire ni l'un ni l'autre.
Ainsi s'exprima le Persan sur le compte de MM. Debienne et Poligny.
À ce propos, je lui parlai de leurs successeurs et je m'étonnai que
dans les Mémoires d'un Directeur, de M. Moncharmin, on parlât
d'une façon si complète des faits et gestes de F. de l'O. dans la
première partie, pour en arriver à ne plus rien en dire ou à peu près
dans la seconde. À quoi le Persan, qui connaissait ces Mémoires
comme s'il les avait écrits, me fit observer que je trouverais
l'explication de toute l'affaire si je prenais la peine de réfléchir aux
quelques lignes que, dans la seconde partie précisément de ces
Mémoires, Moncharmin a bien voulu consacrer encore au Fantôme.
Voici ces lignes, qui nous intéressent, du reste, tout particulièrement,
puisqu'on y trouve relatée la manière fort simple dont se termina la
fameuse histoire des vingt mille francs:
«À propos de F. de l'O. (c'est M. Moncharmin qui parle), dont j'ai
narré ici même, au commencement de mes Mémoires, quelques-
unes des singulières fantaisies, je ne veux plus dire qu'une chose,
c'est qu'il racheta par un beau geste tous les tracas qu'il avait causés
à mon cher collaborateur et, je dois bien l'avouer, à moi-même. Il
jugea sans doute qu'il y avait des limites à toute plaisanterie, surtout
quand elle coûte aussi cher et quand le commissaire de police est
«saisi», car, à la minute même où nous avions donné rendez-vous
dans notre cabinet à M. Mifroid pour lui conter toute l'histoire,
quelques jours après la disparition de Christine Daaé, nous
trouvâmes sur le bureau de Richard, dans une belle enveloppe sur
laquelle on lisait à l'encre rouge: De la part de F. de l'O., les sommes
assez importantes qu'il avait réussi à faire sortir momentanément, et
dans une manière de jeu, de la caisse directoriale. Richard fut
aussitôt d'avis qu'on devait s'en tenir là et ne point pousser l'affaire.
Je consentis à être de l'avis de Richard. Et tout est bien qui finit
bien. N'est-ce pas, mon cher F. de l'O.?»
Évidemment, Moncharmin, surtout après cette restitution, continuait
à croire qu'il avait été un moment le jouet de l'imagination burlesque
de Richard, comme, de son côté, Richard ne cessa point de croire
que Moncharmin s'était, pour se venger de quelques plaisanteries,
amusé à inventer toute l'affaire du F. de l'O.
N'était-ce point le moment de demander au Persan de m'apprendre
par quel artifice le Fantôme faisait disparaître vingt mille francs dans
la poche de Richard, malgré l'épingle de nourrice. Il me répondit qu'il
n'avait point approfondi ce léger détail, mais que, si je voulais bien
«travailler» sur les lieux moi-même, je devais certainement trouver
la clef de l'énigme dans le bureau directorial lui-même, en me
souvenant qu'Erik n'avait pas été surnommé pour rien l'amateur de
trappes. Et je promis au Persan de me livrer, aussitôt que j'en aurais
le temps, à d'utiles investigations de ce côté. Je dirai tout de suite au
lecteur que les résultats de ces investigations furent parfaitement
satisfaisants. Je ne croyais point, en vérité, découvrir tant de
preuves indéniables de l'authenticité des phénomènes attribués au
Fantôme.
Et il est bon que l'on sache que les papiers du Persan, ceux de
Christine Daaé, les déclarations qui me furent faites par les anciens
collaborateurs de MM. Richard et Moncharmin et par la petite Meg
elle-même (cette excellente madame Giry étant, hélas! trépassée) et
par la Sorelli, qui est retraitée maintenant à Louveciennes—il est
bon, dis-je, que l'on sache que tout cela, qui constitue les pièces
documentaires de l'existence du Fantôme, pièces que je vais déposer
aux archives de l'Opéra, se trouve contrôlé par plusieurs découvertes
importantes dont je puis tirer justement quelque fierté.
Si je n'ai pu retrouver la demeure du Lac, Erik en ayant
définitivement condamné toutes les entrées secrètes (et encore je
suis sûr qu'il serait facile d'y pénétrer si l'on procédait au
dessèchement du Lac, comme je l'ai plusieurs fois demandé à
l'administration des beaux-arts)[12], je n'en ai pas moins découvert
le couloir secret des communards, dont la paroi de planches tombe
par endroits en ruines; et, de même, j'ai mis à jour la trappe par
laquelle le Persan et Raoul descendirent dans les dessous du théâtre.
J'ai relevé, dans le cachot des communards, beaucoup d'initiales
tracées sur les murs par les malheureux qui furent enfermés là et,
parmi ces initiales, un R et un C.—R C? Ceci n'est-il point significatif?
Raoul de Chagny! Les lettres sont encore aujourd'hui très visibles. Je
ne me suis pas, bien entendu, arrêté là. Dans le premier et le
troisième dessous, j'ai fait jouer deux frappes d'un système pivotant,
tout à fait inconnues aux machinistes, qui n'usent que de trappes à
glissade horizontale.
Enfin, je puis dire, en toute connaissance de cause, au lecteur:
«Visitez un jour l'Opéra, demandez à vous y promener en paix sans
cicérone stupide, entrez dans la loge n° 5 et frappez sur l'énorme
colonne qui sépare cette loge de l'avant-scène; frappez avec votre
canne ou avec votre poing et écoutez... jusqu'à hauteur de votre
tête: la colonne sonne le creux! Et après cela, ne vous étonnez point
qu'elle ait pu être habitée par la voix du Fantôme; il y a, dans cette
colonne, de la place pour deux hommes. Que si vous vous étonnez
que lors des phénomènes de la loge n°5 nul ne se soit retourné vers
cette colonne, n'oubliez pas qu'elle offre l'aspect du marbre massif et
que la voix qui était enfermée semblait plutôt venir du côté opposé
(car la voix du fantôme ventriloque venait d'où il voulait). La colonne
est travaillée, sculptée, fouillée et trifouillée par le ciseau de l'artiste.
Je ne désespère pas de découvrir un jour le morceau de sculpture
qui devait s'abaisser et se relever à volonté, pour laisser un libre et
mystérieux passage à la correspondance du Fantôme avec Mme Giry
et à ses générosités. Certes, tout cela, que j'ai vu, senti, palpé, n'est
rien à côté de ce qu'en réalité un être énorme et fabuleux comme
Erik a dû créer dans le mystère d'un monument comme celui de
l'Opéra, mais je donnerais toutes ces découvertes pour celle qu'il m'a
été donné de faire, devant l'administrateur lui-même, dans le bureau
du directeur, à quelques centimètres du fauteuil: une trappe, de la
largeur de la lame du parquet, de la longueur d'un avant-bras, pas
plus... une trappe qui se rabat comme le couvercle d'un coffret, une
trappe par où je vois sortir une main qui travaille avec dextérité dans
le pan d'un habit à queue-de-morue qui traîne...
C'est par là qu'étaient partis les quarante mille francs!... C'était aussi
par là que, grâce à quelque truchement, ils étaient revenus...
Quand j'en parlai avec une émotion bien compréhensible au Persan,
je lui dis:
—Erik s'amusait donc simplement—puisque les quarante mille francs
sont revenus—à faire le facétieux avec son cahier des charges?...
Il me répondit:
—Ne le croyez point!... Erik avait besoin d'argent.. Se croyant hors
de l'humanité, il n'était point gêné par le scrupule et il se servait des
dons extraordinaires d'adresse et d'imagination qu'il avait reçus de la
nature en compensation de l'atroce laideur dont elle l'avait doté,
pour exploiter les humains, et cela quelquefois de la façon la plus
artistique du monde, car le tour valait souvent son pesant d'or. S'il a
rendu les quarante mille francs, de son propre mouvement, à MM.
Richard et Moncharmin, c'est qu'au moment de la restitution il n'en
avait plus besoin! Il avait renoncé à son mariage avec Christine
Daaé. Il avait renoncé à toutes les choses du dessus de la terre.
D'après le Persan, Erik était originaire d'une petite ville aux environs
de Rouen. C'était le fils d'un entrepreneur de maçonnerie. Il avait fui
de bonne heure le domicile paternel, où sa laideur était un objet
d'horreur et d'épouvante pour ses parents. Quelque temps, il s'était
exhibé dans les foires, où son imprésario le montrait comme «mort
vivant». Il avait dû traverser l'Europe de foire en foire et compléter
son étrange éducation d'artiste et de magicien à la source même de
l'art et de la magie, chez les Bohémiens. Toute une période de
l'existence d'Erik était assez obscure. On le retrouve à la foire de
Nijni-Novgorod, où alors il se produisait dans toute son affreuse
gloire. Déjà il chantait comme personne au monde n'a jamais
chanté; il faisait le ventriloque et se livrait à des jongleries
extraordinaires dont les caravanes, à leur retour en Asie, parlaient
encore, tout le long du chemin. C'est ainsi que sa réputation passa
les murs du palais de Mazenderan, où la petite sultane, favorite du
sha-en-shah, s'ennuyait. Un marchand de fourrures, qui se rendait à
Samarkand et qui revenait de Nijni-Novgorod, raconta les miracles
qu'il avait vus sous la tente d'Erik. On fit venir le marchand au Palais,
et le daroga de Mazenderan dut l'interroger. Puis, le daroga fut
chargé de se mettre à la recherche d'Erik. Il le ramena en Perse, où
pendant quelques mois il fit, comme on dit en Europe, la pluie et le
beau temps. Il commit ainsi pas mal d'horreurs, car il semblait ne
connaître ni le bien ni le mal, et il coopéra à quelques beaux
assassinats politiques aussi tranquillement qu'il combattit, avec des
inventions diaboliques, l'émir d'Afghanistan, en guerre avec l'Empire.
Le sha-en-shah le prit en amitié. C'est à ce moment que se placent
les Heures roses de Mazenderan, dont le récit du daroga nous a
donné un aperçu. Comme Erik avait, en architecture, des idées tout
à fait personnelles et qu'il concevait un palais comme un
prestidigitateur peut imaginer un coffret à combinaisons, le sha-en-
shah lui commanda une construction de ce genre, qu'il mena à bien
et qui était, paraît-il, si ingénieuse que Sa Majesté pouvait se
promener partout sans qu'on l'aperçût et disparaître sans qu'il fût
possible de découvrir par quel artifice. Quand le sha-en-shah se vit
le maître d'un pareil joyau, il ordonna, ainsi que l'avait fait certain
Tsar à l'égard du génial architecte d'une église de la place Rouge, à
Moscou, qu'on crevât à Erik ses yeux d'or. Mais il réfléchit que,
même aveugle, Erik pourrait construire encore, pour un autre
souverain, une aussi inouïe demeure, et puis, enfin, que, Erik vivant,
quelqu'un avait le secret du merveilleux palais. La mort d'Erik fut
décidée, ainsi que celle de tous les ouvriers qui avaient travaillé sous
ses ordres. Le daroga de Mazenderan fut chargé de l'exécution de
cet ordre abominable. Erik lui avait rendu quelques services et l'avait
bien fait rire. Il le sauva en lui procurant les moyens de s'enfuir. Mais
il faillit payer de sa tête cette faiblesse généreuse. Heureusement
pour le daroga, on trouva, sur la rive de la mer Caspienne, un
cadavre à moitié mangé par les oiseaux de mer et qui passa pour
celui d'Erik, à cause que des amis du daroga avaient revêtu cette
dépouille d'effets ayant appartenu à Erik lui-même. Le daroga en fut
quitte pour la perte de sa faveur, de ses biens, et pour l'exil. Le
Trésor persan continua cependant, car le daroga était issu de race
royale, de lui faire une petite rente de quelques centaines de francs
par mois, et c'est alors qu'il vint se réfugier à Paris.
Quant à Erik, il avait passé en Asie-Mineure, puis était allé à
Constantinople où il était entré au service du sultan. J'aurai fait
comprendre les services qu'il put rendre à un souverain que
hantaient toutes les terreurs, quand j'aurai dit que ce fut Erik qui
construisit toutes les fameuses, trappes et chambres secrètes et
coffre-forts mystérieux que l'on trouva à Yildiz-Kiosk, après la
dernière révolution turque. C'est encore lui[13] qui eut cette
imagination de fabriquer des automates habillés comme le prince et
ressemblant à s'y méprendre au prince lui-même, automates qui
faisaient croire que le chef des croyants se tenait dans un endroit,
éveillé, quand il reposait dans un autre.
Naturellement, il dut quitter le service du sultan pour les mêmes
raisons qu'il avait dû s'enfuir de Perse. Il savait trop de choses.
Alors, très fatigué de son aventureuse et formidable et monstrueuse
vie, il souhaita de devenir quelqu'un comme tout le monde. Et il se
fit entrepreneur, comme un entrepreneur ordinaire qui construit des
maisons à tout le monde, avec des briques ordinaires! Il
soumissionna certains travaux de fondation à l'Opéra. Quand il se vit
dans les dessous d'un aussi vaste théâtre, son naturel artiste,
fantaisiste et magique, reprit le dessus. Et puis, n'était-il pas
toujours aussi laid? Il rêva de se créer une demeure inconnue du
reste de la terre et qui le cacherait à jamais au regard des hommes.
On sait et l'on devine la suite. Elle est tout au long, de cette
incroyable et pourtant véridique aventure. Pauvre malheureux Erik!
Faut-il le plaindre? Faut-il le maudire? Il ne demandait qu'à être
quelqu'un, comme tout le monde! Mais il était trop laid! Et il dut
cacher son génie ou faire des tours avec, quand, avec un visage
ordinaire, il eût été l'un des plus nobles de la race humaine! Il avait
un cœur à contenir l'empire du monde, et il dut finalement, se
contenter d'une cave. Décidément il faut plaindre le Fantôme de
l'Opéra!
J'ai prié, malgré ses crimes, sur sa dépouille et que Dieu l'ait
décidément en pitié! Pourquoi Dieu a-t-il fait un homme aussi laid
que celui-là?
Je suis sûr, bien sûr, d'avoir prié sur son cadavre, l'autre jour quand
on l'a sorti de la terre, à l'endroit même où l'on enterrait les voix
vivantes; c'était son squelette. Ce n'est point à la laideur de la tête
que je l'ai reconnu, car lorsqu'ils sont morts depuis si longtemps,
tous les hommes sont laids, mais à l'anneau d'or qu'il portait et que
Christine Daaé était certainement venue lui glisser au doigt, avant de
l'ensevelir, comme elle le lui avait promis.
Le squelette se trouvait tout près de la petite fontaine, à cet endroit
où pour la première fois, quand il l'entraîna dans les dessous du
théâtre, l'Ange de la Musique avait tenu dans ses bras tremblants
Christine Daaé évanouie.
Et, maintenant, que va-t-on faire de ce squelette? On ne va pas le
jeter à la fosse commune?... Moi, je dis: la place du squelette du
Fantôme de l'Opéra est aux archives de l'Académie nationale de
musique; ce n'est pas un squelette ordinaire.
[12]J'en parlais encore quarante-huit heures avant l'apparition de
cet ouvrage, à M. Dujardin-Beaumetz, notre si sympathique sous-
secrétaire d'État aux beaux-arts, qui m'a laissé quelque espoir, et
je lui disais qu'il était du devoir de l'État d'en finir avec la légende
du Fantôme pour rétablir sur des bases indiscutables l'histoire si
curieuse d'Erik. Pour cela, il est nécessaire, et ce serait le
couronnement de mes travaux personnels, de retrouver la
Demeure du Lac, dans laquelle se trouvent peut-être encore des
trésors pour l'art musical. On ne doute plus qu'Erik fût un artiste
incomparable. Qui nous dit que nous ne trouverons point dans la
Demeure du Lac, la fameuse partition de son Don Juan
triomphant?
[13]Interview de Mohamed-Ali bey, au lendemain de l'entrée des
troupes de Salonique, à Constantinople, par l'envoyé spécial du
Matin.
*** END OF THE PROJECT GUTENBERG EBOOK LE FANTÔME DE
L'OPÉRA ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like