Relationship between 2 folders - Alfresco - relationship

I'm reading the book AlfrescoCMIS, and the book refers a creation of a relationship between two folders in Alfresco. I run the code and I don't understand what is in fact this relationship, can anyone help me to understand what is a relationship between two folders or between two files?

A relationship or association is a link between two objects. A concrete example is "related documents". Suppose you create a PDF in your CMIS repository and that PDF is related to N other PDFs. You'd like to be able to ask that PDF for all of its related documents. So, one way to implement that is to create a "related documents" relationship between the source PDF and all of its related PDFs.
Relationships are typed, so you can define any kind of relationship that makes sense for your requirements.
My example describes a relationship between documents, but relationships can be created between folders and between folders and documents as well.
For a more detailed discussion on relationships, please refer to relationships section in the CMIS specification.

Related

Mapping DMN table to a OWL ontology

As part of my research, I have been working on a DMN table and OWl ontology. I must map rules from the DMN table into an OCQA web ontology file and work later with SHACL to infer some rules.
In this process, as an initial step recently, my supervisor gave me a hint to map the DMN table with OWL.
His message:
"``https://www.omg.org/spec/DMN/1.2/About-DMN
You find an rdf specification on the bottom of the page.
First, you have to define the dmn schema in owl. Then you can directly define or import a dmn table into owl. Or you use the rdf schema."
I have very little idea about semantic web technology. So I studied some documents or tutorials and understood that classes, individuals, and relationships (object properties, data prop) made an ontology. Like this, I did practice an example development in Protege software also.
After his reply, I started to read what is an rdf scheme or OWL schema. But unfortunately, I didn't go further.
Can someone help me to understand the schema or help me define a relevant schema for the DMN table, as my supervisor suggested?
What should I do to define a schema? Is this nothing but making classes and individuals with relations or creating some placeholders and then getting them from the mapping of DMN? I am clueless. Should I use RDFPY library to do all these things?
"Stackoverflow is not supporting uploading DMN file. it is nothing but data in XML. below is the picture"
enter image description here DMN table for quality checks of a concrete curing method
Please, someone, help me to go further.
I would suggest making your schema in Protege. Your schema (ontology) will have a set of classes and properties between. Some ontologies will have named individuals, some will separate the named individuals out of the ontology. This is generally A-Box vs T-Box.
Personally, I use rdflib for python development but performance isn't great. For better performance you can use the redland python bindings - but it's a pain in the ass to work with.
As for your table... This is mostly an exercise in mapping from a relational data structure to a graph data structure. Each row represents a node of type 'Inspection' and has relations to the columns. For example consider the pseudo rdf,
Inspection_A rdf:type Inspection
Inspection_A hasActivity "Curing"
Inspection_A hasApprover "Site Engineer"
tldr; Your ontolgoy should have classes and relations (T-Box). Then in a separate file create instances of the classes (A-Box). T-Boxes will most likely be .owl files while the A-Box is turtle, nquads, json-ld, etc. When you load the two together in a graph database, it should be able to take the definitions in your T-Box and reason over your A-Box. You can use rdflib for programatically working with RDF. Your task is to map a table to a graph. The columns are relations, and table name is a class.

Can I nest (combine) two Entities that share same roles? ORM

I am super beginner of IT and currently studying very basic of ORM before studying mysql.
My question is as the title said, is it possible (correct) if I combine the roles (binary boxes) because they have same roles which is 'studied in'. Actually I'm not sure they are binary relationships. Should I modify as Ternary?
Thank you a lot in advance.
Take a look at this reference image.
Yes you can, it is called many-to-one or one-to-many relations, where A contains multiple instances of B, but B contains only one instance of A.
For further understanding I suggest to take a look at this documentation.
The example is made with an User and a Photo.

Neo4J: Binary File storage and Text Search "stack"

