Ayende @ Rahien

Refunds available at head office

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:

collcections

And here is where you go if you have hundreds of them. Psychedelic days are here again!

image

Tags:

Posted By: Ayende Rahien

Published at

Originally posted at

Comments

Max
03/15/2013 11:00 AM by
Max

So what is the purpose of rainbows?

Itay
03/15/2013 11:01 AM by
Itay

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
03/15/2013 12:07 PM by
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.

jbland
03/15/2013 12:19 PM by
jbland

It's a bit early here, but i can't figure out what's going on...

Michael
03/15/2013 12:23 PM by
Michael

Maybe even let the user chose a color or an icon per collection?

Jason Meckley
03/15/2013 12:43 PM by
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
03/15/2013 01:20 PM by
Marcus Swope

@jbland agreed, i don't know what's going on...

cool looking though...?

Rob
03/15/2013 02:16 PM by
Rob

I have no idea what I'm looking at...

Vlad
03/15/2013 02:32 PM by
Vlad

ha, so I'm not the only one who read this in the morning and went 'whaaaa?'

Sam
03/15/2013 03:05 PM by
Sam

Absolutely no idea what these colors mean.

suby
03/15/2013 06:57 PM by
suby

"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)

Chad
03/16/2013 12:17 AM by
Chad

I don't get it at all....?

Frank
03/16/2013 01:54 AM by
Frank

WAT?

Ayende Rahien
03/16/2013 05:21 AM by
Ayende Rahien

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

Ayende Rahien
03/16/2013 05:21 AM by
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
03/16/2013 05:23 AM by
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
03/16/2013 05:23 AM by
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.

max
03/16/2013 11:39 AM by
max

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
03/16/2013 01:05 PM by
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
03/16/2013 06:15 PM by
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.

Max
03/16/2013 07:30 PM by
Max

Ah, that makes much more sense now! Indeed, I was puzzled by rainbows on six different entities on the screenshot

Joe
03/17/2013 09:33 AM by
Joe

Are these color blind safe colors?

Thomas Freudenberg
03/18/2013 02:54 PM by
Thomas Freudenberg

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

Ayende Rahien
03/18/2013 04:33 PM by
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
03/18/2013 08:52 PM by
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
03/19/2013 02:50 PM by
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
03/27/2013 03:33 PM by
Ronnie Overby

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

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

Ronnie Overby
03/27/2013 03:40 PM by
Ronnie Overby

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

Comments have been closed on this topic.