liveBook · Manning

Semistructured format

As explained in 100 SQL Server Mistakes and How to Avoid Them

A semistructured format represents data with flexible, irregular structure in which records need not share the same fields.

A semistructured format represents flexible, irregular data whose records need not share every field. JSON can omit irrelevant attributes and use less tagging than XML, making it practical for varied international address data. section 3.5

Choose JSON deliberately:

  • Use it when data is written often and queried infrequently. section 3.5
  • Prefer relational storage when the data is queried far more often than it is written. section 3.5
  • Consider it for REST integrations, JSON-based logs, or domains spanning relational and NoSQL data. section 3.5

Employee addresses

An Employees table can hold an NVARCHAR(MAX) Address column when only employees use the address data. If offices or sites also need those addresses, a shared Addresses table may be preferable. section 3.5

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Defines irregular structure, explains storage tradeoffs, and demonstrates generation, updating, and shredding, without broader performance analysis.
Examples
Uses international employee addresses with optional postal codes, JSON documents, T-SQL updates, and OPENJSON projections.
What you can do after
Apply it via SQL Server and T-SQL to store, generate, update, and shred JSON address data.
How it connects
Connects JSON with XML, relational databases, NoSQL, REST APIs, SQL Server, and sparse columns.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.