1. Jurriaan Schulman
  2. Valentina Database ADK
  3. Четверг, Август 11 2016, 06:38 AM
  4.  Подписаться через email
Hello,

I'm looking for a graph database to represent and store knowledge (like Cayley or Neo4j) which can be used with Xojo. Would it be possible to use Valentina for this kind of work, using records as nodes and binary links as edges?

Cheers,

Jurriaan
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Hi Jurriaan,

first point: about 10 years ago Nikon have choose Valentina DB for their photoApp.
They have use it few years at least.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Next point,

Valentina DB in contrast to many others, have very flexible BLOB fields.

1) BLOB is stored NOT inside of Table, but are separate logical files inside of DB.

2) BLOB fields are stored NOT inside of single big blob-storage, where all tables keep all blobs. Again, each BLOB field - is separate logical file.

3) Each BLOB field can have own segmentSize, which affect how optimal data are saved.
Thanks to this you can make e.g. 3 different BLOBs, one to keep small pictures, another to keep Big pictures.

4) VDB itself have JPG/PNG/TIFF compression algs, so you have choice, if you give this job to DB, or you can prepare compressed picture self, and save it as is.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
I'm looking for a graph database to represent and store knowledge (like Cayley or Neo4j) which can be used with Xojo.


Aha, it seems I have misunderstood you :)

You are asking about storing data and links between them.

Yes you are right.
You will need develop some own schema of db, to save data, and link them using BinaryLinks or ObjectPtr fields,

You can have vertical tables with self-recurson.

You can find useful our recursive SQL commands


And we can together discuss your tasks to choose best solutions.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Do you think about using it as LOCAL DB?
Then you can use direct API, without SQL btw.
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hi Ruslan

Thank you for your answers. Yes I was asking about the possibility to use Valentina to model and store a tree (graph) with nodes and edges.

This can be used for example to model the relationship between people, who they are friends with, what they like etc. Google, Facebook and others are using graph databases for this.

The interesting thing is that in graph databases, there is also information stored about the kind of relationship between objects in the edges ( = links), see picture from wikipedia:

https://upload.wikimedia.org/wikipedia/commons/3/3a/GraphDatabase_PropertyGraph.png

I was thinking Valentina's binary links may be used for this kind of links since they can store information (in contrast to links used by relational databases). Tables could be used as category/classes, e.g. "People" and the records as nodes (= objects).

I don't know if Valentina has optimzed algorithms to traverse such a graph and about the performance when using many records (objects) with many links to many other objects.

For instance would it be easy for Valentina to traverse a graph, when you have person A and you want to know all the friends of the (grand)children of person A?

Cheers,

Jurriaan
Ссылки
  1. https://en.wikipedia.org/wiki/Graph_database#/media/File:GraphDatabase_PropertyGraph.png
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Yes, I already have understood what you want.

1) Valentina DB is not positions as "graph db", but IMO this definitions are quite conditional.
Lets look on Cayley

Cayley is a spiritual successor to graphd; it shares a similar query strategy for speed. While not an exact replica of it’s predecessor, it brings it’s own features to the table:
• RESTful API
• Multiple (modular) backend stores, such as LevelDB and MongoDB
• Multiple (modular) query languages

LevelDB -- is pure KeyValue storage.
MongoDB - is JSON-format oriented db

OVER this they claim they have build graph-db. Well, okay :)


2) again, Valentina DB current positioned as Object-Relational.

Can you use it to simulate graphDB? I think yes. Why not.

Just they have spend time to build tools (e.g. QueryLanguage) to look as general-use-db-tool.

You need develop I guess some App/Solution.
You can just use Valentina Model and power.


3) btw, just in last days we thinking about adding into Valentina DB - pure KeyValue feature.
Why not, may be somebody will find it is useful to have in the same DB as normal Tables, so one or few Key-Value things to keep there something.

more in the next answer...
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
I don't know if Valentina has optimzed algorithms to traverse such a graph and about the performance when using many records (objects) with many links to many other objects.



Well, I think our BINARY LINKS, and our feature todo Recursive Searches on any levels down, up, side, are so powerful, that not doubts here :)

