liveBook · Manning

Repeating group

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

A repeating group is a set of columns representing multiple occurrences of the same kind of attribute within a relation.

A repeating group is a set of attributes that records multiple occurrences of the same kind of thing in one relation. It can look convenient—for example, keeping several delivery addresses or order items beside a sale—but it prevents a clean first-normal-form design. section 4.1.3

Treat a repeating group as a design warning: move the repeated attributes into a different entity. Keep attributes atomic and uniquely named, then relate the new entity to the original one with keys. This makes each occurrence a row rather than another variation of the same columns. section 4.1.3

Order items and delivery addresses

An initial sales inventory includes “Customer Delivery Addresses,” “Sales Order Item,” and “Sales Order Quantities.” These plural attributes should be examined as possible repeating groups, then modeled as separate related entities rather than expanded as numbered columns. section 4.1.3

Sales
Sales Order Date
Sales Order Number
Sales Person Name
Sales Person Email
Sales Area Name
Sales Area Manager
Customer Company Name
Customer Contact Name
Customer Contact Email
Customer Invoice Address
Customer Delivery Addresses
Sales Order Delivery Due Date
Sales Order Delivery Actual Date
Sales Order Item
Sales Order Quantities
Currier Used for Delivery
 
Purchasing
Supplier Name
Supplier Contact Name
Supplier Contact Email
Supplier Address
Purchase Order Date
Purchase Order Number
Purchase Order Items
Purchase Order Quantities
 
Products
Product Name
Product Stock Level
Product Next Manufacture Date
Product Next Manufacture Quantity
Back Order Manufacturing ID
Product Type Name
Product Type Description
Product Category Name
Product Category Description
Product Subcategory Name
Product Subcategory Description

Use the attribute inventory to spot plural or multi-occurrence attributes before assigning them to relations. section 4.1.3

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

How deep it goes
Defines the 1NF treatment: move repeated attributes into another entity, then continues through 3NF.
Examples
Uses sales delivery addresses, order items, and quantities in an attribute inventory.
What it assumes
Introduces repeating-group handling within a practical progression from 1NF through 3NF.
What you can do after
Evaluate/understand whether repeated attributes should become a separate related entity.
How it connects
Connects repeating groups with First Normal Form, atomic attributes, entities, primary keys, and composite primary keys.

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.