Topological Representation of a Simple Network in a Relational Database

Relational Database Representation of a Simple Network

A network can be represented using two tables, one defining nodes and the other defining links. The three core elements (fields) of a nodes table are unique identifiers and locational attributes in a coordinate system, such as latitude and longitude values. In the above example, coordinates are in decimal degrees, meaning that the location of these nodes can directly be imported into a GIS. Additional attributes can also be included in this table.

The links table has four core elements (fields). The first is a unique identifier for each link, the next two are the nodes of origin and destination of the link, and the fourth is a directional tag indicating if the link is unidirectional. Another alternative would be to assume that all links are unidirectional and define each implicitly. This would require the addition of 3 new records if the directional tag field is not used (C-D, E-D, and E-C). However, this would involve severe redundancies on a complex network. As for the nodes table, additional attributes can be included, such as name, number of lanes, maximum speed, etc.

Both the nodes and links tables have little value if they are considered individually, as a network is the combination of the information contained on both tables. A way to combine these tables is by building a relational join between them. In the above example, a relational join can be established between the [From] and [To] fields of the links table with the [ID] field of the nodes table. The resulting relational database contains the basic topological elements of the network.