I have a project I would like to work on which I feel is a beautiful case for Neo4j. But there are aspects about implementing this that I do not understand enough to succinctly list my questions. So instead, I'll let the scenario speak for itself:
Scenario: In simplicity, I want to build an application that will allow Users who will receive files of various types such as docs, excel, word, images, audio clips and even videos - although not so much videos, and allow them to upload and categorize these.
With each file they will enter in any and all associations. Examples:
If Joe authors a PDF, Joe is associated with the PDF.
If a DOC says that Sally is Mary's mother, Sally is associated with Mary.
If Bill sent an email to Jane, Bill is associated with Jane (and the email).
If company X sends an invoice (Excel grid) to company Y, X is associated with Y.
and so on...
So the basic goal at this point would be to:
Have users load in files as they receive them.
Enter the associations that each file contains.
Review associations holistically, in order to predict or take some action.
Generate a report of the interested associations including the files that the associations are based on.
The value for this project is in the associations, which in reality would grow much more complex then the above examples and should produce interesting conclusions. However. if the User is asked "How did you come to that conclusion", they need to be able to produce a summary of the associations as well as any files that these associations are based on - ie the PDF or EXCEL or whatever.
Initial thoughts...
I also should also add that this applicatoin would be hosted internally, and probably used by approx 50 Users so I probably don't need super-duper, fastest, scalable, high availability possible solution. The data being loaded could get rather large though, maybe up to a terabyte in a year? (Not the associations but the actual files)
Wouldn't it be great if Neo4J just did all of this! Obviously it should handle the graph aspects of this very nicely, but I figure that the file storage and text search is going to need another player added to the mix.
Some combinations of solutions I know of would be:
Store EVERYTHING including files as binary in Neo4J.
Would be wrestling Neo4J for something its not built for.
How would I search text?
Store only associations and meta data in Neo4J and uploaded file on File system.
How would I do text searches on files that are stored on file server?
Store only associations and meta data in Neo4J and uploaded file in Postgres.
Not so confident of having all my files inside DB. Feel more comfortable having all my files accessible in folders.
Everyone says its great to put your files in DB. Everyone says its not great to put your files in DB.
Get to the bloody questions..
Can anyone suggest a good "stack" that would suit the above?
Please give a basic outline on how you would implement your suggestion, ie:
Have the application store the data into Neo4J, then use triggers to update Postgres.
Or have the files loaded into Postgres and triggers update Neo4J.
Or Have the application load data to Nea4J and then application loads data into Postgres.
etc
How you would tie these together is probably what I am really trying to grasp.
Thank you very much for any input on this.
Cheers.
p.s. What a ramble! If you feel the need to edit my question or title to simplify, go for it! :)
Here's my recommendations:
Never store binary files in the database. Store in filesystem or a service like AWS S3 instead and reference the file in your data model.
I would store the file first in S3 and a reference to it in your primary database (Neo4j?)
If you want to be able to search for any word in a document I would recommend using a full text search engine like Elastic Search. Elastic Search can scan multiple document formats like PDF using Tika.
You can probably also use Elastic/Tika to search for relationships in the document and surface them in order to update your graph.
Suggested Stack:
Neo4j
ElasticSearch
AWS S3 or some other redundant filesystem to avoid data loss
Bonus: See this SO question/answer for best practices on indexing files in multiple formats using ES.

What NoSQL database to use?

I am developing an app that has many-to-many relationship between its entities and also need to store files (pdfs, emails, images, etc). I will be using Java code. I would like to know which NoSQL database to use. I was thinking of using Neo4J for the many-to-many relationship with gridfs to store the files. Has anyone done something like this before? Need to store the complex relationship between entities and also files (which can be huge.. 16MB-1ooMB).
Not sure that i help you, but i try to use mongo for model many-to-many.
And my experience is terrible...
because, official mongo documentation says: for model many-to-many use DBRef.
And when i use DBRef i need dereference my documents references.
And i don't found any working example how to do it....
I wrote own - but it provides many bugs...
Perhaps i'm looser, and don't understand how works with it, but i think when you will be look to mondo think about it.

Name of a document which provides information about the database logical design?

I've been looking around for a while but didn't happen to come across any official name (not even an unofficial one) of a document that summarizes all the tables in the database structure including the field names and a brief description of the purpose of this field within the table.
Does such a document actually have an official or commonly used name? I made one to help myself understand the current database design of a company while designing the new one, and also made one of the new database to help others understand the new database design for the company. If this kind of document has an official name then I could have a look in a certain document to ensure mine meets the requirements for it and making maybe more informative/professional.
The document is formally called Data Dictionary.
A platform-specific example is Data Description Specifications (DDS) that allow the developer to describe data attributes in file descriptions that are external to the application program that processes the data, in the context of an IBM System

Resources