Welcome,

You were on the right track, initially with making drives, folders, files 
classes and linking them together.  OrientDB's real power lies in its 
hybrid graph/database capabilities.  So, linking objects together allows 
you to access and query the data very quickly instead of having to retrieve 
one object, get the id you need, and then query the database again.

I'd have to see an example of the data and the query you used to try to 
understand why your results returned zero.

Another design idea: Often folders are also files, so your folder class 
could extend the file class and inherit its properties.

Don't forget that you can use a vertex as a document but add edges to it 
(instead of document links).  The DB will handle managing the links, and 
the links are bi-directional.

Are you planning to stick with SQL or also use the Java API?

Good luck!

-Colin

Orient Technologies

The Company behind OrientDB


On Thursday, March 12, 2015 at 3:56:58 AM UTC-5, Ghosty Huan wrote:
>
> Hi, I'm currently testing out Orientdb 2.0.2 by implementing a document 
> database that was originally designed for a rdbms. I do not have any old 
> data to import so if I was wondering if anyone has suggestions on the best 
> way to implement the following requirements specifically in Orient. I have 
> attempted using the online guide for migrating from an rdbms but it has 
> proved troublesome so I thought I would ask here and make sure I'm on the 
> right path or if Orient has a feature I'm overlooking.
>
> A simplified idea of my data is this:
>
> Drive
> =======
> driveID
> other properties...
>
> Folder
> =======
> folderID
> FK_driveID
> other properties...
>
> File
> =======
> fileID
> FK_folderID
>
> As for requirements:
> I need to be able to have join like behavior in queries. For example I 
> need to select files based on the properties of their parent folders/drives 
> or select drives based properties of their folders/files.
> I previously tried to do this with drives/folders/files as their own 
> classes with links inbetween as the 'migrating from rdbms' guide showed, 
> but when I queried a drive based on folder properties(or vice versa) it 
> would return 0 results. No clue why this happened because if I queried for 
> the links field in drive they were all correct references to records in 
> folder.
>
> I need to be able to insert new drives/folder/files with new links. When I 
> first browsed orientDB's documentation I did not realize that CREATE LINK 
> only affected existing data and to insert new data you must manually insert 
> a new link by querying for the correct RID to link. Is there is a way for 
> me to avoid this or avoid links altogether by embedding classes or some 
> other technique?
>
> So in summary, does anyone have a suggestion for a implementing this using 
> Orient's specific capabilities? If not, and the 'migrating from rdbms' 
> approach is correct then any clue why why my joined queries would return 
> zilch?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to