Transitive dependency

A transitive dependency is a functional dependency which holds by virtue of transitivity among various software components.

Computer programs

In a computer program a direct dependency is functionality exported by a library, or API, or any software component that is referenced directly by the program itself. A transitive dependency is any dependency that is induced by the components that the program references directly. E.g. a call to a log() function will usually induce a transitive dependency to a library that manages the I/O to write the log message in a file.

Dependencies and transitive dependencies can be resolved at different times, depending on how the computer program is assembled and/or executed: e.g. a compiler can have a link phase where the dependencies are resolved. Sometimes the build system even allows management of the transitive dependencies[1].

Similarly, when a computer uses services, a computer program can depend on a service that should be started before to execute the program. A transitive dependency in such case is any other service that the service we depend directly on depends on, e.g. a web browser depends on a Domain Name Resolution service to convert a web URL in an IP address; the DNS will depend on a networking service to access a remote name server. The Linux boot system systemd is based on a set of configurations that declare the dependencies of the modules to be started: at boot time systemd analyzes all the transitive dependencies to decide the execution order of each module to start.

Database Management Systems

Let A, B, and C designate three distinct (but not necessarily disjoint) sets of attributes of a relation. Suppose all three of the following conditions hold:

  1. A → B
  2. It is not the case that B → A
  3. B → C

Then the functional dependency A → C (which follows from 1 and 3 by the axiom of transitivity) is a transitive dependency.

In database normalization, one of the important features of third normal form is that it excludes certain types of transitive dependencies. E.F. Codd, the inventor of the relational model, introduced the concepts of transitive dependence and third normal form in 1971.[2]

Example

A transitive dependency occurs in the following relation:

BookGenreAuthorAuthor Nationality
Twenty Thousand Leagues Under the SeaScience FictionJules VerneFrench
Journey to the Center of the EarthScience FictionJules VerneFrench
Leaves of GrassPoetryWalt WhitmanAmerican
Anna KareninaLiterary FictionLeo TolstoyRussian
A ConfessionReligious AutobiographyLeo TolstoyRussian

The functional dependency {Book} → {Author Nationality} applies; that is, if we know the book, we know the author's nationality. Furthermore:

  • {Book} → {Author}
  • {Author} does not → {Book}
  • {Author} → {Author Nationality}

Therefore {Book} → {Author Nationality} is a transitive dependency.

Transitive dependency occurred because a non-key attribute (Author) was determining another non-key attribute (Author Nationality).

Notes

  1. "Managing Transitive Dependencies". gradle.org. Retrieved 21 February 2019.
  2. Codd, E.F. "Further Normalization of the Data Base Relational Model." (Presented at Courant Computer Science Symposia Series 6, "Data Base Systems," New York City, May 24th-25th, 1971.) IBM Research Report RJ909 (August 31st, 1971). Republished in Randall J. Rustin (ed.), Data Base Systems: Courant Computer Science Symposia Series 6. Prentice-Hall, 1972. See pages 45-51, which cover third normal form and transitive dependence.
gollark: it's very hung.
gollark: I just use some of their infrastructure.
gollark: We're not, though.
gollark: Yes. This is how computers work, generally.
gollark: I mean, assuming some assumptions.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.