Using undirectional Relation query patterns - cypher

The Neo4J reference says all Relation are directional. But in the Cypher section, the Relationship syntax says both directional an undirectional patterns are used (page 11 in Neo4j Developer Manual 3.0).
Even after looking at the Cypher query examples, I still don't understand what
a undirectional Relation pattern means.
Can someone explain?
Thanks.

Related

what are meta-models in CDS views?

while understanding CDS views,I've come across something like 'meta-model' could anyone please explain me what does it mean?
Thanks in advance.
Not an official term.
Guess you're refering to its usage in the article ABAP Core Data Services – Introduction (ABAP CDS view)?
The article uses the term "meta model" to refer to annotations in CDS views. Annotations describe the meaning, application, and properties of entities, fields, and associations in CDS views.
For example, an annotation might say that an association joins a text for a code field or that a field should be used for fuzzy search.
While the select and calculations in the CDS view tell you how to produce the actual data (= the model), the annotations tell you how to interpret that data (= the meta model).

bushy, left-deep and right-deep in SQL

I searched for the terms bushy, left-deep and right-deep after I saw them in the context of query plans in SQL.
I have found some entries but still don't understand the differences between those. May you explain me what it's about?
Edit:
I'm self-studying SQL and want to improve in this topic. I'm working with Sybase and started now to use Joins. I saw a description of these terms on this page http://dbakevlar.com/2014/05/right-deep-left-deep-and-bushy-joins-in-sql/ but the symbols and vocabulary is above my level at the moment. It's not about a special query, I just want to have a rough understanding to know how to differentiate those terms.

What is the difference between SQL Mapping and an ORM?

I cannot find the difference between to two in my search on SO. Can someone explain the difference to me? I feel pretty confident on my understanding of an ORM. But I do not know what SQL Mapping is, and therefore how it is different from an ORM.
I am using Java if it matters.
I control all of the database.
Is there an example of a small understandable SQL Mapper I could look at?
EDIT: I really do not want to embed SQL in my code. That's the devil.

How to index relationship properties in Neo4J in an easy way

I want to index the existing relationship properties in Neo4J (2.0.1) and also to set up automatic indexing for the ones that will appear in the future.
I found out that it's possible to do that in Neo4J documentation through the legacy auto-indexing as well as the examples of some Java code.
However, as I'm neither an expert in Java, nor want to use "legacy" functionality, I wanted to ask you if there is an easy way to index relationships on a specific property using Cypher command or any other way (rest API?) that wouldn't involve me having to write some Java program and run it (I don't know how to do that).
Thank you for your help!
My original answer was wrong. Editing so that it doesn't generate confusion to others looking for a solution.
Please refer to Relationship Labels and Index in Neo4J a for correct answer, as #deemeetree pointed out in the comments.
Since Neo4j 4.3 (released June 17, 2021), creating relationship property indexes can be done directly with Cypher, as discussed on the Neo4j blog and the 4.3 release notes.
Example from the blog:
CREATE INDEX officerRelationshipProperty
FOR ()-[r:OFFICER_OF]-()
ON (r.role);
You can't do indexing on relationship. Indexing is done only on nodes.

How to design a database for efficient search-ability?

I am trying to design a database with search-ability at its core. My knowledge of database design and SQL is all self-taught and still fairly beginner-level, so my questions may possibly have easy answers.
Suppose I have a single table containing a large number of records. For example, suppose that each record contains details of a different computer application (name, developer, version number, etc). A list of keywords are associated with each record, such as a list of programming languages used to write the applications.
I wish to be able to enter one or more keywords (each separated by a space) into a search box, and I wish to have all associated records returned. How should I design the database to store the keywords, and what SQL query would I need to apply to the search text? (The search should be uppercase/lowercase independent.)
My next challenge would then be to order search results by relevance, and to allow entire key-phrases as well as keywords to be associated with each record. For example, if I type "Visual Basic" into the search field, I want the first results to have exactly the key-phrase "Visual Basic" associated with them. The next results should all have both keywords "Visual" and "Basic" associated with them, and the remaining results should have only one of these keywords. Again, please could anyone advise on how to implement this?
The final challenge I believe would be much harder: how much 'intelligent interpretation' can I design my database and SQL code to handle? For example, if I search for "CSS", can I get the records with the key-phrase "Cascading Style Sheets" to appear? Can I also get SQL to identify and search for similar words, such as plurals of search phrases or, for example, "programmer" or "programming" when "program" is input? Thanks!
Learn relational algebra, normalization rules, and SQL.
Start with entity relationships. Sounds like you could have an APPLICATION table as parent for a FEATURE child table, with a one-to-many relationship between the two. You'll query them by JOINing one to the other:
SELECT A.NAME, F.NAME
FROM APPLICATION AS A
JOIN FEATURE AS F
ON F.APP_ID = A.ID
Your challenges would not suggest SQL and relations to me. I would think more in terms of a parser, an indexer and search engine like Lucene, and a NoSQL document database like MongoDB.
I've come to the conclusion, after a LOT of research, that #duffymo's answer is hinting in the right direction. For the benefit of other n00bs like me, here's the conclusion I've drawn:
Many open source search engine server apps are out there to install for free. Lucene was the first I had ever heard of them, but others do exist and I think my favourite at the moment is Sphinx. As far as I can tell, the 'indexer' that #duffymo mentions is built into it. I have learnt that the indexer is the program that will examine my database for keywords and will automatically keep a record of which results should be returned for different input queries. I have also now learnt that the terminology for the behaviour I was looking for (and which Sphinx has) is 'stemming'. I'm still not sure what role a parser plays in all this...
A more basic approach would be to use SQL itself. Whilst I was already aware of the most basic of these (ie. using the LIKE keyword with 'wildcards'), I also discovered something a little more powerful: natural language / full-text search. For anyone not interested in installing a server app, I recommend you look this up.
Also, I see no reason why I would need to use NoSQL instead of SQL (as #duffymo has suggested), and so I'm going to stick with SQL for the moment (at least until I come across some good entry-level books to learn NoSQL from). Furthermore, I have very little intention to learn relational algebra until I know why I should and how it would be useful. The message here is that other beginners shouldn't be off-put by these things, as I don't think Sphinx requires any knowledge of them.
while I like #duffymo's answer, I will also suggest you research SPARQL and the wordnet project for your semantic equivalence questions.
If you choose Oracle, you can use the spatial option triple store to implement the SPARQL endpoint and do some very nice seaching like your css = Cascading Style Sheet example.