O'Reilly logo

Joe Celko's SQL for Smarties, 5th Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27

Graphs in SQL

Abstract

Graphs are important because they are a general way to represent many different types of data and their relationships. SQL was not meant to be a graph language (there are graph databases today), but you can model graphs in SQL.

Keywords

Graph theory

Indegree

Outdegree

Adjacency list

John Gilson

Edge

Node

Tree

Directed graph

Acyclic graph

Nonreconvergent

Reconvergent

Reachable nodes

Source

Sink

Isolated nodes

Internal nodes

Path

Adjacency matrix

Taxi cab geometry

Equivalence class

Cliques

The terminology in graph theory pretty much explains itself; if it does not, you can read some of the books suggested in the appendix for graph theory. Graphs are important because they are a general way to represent many ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required