Network database

Also known as: network model

On this page 7

A network database is a database that stores data as records connected by explicit links, where any record may participate in several owner-member relationships, so the structure forms a graph rather than a strict tree. Among the classic database models in the field of Databases, the network model, standardized by the CODASYL Data Base Task Group in 1969 and 1971, generalized the hierarchical model and dominated large mainframe systems before the relational model replaced it.

Programs work with a network database through navigational access: they locate a starting record and then follow stored pointers from record to record. This approach delivers very fast, predictable traversal along predefined paths, but it binds application code tightly to the physical structure of the data.

The network model links records through set types, each of which defines a named one-to-many relationship between one owner record type and one or more member record types. A set occurrence consists of one owner record and its ordered members, usually chained by pointers. Because a record type may be a member of many different sets, a single record can have several owners at once, which the hierarchical model does not allow.

Many-to-many relationships are expressed with a link record (also called an intersection or junction record). To connect students and courses, a designer creates an enrollment record that is a member of both the student set and the course set. The link record can also carry attributes of the relationship, such as a grade or enrollment date.

The table below lists the core structural elements of the CODASYL network model and their role.

ElementRoleTypical implementation
Record typeDefines fields of an entityFixed-length record on disk pages
Set typeNamed owner-member relationshipPointer chain or pointer array
Owner recordHead of one set occurrenceHolds pointer to first member
Member recordBelongs to a set occurrenceHolds next, prior and owner pointers
Link recordResolves many-to-many relationshipsMember of two or more sets
AreaPhysical storage region for recordsFile or segment of a database
Core elements of the CODASYL network model

Schema, subschema and navigational access

A network database separates data definition from program access through a schema and subschemas. The schema, written in a data definition language (DDL), describes every record type, set type, storage area and placement rule. Each subschema exposes only the part of the schema that a given program needs, which provides a limited form of logical data independence.

Programs, typically written in COBOL, manipulate data with a data manipulation language (DML) embedded in the host language. The database system keeps currency indicators that remember the current record of the run unit, of each record type and of each set, and every navigational command moves or uses these positions.

CommandPurposeExample use
FINDLocates a record and sets currencyFind a customer by calculated key
GETCopies the current record into program memoryRead fields of the found order
STOREInserts a new recordAdd an order to a customer set
CONNECTAdds a record to a set occurrenceAttach an order to a sales region
DISCONNECTRemoves a record from a setDetach an item from a promotion
MODIFY / ERASEUpdates or deletes a recordChange an address, delete an order
Typical CODASYL DML commands

Record placement is part of the design. A CALC location mode places records by hashing a key, allowing direct retrieval, while a VIA location mode stores members physically near their owner, so traversing a set often reads a single disk page. This clustering explains why well-tuned network databases achieved excellent throughput on the hardware of the 1970s and 1980s.

Network database compared with other database models

The network database sits between the hierarchical model, which it generalized, and the relational model, which replaced it. Its closest modern relative is the graph database, which also stores relationships explicitly but uses flexible schemas and declarative traversal languages instead of record-at-a-time navigation.

ModelStructureRelationship handlingQuery style
Hierarchical databaseTree of parent and child segmentsOne parent per childNavigational along the tree
Network databaseGraph of owner and member recordsMany owners via sets and link recordsNavigational through pointers
Relational databaseTables of rowsForeign keys resolved by joinsDeclarative SQL
Graph databaseNodes and edges with propertiesEdges stored as first-class objectsDeclarative pattern matching
Object databaseObjects with referencesDirect object referencesLanguage-integrated navigation
Network model versus neighboring models

Edgar F. Codd’s relational model won because it offered data independence: queries describe what data is needed, and the optimizer chooses access paths. In a network database, a schema change such as reorganizing a set can force rewriting application code, since programs encode the navigation path explicitly.

Where network databases remain in use

Network databases remain in use mainly in long-lived mainframe and embedded systems where stable data structures and very high transaction volumes justify the model. Banking, insurance, airline, telecommunications and government agencies still run core applications on CODASYL-derived products such as IDMS, IDS and similar systems, often with SQL interfaces added later.

  • Legacy transaction processing: batch and online systems built decades ago that continue to process millions of transactions daily.
  • Embedded and real-time systems: compact network-model engines offer deterministic access times with small memory footprints.
  • Modernization projects: teams migrate network schemas to relational or graph databases, mapping sets to foreign keys or edges.

Strengths, limitations and migration pitfalls

The main strength of a network database is predictable performance on known access paths, while its main weakness is rigidity when requirements change. The table below weighs these properties against each other.

AspectStrengthLimitation
Traversal speedDirect pointers avoid join processingOnly fast along designed paths
Relationship modelingSupports many-to-many nativelyLink records add design complexity
Data integritySet membership rules enforce structurePointer damage can corrupt chains
FlexibilityStable for fixed workloadsSchema changes ripple into programs
Ad hoc queryingPossible with added SQL layersNative DML is procedural and verbose
Advantages and limitations of the network model

A common migration mistake is translating every set into a foreign key without studying how programs navigate it. Sets often encode ordering and membership rules (automatic or manual insertion, mandatory or optional retention) that must be reproduced with constraints, sort columns or triggers, otherwise the migrated system behaves differently in subtle ways.

The short version

A network database stores information as records joined by built-in connections, much like stations on a subway map joined by tracks. To find something, a program starts at one station and rides along the tracks to the next record it needs.

This makes trips along existing routes very fast. Adding a new route, however, is hard, because the programs have memorized the old map. The key idea: fast when paths are fixed, difficult when needs change, which is why newer models took over.

Where it makes a difference

A national insurance company has run its policy administration on a CODASYL-based mainframe database since the 1980s. Customer records own policy records, policies own claim records, and agent records own the same policies through a second set, so each policy has two owners.

A nightly batch job that recalculates premiums finds each customer by calculated key and walks its policy set. Because policies are stored next to their customer on the same pages, the job processes about 12 million policies in under three hours.

When the company launches a mobile app that needs flexible searches across claims, the network schema cannot answer those questions efficiently. The architects keep the mainframe for core processing and replicate data into a relational database for new queries, mapping each set to a foreign key and preserving set ordering with explicit sequence columns.