Like most NoSQL solutions, RavenDB best practices favor denormalization over composition / joins for complex documents. A typical example would be storing the Artist name and id along with the Track document:
That decision make reading the data very fast and easy, but it present a challenge when we need to update the Artist name. In general, it isn't recommended to denormalize data that frequently changes, but even rarely changing properties will change occasionally.
In order to solve this exact problem RavenDB offers Set Based Operations. Here is how we can use them from the client API:
Query = "Artist:artists/294"
Type = "Modify",
Name = "Artist",
Nested = new
Type = "Set",
Name = "Name",
Value = JValue.CreateString("Fame Soundtrack")
This will update the Artist.Name property on all the documents where the Tracks/ByArtistId index matched to the id artists/294.