Examples of Gremlin queries with Neo4jClient - gremlin

I am building an ASP.NET application with Neo4j database so I am using Neo4jClient. I want to execute Gremlin queries, but I haven't been able to find good examples of writing Gremlin queries with Neo4jClient and C#. Everything I find are Groovy examples with Gremlin console, so I would appreciate if someone could write an example of a basic query in C#, just so that I can figure out how this works.

Neo4jClient no longer supports gremlin queries, if you try to do anything with the .Gremlin bits you'll see they are all marked as Obsolete and are likely to be removed in the near future.
If you really need to see examples, there are a couple of questions on here which have valid Gremlin queries (for example: neo4j - Issue converting gremlin query to cypher) or you could clone the old bitbucket neo4jclient repo and look through the wiki (Gremlin Wiki History).
Having said that all the examples I see use client.RootNode as the base point - this is meaningless (as far as I know) for a Neo4j 2+ as RootNode doesn't exist - and I have no idea what will happen if you try to use it.
If you can I would look at Cypher it's much much nicer and works brilliantly via the client.

Related

Expose RDBMS (SQLite) data as SPARQL endpoint

I am working on a demo for which I need to expose some data stored in the SQLite DB file as a SPARQL endpoint that can be queried. This doesn't have to be fancy at the moment just a way to expose static data as the RDF is fine for me.
I am wondering if anyone knows how to achieve this using any Open source or free tools available.
I understand that I might have to write r2rml mapping file and other configurations, however I am unable to find a way to do the same. I hear Apache Jena can do the trick, however can't find a good example on how to achieve this.
Does someone knows a good tutorial that shows how this can be achieved.
After looking at various options, i found http://d2rq.org/ as the most easiest way to expose my RDBMS data as SPARQL endpoit.
Please follow the documentation on the portal, which is very generous on explaining how this can be achieved.

Does Cosmos DB support Gremlin.net c# GLV?

I cannot find this information, and also I cannot find examples on how to use Gremlin.net c# GLV with a remote Cosmos DB graph. Someone knows anything about this? Thanks!
Currently CosmosDB does not support GLV's as they do not yet have Bytecode support. They have told me that they are working on it and expect it to be available soon.

How to display a query results from Open CMIS, Alfresco?

Newcomer to Alfresco and Web Development here, so bear with me. I've so far installed Alfresco and was able to use the Maven AMP archetype to create my own custom content model for the data I need to store in it. Now I need to access this data from an external site by querying the Alfresco repository.
I've followed what I can find on CMIS and was able to execute a query using curl and get the results I expect in a large XML stream. My colleague was having an uphill battle trying to interpret these results using Coldfusion. Now I searched around, and understand that to interpret these results and make the process a bit easier, it is better to use some kind of client like Open CMIS (or Chemistry, I'm still a bit confused on the terminology here).
We've so far tried the the PHP client, but received some errors from the xmlLoad function not reading 'nbsp' characters. PHP seemed like the easiest version to implement, though we're considering moving to Java if that works better. However, we've seen very scarce documentation on either end. Are there some better examples that we may have missed or maybe some other way to do this? Seems like this should be simple to implement, yet it's given us quite the stall due to the brick wall that Alfresco and CMIS seem to be.
If you don't want to use a library, the CMIS Browser Binding might work better for you. It returns JSON instead of XML.
Try:
http://<host>/alfresco/api/-default-/public/cmis/versions/1.1/browser?cmisselector=query&succinct=true&q=SELECT * FROM cmis:document
Shouldn't be a brick wall at all. Here are some resources:
The custom content types tutorial has a section on CMIS,
including CMIS queries which may be helpful to you even if you do not need custom types
The CMIS & Apache Chemistry book from
Manning is a good resource (disclosure: Florian and I co-authored it
along with another colleague, Jay Brown)
There are some Java examples on Google Code
There are additional resources and helpful links on the Alfresco CMIS page

Entity Framework vs Stored Procedures

I am only starting with Entity Framework and I appreciate the direct mapping of code to the tables in my database. What I do not see just yet is the practicality of having to use EF over stored procedures and I would appreciate anyone's opinion about this. I am not being lazy and I am searching this myself at the moment. Thought I can post the question and hear from others as well.
My case is EF being an ORM is most suited to mapping in the tables in my database. But in a live web server many requests can happen at one time that may be taxing the database in having to compile the text queries prior to executing them compared to just simply executing stored procedure which are pre-compiled already. EF can also map to SPs but I feel that this is somewhat diminishing the value of ORM.
I would really appreciate an eye-opener in this case.
You might find Jeff's commentary on the subject helpful: http://www.codinghorror.com/blog/2005/05/stored-procedures-vs-ad-hoc-sql.html.
His point is basically that stored procedure's can be seen as a kind of premature optimization, and you really should make sure this is the performance bottleneck in your application before going that route. For instance, there are frameworks available to mock up 1000's of simultaneous web requests to see how your database will really perform under load in one situation versus the other.
Just because EF isn't using sprocs, it doesn't mean that the parameterised queries it runs won't get compiled and cached. SQL Server has got a lot more clever about that over the years.
One possible approach:
- dynamic sql for single objects
- SPs for parameterized lists and orders
The value of the ORM is usually its simplicity in creating the object model. One approach is described here: http://www.codeproject.com/Articles/362034/Populating-a-business-logical-layer-from-stored-pr

WebFocus - is there a free/open source alternative?

What is a good free/open source alternative to WebFOCUS?
Is there an ASP.NET way of getting info from an OLAP cube?
Update: I chose Magnus Smith's answer as the correct one, but Alexmac's answer was also very good!
I am not aware of free analytical suite. But what is it you are trying to accomplish?
You can query an OLAP cube by using MDX queries with ADO.net.
http://msdn.microsoft.com/en-us/library/ms144785.aspx
You can then bind the results to a datagrid for example. MDX is a little like SQL but be careful as it has several syntax differences. I think Excel has a query tool you can use to graphically construct your queries which can be helpful.
On a related note look into SQL reporting services. With SQL express you can use a cut down version of sql reporting services that may accomplish what you are looking to do.
Watch out, MDX is horrible - nothing like SQL even though it looks like it is.
You can get a .NET control to show OLAP data on a web page. Our company tested one from Dundas that was OK. I never got involved though so I don't know if it was brilliant or merely serviceable.
http://www.dundas.com/Gallery/Chart/NET/index.aspx?ImgGroup=OLAP
We gave up on SQL Reporting Services as it was not suitable for Internet usage (fine on Intranet though).

Resources