Data Models and Database Families in DBMS

109
1

Introduction

A learning platform stores students, courses, and enrollments. The same information can be arranged as related tables, nested documents, or connected nodes. These choices affect how the application finds, connects, and updates its data.

Data models describe how information is represented. Database families group database systems that support similar ways of organizing and accessing that information.

What Is a Data Model?

A data model describes the structure of data, the relationships between data items, and the rules that apply to them.

For a learning platform, the model should represent students, courses, and the fact that a student can enroll in a course. It also helps express rules, such as each student having a unique identifier.

A database family is a broad category of database systems associated with a particular model or organizing approach. For example, the relational model represents data through tables, and MySQL belongs to the relational database family.

Conceptual, Logical, and Physical Models

Data modeling can describe a system at different levels of detail.

Level

What it describes

Learning-platform example

Conceptual

Important entities, business relationships, and rules

Students enroll in courses

Logical

Detailed structures, attributes, identifiers, and relationships

Students and Courses connected through Enrollments

Physical

Implementation details for a chosen DBMS

PostgreSQL column types, indexes, and storage settings

An entity is something the system needs to represent, such as a student or course.

These three levels describe design detail. Relational, document, and graph describe ways of representing data. Different database families can be designed at conceptual, logical, and physical levels.

Common Database Families

The following families organize data in different ways. Their example uses show where each approach can be useful, without limiting them to those applications.

Family

How data is organized

Example systems

Example use

Relational

Rows in tables, with keys connecting related records

MySQL, PostgreSQL

Students, enrollments, and reporting

Key-value

A unique key maps to a stored value

Redis

Login sessions and cached profiles

Document

Documents containing named fields, nested objects, and arrays

MongoDB

Course catalogs with varying attributes

Wide-column

Keyed rows and column families, with layouts shaped around access patterns

Apache Cassandra

Large histories of progress events

Graph

Nodes represent entities; edges represent relationships

Neo4j

Course prerequisites and recommendations

Document, key-value, wide-column, and graph databases are commonly grouped under NoSQL. NoSQL is an umbrella category covering several models.

The boundaries are not rigid. A database product may support additional models and features beyond the family it is commonly associated with.

Other Models You May Encounter

  • Hierarchical model: Records form a tree. Each non-root record has one parent, while a parent can have several children. A category tree is a simple example of this structure.

  • Network model: Records connect through predefined links and can participate in multiple relationships. This historical linked-record model is distinct from the modern graph-database family.

  • Object-oriented model: Data persists as objects with their own identity, attributes, and associations. This approach closely follows the objects used by an application.

One Fact, Four Representations

Consider one fact:

Asha, student 101, is enrolled in SQL, course C01.

Assume student IDs uniquely identify students and course IDs uniquely identify courses. The diagram shows one possible representation of these facts in four models.

One Fact, Four Models

One Fact, Four Models

Relational Representation

The information is divided among three tables:

  • Students stores Asha’s student ID and name.

  • Courses stores the course ID and title.

  • Enrollments connects student 101 with course C01.

The identifiers connect the records. In this design, course details can be maintained separately from the students enrolled in that course.

Key-Value Representation

The key student:101 identifies a stored value containing Asha’s name and course information.

Looking up that key retrieves the value. The application can then read the information inside it. This approach is useful when the application already knows the key of the item it needs.

A value can contain structured information, as the diagram shows; it does not have to be a single word or number.

Document Representation

Asha’s information appears inside one document. Its courses field contains an array with the course details.

A document database exposes named fields for querying and updating data. Related information can be embedded together when the application commonly reads it together.

Embedding also creates a design tradeoff: if the same course details appear in many student documents, changing those details may require updating multiple copies.

Graph Representation

Asha and the SQL course are represented as nodes. The ENROLLED_IN edge connects them.

The relationship becomes an explicit part of the stored structure. This is useful when queries need to follow connections, such as moving from a student to their courses and then to those courses’ prerequisites.

The key-value and document examples contain similar-looking information. Their distinction lies in how the database exposes and queries that information: key-value access centres on the key, while document queries can address fields within documents.

Choosing a Suitable Database Family

Start with the questions the application must answer and the rules it must enforce.

For example, retrieving a session by its identifier, filtering courses by several attributes, and following a chain of prerequisites involve different access patterns. An access pattern is the way an application commonly reads or writes its data.

Then consider:

  • Relationships and integrity: Determine which relationships, uniqueness rules, and coordinated updates the database must support.

  • Queries and workload: Check the required searches, joins, traversals, and expected volume of reads and writes.

  • Operational needs: Consider growth, availability, maintenance, and the team’s ability to operate the system.

Keep three distinctions clear:

  • NoSQL still needs data design: Flexible fields do not remove the need for a sensible structure. Some NoSQL systems also support schema validation and transactions; MongoDB is one example.

  • Wide-column and columnar are different concepts: Wide-column names a database family. Analytical columnar storage organizes values column by column to support analytical workloads.

  • Deployment is another classification: Cloud describes where or how a service is hosted, while distributed describes data or processing spread across multiple machines. A database can be both cloud-hosted and relational.

Summary

A data model describes how data is structured, connected, and constrained. Database families group systems with similar organizing approaches, including relational, key-value, document, wide-column, and graph databases. Conceptual, logical, and physical models describe levels of design detail. Choose a suitable system by examining the application’s queries, relationships, integrity requirements, and operational needs.

CS Core

Read Similar Blogs

Comments0