liveBook · Manning

Data storage model

As explained in Building Web APIs with ASP.NET Core

A data storage model specifies how data entities, attributes, relationships, and records are organized for persistence.

A data storage model describes how persistent data is organized, including records, attributes, and relationships. The choice shapes how applications retrieve data, scale, and support particular usage scenarios. section 4.1.1

Two common approaches organize data differently:

  • SQL databases use tables with fixed rows and columns. Each table represents one record type, such as Users, Roles, BoardGames, or Comments. section 4.1.1
  • NoSQL databases use collections of documents with flexible key/value schemas. A document commonly stores a record together with related information, such as a board game and its comments. section 4.1.1
  • SQL relationships typically use primary keys and references. For example, a Comments table can contain BoardGameID to associate each comment with one board game. section 4.1.1
Figure 4.1 MyBGList database schema diagram for a table-oriented SQL database
04-01

Compare a table-oriented schema with the corresponding document-oriented design when choosing how a board-game API should persist related data. section 4.1.1

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Compares fixed-schema tables, flexible documents, and primary-key relationships while stopping short of individual product characteristics.
Examples
Uses Users, Roles, BoardGames, and Comments tables or documents, including BoardGameID references and embedded related information.
What you can do after
Evaluate/understand SQL and NoSQL designs by comparing schemas, relationship handling, and organization of related records.
How it connects
Connects SQL databases, NoSQL databases, relational databases, document collections, schemas, records, and primary keys.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.