Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing binary objects in Neo4j

Tags:

neo4j

Neo4j doesn't seem to allow me to store binary objects. Does this mean I must used Neo4j in conjuntion with another data store, such as the filesystem., Oracle, etc?

like image 719
yazz.com Avatar asked Apr 16 '11 13:04

yazz.com


People also ask

Can I store images in Neo4j?

You have several options: As @Christophe Willemsen suggested you, save the image on disk or on a web site and reference it using a URL. Save it in byte[] array as a property. Save the image in base64 using a Data URI (as String).

What are the disadvantages of Neo4j?

Neo4j has some upper bound limit for the graph size and can support tens of billions of nodes, properties, and relationships in a single graph. No security is provided at the data level and there is no data encryption. Security auditing is not available in Neo4j.

Can you store data as nodes and relationships in Neo4j?

Neo4j is often described as schema optional, meaning that it is not necessary to create indexes and constraints. You can create data — nodes, relationships and properties — without defining a schema up front.


1 Answers

Daniel already answered that it's possible to store binary objects in Neo4J.

But i would suggest you not to do so. You can do nothing interesting with binary objects in database. You cannot search them. The only thing you will achieve by storing binary objects - grow the file size of your database. Mind you, Neo4J is not scalable horizontally. It does not have automatic sharding. So if your db grows too big, you are in trouble. By storing binaries in a file system or external distributed key-value store like riak, cassandra, hadoop etc, you are keeping your database small, which is good for performance, backups and avoiding horizontal scaling problems.

like image 159
Vagif Verdi Avatar answered Nov 16 '22 01:11

Vagif Verdi