liveBook · Manning

NoSQL database

As explained in Building Web APIs with ASP.NET Core

NoSQL is a class of nonrelational database systems that use flexible data models such as documents, key-value collections, graphs, or wide columns.

A NoSQL database is a nonrelational database that stores data in flexible structures rather than fixed tables. NoSQL means “Not Only SQL”: many systems support SQL variants, but commonly expose JSON-like retrieval APIs. section 4.1.1

The main implementation differences from SQL databases are:

  • Stores records in collections of documents containing flexible key/value pairs, rather than rows and columns in fixed-schema tables. section 4.1.1
  • Often keeps related information inside one document, such as roles within a user document or comments within a board-game document. section 4.1.1
  • Uses a different approach to relationships than SQL databases, whose records commonly connect through primary keys. section 4.1.1

Choosing a database for MyBGList

A board-game API might use NoSQL for a CSV import containing IDs, names, publication years, and related information. The decision favors SQL when the dataset is small, record structures should remain consistent, horizontal scaling is unnecessary, and the application already benefits from caching and paging. ASP.NET Core supports both approaches; the available NoSQL options include Azure Cosmos DB and third-party providers. section 4.1.2

Figure 4.1 MyBGList database schema diagram for a table-oriented SQL database
04-01

Compare the table-oriented SQL schema with its record types and relationships. section 4.1.1

Figure 4.2 MyBGList database schema diagram for a document-oriented NoSQL database
04-02

Compare the document-oriented alternative, including how related board-game information is organized. section 4.1.1

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Defines document storage and relationship differences, but stops short of detailed product-specific behavior.
Examples
Uses MyBGList board-game records, CSV imports, document collections, and paired SQL and NoSQL schema diagrams.
What it assumes
Introduces SQL and NoSQL terminology while assuming a web API, imported data, and basic database schema context.
What you can do after
Evaluate SQL and NoSQL choices against dataset size, schema consistency, scaling needs, caching, paging, and framework support.
How it connects
Connects NoSQL with SQL databases, data modeling, database schema, horizontal scaling, caching, paging, and ASP.NET Core.

Also explained in

Compare how 7 books explain NoSQL database →

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.