# Relationships

## Overview

### Subjects

### Inverse

> I'll paraphrase the definitive answer I found in *More iPhone 3 Development* by Dave Mark and Jeff LeMarche.
>
> **Apple generally recommends that you always create and specify the inverse, even if you don't use the inverse relationship in your app.** For this reason, it warns you when you fail to provide an inverse.&#x20;
>
> Relationships are not *required* to have an inverse, because there are a few scenarios in which the inverse relationship could hurt performance. For example, suppose the inverse relationship contains an extremely large number of objects. Removing the inverse requires iterating over the set that represents the inverse, weakening performance.
>
> But **unless you have a specific reason not to, model the inverse**. It helps Core Data ensure data integrity. If you run into performance issues, it's relatively easy to remove the inverse relationship later.

[StackOverflow / Does every Core Data Relationship have to have an Inverse? / Rose Perrone](https://stackoverflow.com/a/3323613/20100031)

## Sample Codes

```swift
```

## Sources

### Videos

{% embed url="<https://youtu.be/0QGt0THnlwU>" %}
[Hacking with Swift / 100 Days / Day-58 - One-to-many relationships with Core Data, SwiftUI, and @FetchRequest](https://www.hackingwithswift.com/books/ios-swiftui/one-to-many-relationships-with-core-data-swiftui-and-fetchrequest)
{% endembed %}

### Articles / Documents

*

## See also

*
