Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,130 | Comments: 45,560

filter by tags archive

RavenDB and storing large number of entities types in a single database

time to read 1 min | 168 words

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!




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....

Khalid Abuhakmeh

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?

Jason Meckley

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.

Marcus Swope

@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....?



Ayende Rahien

Max, To allow easy distinguishing between types, when you have very large number of types.

Ayende Rahien

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.

Ayende Rahien

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.

Ayende Rahien

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.

Khalid Abuhakmeh

I guess it is one of those things. Don't knock it until you try it. Is this a 2.5 thing?

Ayende Rahien

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?

Thomas Freudenberg

There's only one User and one BlogConfig, why are those colored then?

Ayende Rahien

Thomas, It isn't the number of entities in a collection that colors it. It is the total number of entities collections.

Patrick Escarcega

I have to say as a red/green and blue/green color blind person, these abstractions are not useful to me.

Chris Marisic

@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.

Ronnie Overby

Rainbows?! What about monsters?! http://i.imgur.com/iKnbyHI.png

Full source: http://share.linqpad.net/bk4tw8.linq

Ronnie Overby

And here's the same document types from your post: http://i.imgur.com/0Q5jZ1C.png

Comment preview

Comments have been closed on this topic.


  1. RavenDB Conference 2016–Slides - one day from now

There are posts all the way to Jun 01, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats