RavenDB and storing large number of entities types in a single database
By default, we expect to have a rather smaller number of entities types in a database. Unlike relational databases, where you typically see hundreds or thousands of tables, because everything gets dumped into a single database (and because a single document in RavenDB typically reside in many relational tables).
That said, we got a few complaints about this story, because the studio UI becomes hard to use when this happens. We decided to support it in an interesting fashion. This is what your documents will look like when you have ~60 entities types in a single database:
And here is where you go if you have hundreds of them. Psychedelic days are here again!
Comments
So what is the purpose of rainbows?
Why not make this configurable - allows users to choose how many (or perhaps even which) collections to show? I can see scenarios where you need to see specific collections, or "just on more type" to get the overview that you need....
This is a joke right? I don't get it why psychedelic colors (although cool looking) would make the experience any better, I think it makes it a bit harder.
The second image makes it very difficult to tell the difference between PostComments, Posts, Commenters, and Sections.
It's a bit early here, but i can't figure out what's going on...
Maybe even let the user chose a color or an icon per collection?
is the difference in the two images the number of color bands on each collection type? It's very subtle. Interesting idea, but very subtle.
@jbland agreed, i don't know what's going on...
cool looking though...?
I have no idea what I'm looking at...
ha, so I'm not the only one who read this in the morning and went 'whaaaa?'
Absolutely no idea what these colors mean.
"I have no idea what I'm looking at..." I guess thats the point Ayende is trying to make. When model reaches certain complexity, it should be divided to simpler separated and isolated models - Databases.
(In terms of DDD, which RavenDB supports out of the box, bounded-contexts)
I don't get it at all....?
WAT?
WHAT 2?
Max, To allow easy distinguishing between types, when you have very large number of types.
Itay, Configurable is a source of trouble. It is "I don't know how to do that, let us let the user decide". Thanks, but no thanks.
Khalid, This isn't a joke. The psychedelic colors only kick in when you have hundreds of entity types. At that point, you need some way to get things working. And while it is difficult for us to notice the differences in those mode, it turn out it is easy to tell them apart.
Sam, They don't mean anything. This is just a UI hint to make it easier to tell which documents belong to what type.
Ayende, I'm not sure if that is the best way to distinguish multiple types. I'd prefer solid colours than rainbows. For example it is hard to distinguish Posts and Commenters. Once you look on it long enough, you get it, but that's not the point here. On the other hand, dark red and light red would be easy to tell apart.
I guess it is one of those things. Don't knock it until you try it. Is this a 2.5 thing?
Max, It seems that I didn't communicate something clearly. We start with simple colors. Then we move to composite colors (2). Then we move to 3 colors, and so on. The first few entity types are always going to be solid, then there are going to be entity types with 2 colors, etc. You only go to the crazy part if you have dozens or hundreds of entity types.
Ah, that makes much more sense now! Indeed, I was puzzled by rainbows on six different entities on the screenshot
Are these color blind safe colors?
There's only one User and one BlogConfig, why are those colored then?
Thomas, It isn't the number of entities in a collection that colors it. It is the total number of entities collections.
I have to say as a red/green and blue/green color blind person, these abstractions are not useful to me.
@Ayende if the colors aren't meant to imply data size of the collections themselves, I would recommend you make the strip horizontal either above or below the title. This would create association between the color & the name, as opposed to the color and the bucket that the vertical line creates.
Also take the feedback from Patrick very seriously. Color blind is far more common than consideration is usually given for.
Rainbows?! What about monsters?! http://i.imgur.com/iKnbyHI.png
Full source: http://share.linqpad.net/bk4tw8.linq
And here's the same document types from your post: http://i.imgur.com/0Q5jZ1C.png
Comment preview