Hibernate Spatial 5 and MySQL 5.7 - hibernate-5.x

I'm using Hibernate Spatial 5.0.7 and MySQL 5.7.
I need to use MySQL ST_* precise spatial operators, in order to do that I apply MySQLSpatial56Dialect, however if I use this dialect the Geometry datatype isn't correctly retrieved from the database. This didn't happen while using a version of MySQL 5.6.
I'm missing something?

Best to create a bug ticket for this in the Hibernate ORM issue tracker. Be sure to provide a stack trace.

Related

SQL builder for CockroachDb

Try to find any SQL builder library that support CockroachDb and work well with spring-boot-webflux, spring-data-r2dbc. Or at least library that will just write dynamic SQL statement as string for me that I will provide to database client executor.
Native spring-data-r2dbc DatabaseClient API don't support join statements (https://docs.spring.io/spring-data/r2dbc/docs/1.0.x/reference/html/#r2dbc.datbaseclient.fluent-api.select) that's why I need another way how to write non-plain dynamic SQL.
JOOQ don't support CockroachDB yet(https://github.com/jOOQ/jOOQ/issues/8545).
Is there any library that will fit to my expectations?
PM at Cockroach here. We are working with the team at jOOQ to provide a CockroachDB support in the next few months. In the meantime, you can use pgjdbc with something like JDBI to do query bindings. We are also working on a CockroachDB dialect for Hibernate but you can use the current Postgres dialect as well.

DHIS2 and mysql?