Our BinaryLinks work faster than Relational ULONG - ULONG link based on PK-FK
Right?

And I always was and I am skeptical to KeyValue Storage as UNIVERSAL storage, to keep complex structures.

And I always was and I am skeptical to MongoDB, which keep data in TEXTUAL format of JSON. This can be faster of direct pointers? :)

Mongo have some win for special tasks, when one user have data, separate from data of other user. So they can scale to hardware. But excuse me, such scale you perfectly and easy can do with RDBMS (postgreSQL, mySQL, MS SQL, VDB).

Format of some file, such as JSON or XML, cannot be base of DB. Remember in about 2000 year how many noise was about XML-based databases, and how they will kill relational. Three times HA HA HA :) Where XML dbs today?

I think the same story expects the "JSON-boom".

Relational DBs will add COLOMN of JSON type, as some did with XML type, and that is enough.

XML/JSON - are text formats, perfectly can be used for exchange of data
BETWEEN DBs, DB and user, ...
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
About Links in a graph-DB.

I think it is obvious that not LevelDB, not MongoDB have this feature.
So they have implement it in some artificial way

The same step must be done in your case over relational Tables + Links.
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hi Ruslan,

thank you for your explanations, they were vere helpful. I think, Valentina is the right database for the projects I have in mind.

The KeyValue feature you mentioned sounds interesting. Are you thinking about KeyValue as "objects" which can be linked with binary links? If you decide to implement this feature, how long would it take before we can use it in Valentina? Months, years? ;)

Cheers,

Jurriaan
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Are you thinking about KeyValue as "objects" which can be linked with binary links?


Perfect question :)

Frankly saying I did not think so deeply yet.
In ideal we'd need to have some integration of this "thing" to others.

ANSWER: KeyValue storage can keep, as known, normal table with horizontal rows. So if we define some part of key as RecID, then we can use that in links.


2) We also thinking about adding into VDB

a) BinaryLinkWithOrder -- 80% done.

b) VARIANT - column type.

c) Inheritance

others ...

Just each such feature requires a lots of job and challenge :)
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
KeyValue should not be hard, so I can hope about 2 months...

than more, that here we not going invent something own,
we can just copy ideas of e.g. LevelDB.
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hello Ruslan,

after reading the documentation, I have a few questions.

1) is it correct that if I want to do a hierarchical query with Valentina that this is only possible when the linked objects are of the same class (table)?

2) is it correct that I must use SQL for hierarchical queries (there are no API methods for this)?

3) is it correct that when I want to do a Hierarchical query on linked objetcs of different classes (link between tables), I have to implement this myself in the application code? Would it be possible to add methods for this in a future release of Valentina?

Cheers,

Jurriaan
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Hi Jurian,

1) yes

2) API is easy enough todo yourself.
SQL is important for client-server, when the whole query should run on server side

API is better for LOCAL or localhost dbs.


3) yes correct.
Well, if we discuss and you will show HOW this can be possible, yes we can implement that.

Btw, I not remember - you going have local db or client-server?

Note, that Valentina have stored procedures, some logic can be programmed there, and become part of db schema.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Hi Jurian,

We did good progress with KeyValue

Would you like read article in its current state?
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hello Ruslan,

yes, of course I would like to read the article.

Regards,

Jurriaan
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Please check your inbox on this forum,
I have sent URL there
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hello Ruslan,

I've read the linked article. Can I ask questions about it here?

Regards,

Jurriaan
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
For now please use that private-private channel

Also we will try to setup BETA section for beta testers,
where we will be able discuss upcoming features.
I see Lynn already have create this category in this forum.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
I have provide detailed answer in the new thread Graph Database with Valentina - ANSWER
Комментарий
There are no comments made yet.
Jurriaan Schulman Ответ принят
Hello Ruslan,

If I want to map a directed graph in Valentina, what would be the best way to store/retrieve which is the tail (record) and which is the head (record) of a binary link between two records?

Jurriaan
Комментарий
There are no comments made yet.
  • Страница :
  • 1
  • 2


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories