Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Navigational database
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Description== Navigational access is traditionally associated with the [[network model]] and [[hierarchical model]] of [[database]], and conventionally describes data manipulation APIs in which records (or objects) are processed one at a time, iteratively. The essential characteristic as described by Bachman, however, is finding records by virtue of their relationship to other records: so an interface can still be navigational if it has set-oriented features.<ref>{{cite book | author = Błażewicz, Jacek |author2=Królikowski, Zbyszko |author3=Morzy, Tadeusz | title = Handbook on Data and Management in Information Systems | publisher = Springer | year = 2003 | page = 18 | url = https://books.google.com/books?id=AvLziHKyuLcC&q=%22Navigational+database%22+-wikipedia+network+model+and+hierarchical+model&pg=PA18| isbn = 3-540-43893-9 }}</ref> From this viewpoint, the key difference between navigational data manipulation languages and relational languages is the use of explicit named relationships rather than value-based joins: {{code|2=cobolfree|1=for department with name="Sales", find all employees in set department-employees}} versus <code>find employees, departments where employee.department-code = department.code and department.name="Sales"</code>. In practice, however, most navigational APIs have been procedural: the above query would be executed using procedural logic along the lines of the following pseudo-code: <syntaxhighlight lang="cobolfree"> get department with name='Sales' get first employee in set department-employees until end-of-set do { get next employee in set department-employees process employee } </syntaxhighlight> On this viewpoint, the key difference between navigational APIs and the [[relational model]] (implemented in [[relational database]]s) is that relational APIs use "declarative" or [[logic programming]] techniques that ask the system ''what'' to fetch, while navigational APIs instruct the system in a sequence of steps ''how'' to reach the required records. Most criticisms of navigational APIs fall into one of two categories: * Usability: application code quickly becomes unreadable and difficult to debug * Data independence: application code needs to change whenever the data structure changes For many years the primary defence of navigational APIs was performance. Database systems that support navigational APIs often use internal storage structures that contain physical links or pointers from one record to another. While such structures may allow very efficient navigation, they have disadvantages because it becomes difficult to reorganize the physical placement of data. It is quite possible to implement navigational APIs without low-level pointer chasing (Bachman's paper envisaged logical relationships being implemented just as in relational systems, using primary keys and foreign keys), so the two ideas should not be conflated. But without the performance benefits of low-level pointers, navigational APIs become harder to justify. Hierarchical models often construct primary keys for records by concatenating the keys that appear at each level in the hierarchy. Such composite identifiers are found in computer file names (<code>/usr/david/docs/index.txt</code>), in URIs, in the [[Dewey decimal]] system, and for that matter in postal addresses. Such a composite key can be considered as representing a navigational path to a record; but equally, it can be considered as a simple primary key allowing associative access. As relational systems came to prominence in the 1980s, navigational APIs (and in particular, procedural APIs) were criticized and fell out of favour. The 1990s, however, brought a new wave of [[object-oriented database]]s that often provided both declarative and procedural interfaces. One explanation for this is that they were often used to represent graph-structured information (for example spatial data and engineering data) where access is inherently recursive: the mathematics underpinning SQL (specifically, [[first-order predicate calculus]]) does not have sufficient power to support recursive queries, even those as simple as a [[transitive closure]]. A current example of a popular navigational API can be found in the [[Document Object Model]] (DOM) often used in web browsers and closely associated with [[JavaScript]]. The DOM is essentially an in-memory hierarchical database with an API that is both procedural and navigational. By contrast, the same data ([[XML]] or [[HTML]]) can be accessed using [[XPath]], which can be categorized as declarative and navigational: data is accessed by following relationships, but the calling program does not issue a sequence of instructions to be followed in order. Languages such as [[SPARQL]] used to retrieve [[Linked Data]] from the [[Semantic Web]] are also simultaneously declarative and navigational.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)