Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

12.1 Adjacency List Model Graphs > 12.1.2 Paths with CTE - Pg. 231

222 CHAPTER 12: GRAPHS IN SQL 12.1.2 Paths with CTE The following queries with CTEs are credited to Frédéric Brouard of France. Sample data and the narrative are so delightful that I am using his material directly. Perhaps you never go to France. So you may be interested by the fact that in Paris, there are beautiful girls, and in Toulouse a famous dish called Cassoulet, and a small plane constructor call Airbus. So the problem is to go by car from Paris to Toulouse using the speedway network. I will just simplify for you (if you are lost and you do not know the pronunciation to ask people your way to Toulouse, it is simple. Just say "to loose"): CREATE TABLE Journeys (depart_town VARCHAR(32) NOT NULL, arrival_town VARCHAR(32) NOT NULL, CHECK (depart_town < > arrival_town), PRIMARY KEY (depart_town, arrival_town),