The DHIS2 documentation mentions that it supports mysql (https://docs.dhis2.org/2.28/en/implementer/html/installation.html), however thats the last point mysql is ever mentioned.
Does the current version really support mysql? If it does, will GIS still work?
From direct dhis2 support email...
Up until and including version 2.28, mysql should work.
However, from version 2.29 we require PostgreSQL as the database platform, together with the PostGIS spatial extension. This means that MySQL is no longer supported.
The minimum version required is PostgreSQL 9.1. However we recommend upgrading to a later version as we plan to take advantage of some of the useful features part of PostgreSQL 10 such as logical replication and native partitioning in future versions of DHIS 2.
First of all it is recommended to use postgres.
Secondly most of the testing and QA is done on instances with postgres.
Thirdly POST GIS extension is available only in postgres , which can cause a hurdle for you at later stage.
Fourthly , the GIS data points and boundaries are stored in a format which is better handled in postgres db structure.
Therefore please go with postgres and chill

Open source SQL connector for NoSQL (like MongoDB) [duplicate]

After seeing this image:
http://2.bp.blogspot.com/_T-uXeKcGTnM/TIdoKBGwk9I/AAAAAAAABcs/CLW3_cRlN78/s1600/tumblr_kxovt0VLZy1qappj8.png
I wonder is exists any tool for translating SQL querys into MongoDB map/reduce query model??
Larger version of the image: http://rickosborne.org/download/SQL-to-MongoDB.pdf
Update to the question asked in Jan 2011:
A couple of sites exist now to convert sql to mongodb.
Convert MySQL Queries to MongoDB Syntax
http://www.querymongo.com/
And
Convert sql to mongodb
http://klaus.dk/sqltomongodb/
The simple anwser? No.
The slightly more complex anwser is some people have had luck translating more complex SQL to Mapreduce functions ...
http://rickosborne.org/blog/index.php/2010/02/08/playing-around-with-mongodb-and-mapreduce-functions/
http://rickosborne.org/blog/index.php/2010/02/19/yes-virginia-thats-automated-sql-to-mongodb-mapreduce/
However, that said ... generally speaking you might as well learn mapreduce properly because if the data is in MongoDB already ... you'll really need to know how to properly query MongoDB to get anything meaningful done!
MongoDB has wonderful and helpful docs http://www.mongodb.org/display/DOCS/Advanced+Queries
As well as an easy to use online tutorial: http://try.mongodb.org/
The simple answer: Yes. Hibernate OGM - JPA for NoSQL.
JPA is Java API for mapping objects to data stores.
It includes JPQL, a query language similar to SQL which adds the OOP concepts. It's not SQL, but you don't want pure SQL - that was designed for the relational paradigm.
Hibernate OGM proposes to simplify the programming model by embracing JPA/Hibernate APIs and semantics to store data in NoSQL stores like JBoss Enterprise Data Grid instead of the traditional RDBMS. (source)
Also see this Hibernate OGM: JPA for NoSQL talk by Hardy Ferentschik
Recently I happened to see this website mongoquery.com, you can try it.
You can use free sql to mongodb converter like: https://rapidapi.com/ariefsam/api/easy-sql-to-mongodb-aggregation/
Just to add to the last comment
re:The simple answer: Yes. Hibernate OGM - JPA for NoSQL.
JPA is Java API for mapping objects to data stores.
It includes JPQL, a query language similar to SQL which adds the OOP concepts. It's not SQL, but you don't want pure SQL - that was designed for the relational paradigm.
There is a company called UnityJDBC that has released a JDBC driver for Mongo that allows you to run SQL queries against mongo in any java application that supports JDBC.
you can download this driver free at
http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php
hope this helps
You can also http://teiid.org which gives full range of SQL based access to MongoDB. You can use SQL through JDBC/ODBC or use REST/ODATA based access to MongoDB. Teiid uses MongoDB's aggregation framework to provide advanced SQL MongoDB query conversation.

sql query to mongodb?

After seeing this image:
http://2.bp.blogspot.com/_T-uXeKcGTnM/TIdoKBGwk9I/AAAAAAAABcs/CLW3_cRlN78/s1600/tumblr_kxovt0VLZy1qappj8.png
I wonder is exists any tool for translating SQL querys into MongoDB map/reduce query model??
Larger version of the image: http://rickosborne.org/download/SQL-to-MongoDB.pdf
Update to the question asked in Jan 2011:
A couple of sites exist now to convert sql to mongodb.
Convert MySQL Queries to MongoDB Syntax
http://www.querymongo.com/
And
Convert sql to mongodb
http://klaus.dk/sqltomongodb/
The simple anwser? No.
The slightly more complex anwser is some people have had luck translating more complex SQL to Mapreduce functions ...
http://rickosborne.org/blog/index.php/2010/02/08/playing-around-with-mongodb-and-mapreduce-functions/
http://rickosborne.org/blog/index.php/2010/02/19/yes-virginia-thats-automated-sql-to-mongodb-mapreduce/
However, that said ... generally speaking you might as well learn mapreduce properly because if the data is in MongoDB already ... you'll really need to know how to properly query MongoDB to get anything meaningful done!
MongoDB has wonderful and helpful docs http://www.mongodb.org/display/DOCS/Advanced+Queries
As well as an easy to use online tutorial: http://try.mongodb.org/
The simple answer: Yes. Hibernate OGM - JPA for NoSQL.
JPA is Java API for mapping objects to data stores.
It includes JPQL, a query language similar to SQL which adds the OOP concepts. It's not SQL, but you don't want pure SQL - that was designed for the relational paradigm.
Hibernate OGM proposes to simplify the programming model by embracing JPA/Hibernate APIs and semantics to store data in NoSQL stores like JBoss Enterprise Data Grid instead of the traditional RDBMS. (source)
Also see this Hibernate OGM: JPA for NoSQL talk by Hardy Ferentschik
Recently I happened to see this website mongoquery.com, you can try it.
You can use free sql to mongodb converter like: https://rapidapi.com/ariefsam/api/easy-sql-to-mongodb-aggregation/
Just to add to the last comment
re:The simple answer: Yes. Hibernate OGM - JPA for NoSQL.
JPA is Java API for mapping objects to data stores.
It includes JPQL, a query language similar to SQL which adds the OOP concepts. It's not SQL, but you don't want pure SQL - that was designed for the relational paradigm.
There is a company called UnityJDBC that has released a JDBC driver for Mongo that allows you to run SQL queries against mongo in any java application that supports JDBC.
you can download this driver free at
http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php
hope this helps
You can also http://teiid.org which gives full range of SQL based access to MongoDB. You can use SQL through JDBC/ODBC or use REST/ODATA based access to MongoDB. Teiid uses MongoDB's aggregation framework to provide advanced SQL MongoDB query conversation.

Is it Possible to Migrate a Database from SQL Server to PostGresQL using Nhibernate?

Basically, I just want to know if its possible to use Nhibernate to migrate between databases?
No, you must use some other tool to do the migration, and then you can continue to use nHibernate (the level of compatibility will depend on your code)
Tools:
Full Convert
MS2PG