|This article needs additional citations for verification. (July 2007)|
A navigational database is a type of database in which records or objects are found primarily by following references from other objects. They were a common type of database in the era when data was stored on magnetic tape; the navigational references told the computer where the next record on the tape was stored, allowing fast-forwarding (and in some cases, reversing) though the records without having to read every record along the way to see if it matched a given criterion.
The introduction of low-cost hard drives that provided semi-random access to data led to new models of database storage better suited to these devices. Among these, the relational database and especially SQL became the canonical solution from the 1980s through to about 2010. At that time a reappraisal of the entire database market began, the various NoSQL concepts, which has led to the navigational model being reexamined. Offshoots of the concept, especially the graph database, are finding new uses in modern transaction processing workloads.
Navigational interfaces are usually procedural, though some modern systems like XPath can be considered to be simultaneously navigational and declarative.
Navigational access is traditionally associated with the network model and hierarchical model of database interfaces, and some have even acquired set-oriented features. Navigational techniques use "pointers" and "paths" to navigate among data records (also known as "nodes"). This is in contrast to the relational model (implemented in relational databases), which strives to use "declarative" or logic programming techniques that ask the system for what to fetch instead of how to navigate to it.
For example, to give directions to a house, the navigational approach would resemble something like "Get on highway 25 for 8 miles, turn onto Horse Road, left at the red barn, then stop at the 3rd house down the road", whereas the declarative approach would resemble "Visit the green house(s) within the following coordinates...."
Hierarchical models are also considered navigational because one "goes" up (to parent), down (to leaves), and there are "paths", such as the familiar file/folder paths in hierarchical file systems. In general, navigational systems will use combinations of paths and prepositions such as "next", "previous", "first", "last", "up", "down", "owner", etc.
"Paths" are often formed by concatenation of node names or node addresses. Example:
If there is no link between given nodes, then an error condition is usually triggered with a message such as "Invalid Path". The path "Node6.Node2.Node1" would be invalid in most systems because there is no direct link between Node 6 and Node 2.
Except for hierarchical file systems (which some consider a form of database), navigational techniques fell out of favor by the 1980s. However, object oriented programming and XML have kindled a renewed, but controversial interest in navigational techniques.
Critics of navigational techniques view them as "unstructured spaghetti messes", and liken them to the "goto" of pre-structured programming. In other words, they are allegedly to data organization what goto's were to behavior flow. In this view, relational techniques provide improved discipline and consistency to data organization and usage because of its roots in set theory and predicate calculus.
Some also suggest that navigational database engines are easier to build and take up less memory (RAM) than relational equivalents. However, the existence of relational or relational-based products of the late 1980s that possessed small engines (by today's standards) because they didn't use SQL suggest this is not necessarily the case. Whatever the reason, navigational techniques are still the preferred way to handle smaller-scale structures.
- DB-Engines Ranking of Navigational DBMS by popularity, updated by month