> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/data-warehousing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/types-of-dimensions/degenerate-dimension.md).

# Degenerate Dimension

Generally, what is a Dimension table? Something like a master list. Employee, Product, Date, Store.

In a data warehouse, a degenerate dimension is a dimension key in the fact table that does not have its dimension table.

*It is key in the fact table but does not have its dimension table.*

<figure><img src="https://2629735788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3G2NQEHaUSzehWzaKvXK%2Fuploads%2FProckhpnTSg2fu3qjYxY%2FDegenrate_Dimension.png?alt=media&amp;token=9dd04275-4680-4ebd-95b9-fc0f95bcfa21" alt=""><figcaption></figcaption></figure>

Degenerate dimensions are most familiar with the transaction and accumulating snapshot fact tables.

Means no separate Dimension table.&#x20;

OrderNo is degenerate dimension. As it has no Dimension table.

### Uses of using Degenerate Dimension Table

```
- Grouping line items
- Getting the average sale
- Tracking
```

<figure><img src="https://2629735788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3G2NQEHaUSzehWzaKvXK%2Fuploads%2FLBxHHQ8z8TlklGFVeRSw%2Fsales_order_degenerate_dimension.png?alt=media&amp;token=1238829e-f9fd-4f21-8d27-f3db4103797e" alt=""><figcaption></figcaption></figure>

### Other Examples of Degenerate Dimensions are

1. **Order number or invoice number**: This is a typical example of a degenerate dimension. It is a unique identifier for an order or an invoice but has no meaningful attributes other than its value. This degenerate dimension can be used in a fact table to analyze sales by order or invoice number.
2. **Tracking number**: Another example of a degenerate dimension is a tracking number for a shipment. Like an order number, it is a unique identifier but has no additional attributes associated with it. It can be used in a fact table to analyze shipping performance or delivery times.
3. **ATM transaction number**: In banking, an ATM transaction number is a unique identifier for a transaction at an ATM. It can be used in a fact table to analyze ATM usage patterns and trends.
4. **Serial number**: A serial number is a unique identifier assigned to a product or equipment. It can be used in a fact table to analyze the performance of a particular product or equipment.
5. **Coupon code**: A coupon code is a unique identifier to redeem a discount or promotion. It can be used in a fact table to analyze the usage and effectiveness of different marketing campaigns or promotions.

Degenerate dimensions are helpful when we have a unique identifier for an event or transaction. Still, it has no additional attributes that make it sound like a separate dimension table. In these cases, we can include the unique identifier in the fact table as a degenerate dimension.
