UNIHIVE

Study Hub UNIPORT CSC 480

CSC 480 · Database Management

Data models

What a data model is, record-based models (hierarchical, network, relational), object-based models (entity-relationship, object-oriented), semi-structured and NoSQL models, and how to choose.

Our notes

2 min read

What a data model is

An integrated set of concepts for describing data, relationships between data and constraints. It has a structure part, a manipulation part (operations) and an integrity part (rules).

Hierarchical model

Data as trees: each child record has one parent (one-to-many only). IBM's IMS (1960s, used for the Apollo programme). Fast for fixed access paths; poor for many-to-many relationships (data must be duplicated) and for queries not foreseen by the design.

Network model (CODASYL)

Records linked by sets (owner-member links) forming a graph: a record can have several owners, so many-to-many can be handled through link records. More flexible than hierarchical, but programs must navigate pointers record by record: complex and dependent on structure.

Relational model (E. F. Codd, 1970)

Data as tables (relations) of rows and columns; relationships shown by matching values (foreign keys), not pointers. Queries say what is wanted, not how to find it (declarative). Strong mathematical base (set theory, predicate logic). Dominant since the 1980s.
Early relational systems: System R (IBM, origin of SQL), INGRES (Berkeley, query language QUEL, ancestor of PostgreSQL), Oracle; desktop dBASE (1980s PCs, file-based tables with its own language).

Entity-relationship model (Chen, 1976)

A conceptual (design) model: entities, attributes and relationships, drawn as diagrams; converted to tables for implementation. See the next topic.

Object-oriented and object-relational models

Objects with attributes and methods, classes and inheritance, complex types (images, nested structures). Pure object databases (ObjectDB, db4o) are niche; object-relational features (user-defined types, JSON columns, arrays) are now in PostgreSQL and Oracle.

Semi-structured and NoSQL models

For very large or flexible data (web scale, sensor data):

TypeStoresExample systems
Key-valuekey → valueRedis
DocumentJSON-like documentsMongoDB, Firestore
Column-familywide rows grouped in column familiesCassandra, HBase
Graphnodes and edgesNeo4j (social networks, fraud detection)

They trade some consistency and query power for scale and flexible schemas (often "eventual consistency"; BASE instead of ACID). XML and JSON are semi-structured formats.

Choosing

Relational for most business data needing consistency (banking, results, payments). NoSQL for huge volumes, changing structures or special access patterns (chat messages, product catalogues, recommendations). Many systems use both.

Exams usually ask: define a data model and its three parts; compare hierarchical, network and relational models with diagrams; why the relational model replaced the others; kinds of NoSQL databases and when to use them.

Common mistake: describing the E-R model as an implementation model like relational. E-R is used for design; it is converted into tables before a DBMS stores anything.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 480 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.