**Puzzle 148.**

Let \\(G\\) be the graph with one node (labeled Person) and one edge (labeled BestFriend) from Person to itself, and let \\(\mathcal C\\) be the free category on \\(G\\).

Let \\(F\\) be the database where \\(F(\textrm{Person}) = \\{\textrm{Alice},\textrm{Bob}\\}\\) and \\(F(\textrm{BestFriend})\\) maps Alice to Bob and Bob to Alice.

Now we want to build another database \\(G\\) that is naturally isomorphic to \\(F\\). We know if \\(\alpha: F \Rightarrow G\\) is a natural isomorphism then \\(\alpha_{\textrm{Person}}\\) must be a bijection. This tells us that \\(G(\textrm{Person})\\) must be a two element set, say \\(G(\textrm{Person}) = \\{\textrm{Carmen}, \textrm{David}\\}\\) and we can define

\\[\alpha_{\textrm{Person}}(\textrm{Alice}) = \textrm{Carmen} \quad \alpha_{\textrm{Person}}(\textrm{Bob}) = \textrm{David}\\]

We've defined \\(G\\) on objects, so to make \\(G\\) a functor from \\(\mathcal{C}\\) to \\(\textbf{Set}\\) all that's left to do is define \\(G\\) on morphisms. However, to make the naturality squares commute (so that \\(\alpha\\) is indeed a natural transformation) we must have \\(G(\textrm{BestFriend})\\) map Carmen to David and David to Carmen.

![](http://slibkind.github.io/act/puzzle148.jpg)

We are done! \\(G\\) is a database and \\(\alpha: F \Rightarrow G\\) is a natural isomorphism.

So in database world, it seems to me that natural isomorphisms preserve the relationships between the things but not the things themselves. In this example, our natural isomorphism renamed our people but kept the relationship that there were two people who were each the other's best friend.

Let \\(G\\) be the graph with one node (labeled Person) and one edge (labeled BestFriend) from Person to itself, and let \\(\mathcal C\\) be the free category on \\(G\\).

Let \\(F\\) be the database where \\(F(\textrm{Person}) = \\{\textrm{Alice},\textrm{Bob}\\}\\) and \\(F(\textrm{BestFriend})\\) maps Alice to Bob and Bob to Alice.

Now we want to build another database \\(G\\) that is naturally isomorphic to \\(F\\). We know if \\(\alpha: F \Rightarrow G\\) is a natural isomorphism then \\(\alpha_{\textrm{Person}}\\) must be a bijection. This tells us that \\(G(\textrm{Person})\\) must be a two element set, say \\(G(\textrm{Person}) = \\{\textrm{Carmen}, \textrm{David}\\}\\) and we can define

\\[\alpha_{\textrm{Person}}(\textrm{Alice}) = \textrm{Carmen} \quad \alpha_{\textrm{Person}}(\textrm{Bob}) = \textrm{David}\\]

We've defined \\(G\\) on objects, so to make \\(G\\) a functor from \\(\mathcal{C}\\) to \\(\textbf{Set}\\) all that's left to do is define \\(G\\) on morphisms. However, to make the naturality squares commute (so that \\(\alpha\\) is indeed a natural transformation) we must have \\(G(\textrm{BestFriend})\\) map Carmen to David and David to Carmen.

![](http://slibkind.github.io/act/puzzle148.jpg)

We are done! \\(G\\) is a database and \\(\alpha: F \Rightarrow G\\) is a natural isomorphism.

So in database world, it seems to me that natural isomorphisms preserve the relationships between the things but not the things themselves. In this example, our natural isomorphism renamed our people but kept the relationship that there were two people who were each the other's best friend.