Exercise

Creating a networked data model

In this last exercise, you will create a networked data model. A use case for this is finding all possible paths a bus can take from one location to another. Each route has a departure and destination location. A departure and destination location can appear multiple times. In the following image you can see the possible bus locations and routes. For example, you can go from San Francisco to New York, or from New York to Washington.

Your task is to create the Trip table, insert some routes into this table, and finally, select all possible departure locations from the table.

Instructions

100 XP
  • Define the fields Departure and Destination, neither of which can be NULL.
  • Insert the route from San Francisco to New York for Bus 1.
  • Insert the route from Florida to San Francisco for Bus 9.
  • Select all possible departure locations.