On Wed, Jun 17, 2009 at 10:38 AM, Anders
Nawroth<[email protected]> wrote:
> Hi!
>
> Macarse wrote:
>> 1)
>> Emulating a count(*).
>> I did this: http://pastebin.com/f276fd2c7 but it takes some time and
>> it doesn't look like a good solution.
>> Which is the best way?
>>
>
> The code uses traversals to infinite depth, which of course comes at a
> cost even when using Neo4j (and I think this has very little in common
> with count(*) which only counts to depth one!). How many nodes are
> typically traversed by your code? How much time is spent per node in the
> traversal?
>

My code so far: http://pastebin.com/d44ceab73
(Sorry, it's in spanish)

Output:
La db se creó en 9112 ms.
Amigos de: Roberto Carlos
Cantidad de amigos 100000
La consulta se hizo en 1826 ms.
How much time is spent per node in the traversal: 0.01826 ms.

Translation:
The db was created in 9112 ms.
Roberto Carlos' friends:
Friends quantity: 100000
The query took 1826 ms.
How much time is spent per node in the traversal: 0.01826 ms.


>> Does the following make any sense?
>> Robert connected to the place and therefore to people living there.
>> (Robert <--- friend with people living in ---> Argentina; Charly <---
>> lives in ---> Argentina)
>>
>
> Makes sense to me. One detail: make sure to use directed edges where it
> fits your domain when presenting this stuff! :-)
>

Is there another way of creating relations than with createRelationshipTo() ?
I didn't understand that.

>> 3)
>> Is there a way to create something similar to an schema to generate the db?
>> Robert has almost 100k friends :(
>>
>
> Then Robert has to be a very nice guy ;-)
>
> If you have the data in a RDBMS you should take a look at the SQL
> importer being developed right now:
> http://wiki.neo4j.org/content/Neo_-_SQL_importer
>

Not really, I am just generating random data but I will take a look.

>
>
> /anders
>
>
>
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>

Setting objects as properties?

I've tried:
robertoCarlos.setProperty("clase", new Number(3));

where number is a class having a private int num inside.
I get:

 java.lang.IllegalArgumentException: Unkown property type on:
org.robertocarlos.num...@e5b723

Why is that? I can't save any kind of object?


Thanks for reading!
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to