---
title: NSDerivedAttributeDescription
framework: coredata
role: symbol
role_heading: Class
path: coredata/nsderivedattributedescription
---

# NSDerivedAttributeDescription

A description of an attribute that derives its value by performing a calculation on a related attribute.

## Declaration

```swift
class NSDerivedAttributeDescription
```

## Overview

Overview Use derived attributes to optimize fetch performance; for example: Create a derived searchName attribute to reflect a name attribute with case and diacritics removed for more efficient comparison. Create a derived relationshipCount attribute to reflect the number of objects in a relationship and avoid having to do a join. Derived attributes support the following expressions:  |  |   |  |   |  |   |  |   |  |  important: Data recomputes derived attributes when you save a context. A managed object’s property does not reflect unsaved changes until you save the context and refresh the object.

## Topics

### Specifying the Derivation Expression

- [derivationExpression](coredata/nsderivedattributedescription/derivationexpression.md)

## Relationships

### Inherits From

- [NSAttributeDescription](coredata/nsattributedescription.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Computed attributes

- [NSCompositeAttributeDescription](coredata/nscompositeattributedescription.md)
