﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Alok Gupta commented on Porting MVC Music Store to Raven: Data migration</title><description>Its a good example but I have some problems when I am creating the database .
  
Plaese can comeone help me?
  
  
Thanks in Advance
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment14</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment14</guid><pubDate>Tue, 22 Jun 2010 17:23:11 GMT</pubDate></item><item><title>Scott Hanselman commented on Porting MVC Music Store to Raven: Data migration</title><description>Slick!
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment13</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment13</guid><pubDate>Sat, 22 May 2010 04:32:47 GMT</pubDate></item><item><title>Justin A commented on Porting MVC Music Store to Raven: Data migration</title><description>[www.urbandictionary.com/define.php?term=mint](http://www.urbandictionary.com/define.php?term=mint)</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment12</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment12</guid><pubDate>Fri, 21 May 2010 14:33:41 GMT</pubDate></item><item><title>NC commented on Porting MVC Music Store to Raven: Data migration</title><description>It's a good thing :) 
  
  
Mint is a term used to describe something of high quality. Like if you restored an old car to "mint" condition.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment11</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment11</guid><pubDate>Fri, 21 May 2010 13:52:04 GMT</pubDate></item><item><title>Ayende Rahien commented on Porting MVC Music Store to Raven: Data migration</title><description>&gt; thought it was mint.
  
  
I am not familiar with that term, is this good or bad?
  
  
Raven does batch writes, so it would be a single write to a million docs.
  
But more to the point, you have to understand that there are different tradeoffs with how you design a system.
  
You can certainly reference the genre id and then get the name from a master doc if you like, but it would mean putting more work on the read.
  
In most systems, reads are far more often than writes, it makes sense to do it this way.
  
In addition to that, you tend to denormalize things that won't change frequently. Tell me how often a Genre name change, for example
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment10</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment10</guid><pubDate>Fri, 21 May 2010 13:22:49 GMT</pubDate></item><item><title>stuart commented on Porting MVC Music Store to Raven: Data migration</title><description>I downloaded RavenDB the other night and thought it was mint. This is more to do with my lack of understanding of document storage design than the above code so forgive me for going off  topic slightly.  What happens when you store a  million albums each of which have the category "Reggae" and once day you decide to re-name the category to "Reggae &amp; Dub-Step"? I take it you'd just update those million records with the new category name and then save them back to the object database? (ie with a million writes)
  
  
In a traditional relational database model you'd change Genre name field in Genre Table and all Album records that point to this record pick up that change indirectly, so a single write to update a million records? 
  
  
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment9</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment9</guid><pubDate>Fri, 21 May 2010 11:22:48 GMT</pubDate></item><item><title>Ayende Rahien commented on Porting MVC Music Store to Raven: Data migration</title><description>Demis,.
  
  
Oh, I _am_ going to use strongly typed stuff for everything, but this is just the first stage, getting stuff into Raven.
  
We will see the entity schema shortly
  
  
And yes, R# support anon type to named type
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment8</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment8</guid><pubDate>Thu, 20 May 2010 19:29:19 GMT</pubDate></item><item><title>Demis Bellot commented on Porting MVC Music Store to Raven: Data migration</title><description>Hi Ayende,
  
  
It's good that you have a convenient API for data access, looks very nice and succinct - which I think is very important for code maintenance and readability.
  
  
Although personally I've never liked anonymous types and have always preferred to have a strongly-typed schema to bind to as it makes re-factoring a little safer. 
  
  
I haven't tried it but does R# support re-factoring anon types by default? since it does comments and literals (and jetbrains are awesome) it wouldn't surprise me.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment7</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment7</guid><pubDate>Thu, 20 May 2010 19:22:31 GMT</pubDate></item><item><title>Ayende Rahien commented on Porting MVC Music Store to Raven: Data migration</title><description>Colin,
  
Not having something like identity makes things hard
  
Raven supports identity, see the docs for details:
  
[ravendb.net/documentation/docs-api-key-generation](http://ravendb.net/documentation/docs-api-key-generation)  
  
Note, however, that the client API uses hilo and not identity, by default.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment6</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment6</guid><pubDate>Thu, 20 May 2010 16:22:02 GMT</pubDate></item><item><title>Colin commented on Porting MVC Music Store to Raven: Data migration</title><description>I assume that the string literals are a consequence of using anonymous types.  Also, what's the story around the Id generation?  I assume there isn't an equivalent to autoincrement Ids built into Raven.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment5</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment5</guid><pubDate>Thu, 20 May 2010 16:11:31 GMT</pubDate></item><item><title>tobi commented on Porting MVC Music Store to Raven: Data migration</title><description>I am really interested to see how you can solve the problem that denormalized data must be updated in many places. I am sure your very interesting series will cover that.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment4</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment4</guid><pubDate>Thu, 20 May 2010 15:23:47 GMT</pubDate></item><item><title>Grimace of Despair commented on Porting MVC Music Store to Raven: Data migration</title><description>It's simple, slick and it feels so right ;)
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment3</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment3</guid><pubDate>Thu, 20 May 2010 12:16:27 GMT</pubDate></item><item><title>Ryan Heath commented on Porting MVC Music Store to Raven: Data migration</title><description>Looks good to me, for instance,
  
new
  
{
  
 genre.Description,
  
 genre.Name,
  
 Id = "genres/" + genre.GenreId
  
}
  
will create an anonymous type with 3 properties: Description, Name and Id.
  
  
// Ryan
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment2</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment2</guid><pubDate>Thu, 20 May 2010 11:16:27 GMT</pubDate></item><item><title>Bruce Boughton commented on Porting MVC Music Store to Raven: Data migration</title><description>Are those object initializer well-formed? Doesn't look like that.
</description><link>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment1</link><guid>http://ayende.com/4510/porting-mvc-music-store-to-raven-data-migration#comment1</guid><pubDate>Thu, 20 May 2010 09:32:31 GMT</pubDate></item></channel></rss>