SmartGWT Hibernate Datasource setup for Google Cloud SQL GAE - google-app-engine

I am looking for an example of a project where a SmartGWT Hibernate Datasouce is connected to a Google Cloud SQL database using GAE as the server. I would be surprised to be the first one in this world to have attempted.

We'd recommend using SQLDataSource instead (simpler, faster, more flexible). Google documents appropriate JDBC settings here:
https://developers.google.com/appengine/docs/java/cloud-sql/developers-guide#use_with_lang
SmartGWT documents how to provide JBDC settings to SQLDataSource here:
http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/SqlSettings.html
You would use MySQL as the database type since CloudSQL is MySQL-compatible.
If you choose to use Hibernate, we haven't tried this, but presumably the same JDBC settings can be provided to Hibernate - see Hibernate docs.

Related

Which database engine type should be specified for Microsoft SQL Database in Laravel?

I am working on a web application using OctoberCMS which sits on Laravel 5.5.40 and is using a Microsoft SQL Database.
Database migrations are managed using the standard Blueprint objects which allow a database engine to be specified. Currently all the migrations are using InnoDB, which I believe is only supported by MySQL.
Does this mean that the engine type is being ignored? Also is it possible to specify different engine types for Microsoft SQL Database tables and what options are available?
The concept of "database engine" or "storage engine" is quite specific to MySQL; most database systems have a single back end which everything is built on. There are sometimes special types of database or table for specialist circumstances - e.g. adapters for importing data from other systems, or column-oriented stores for analysing large data sets - but they're rarely encountered.
For Microsoft SQL Server, there really isn't an equivalent option you need to specify. There may be other options you can set about how to configure the table for performance, but I would expect the ORM choose reasonable defaults and there isn't a single parameter with lots of tradeoffs like changing a MySQL engine.
Laravel (latest version at least) supports the following databases:
Currently, Laravel supports four databases types as per the doc: https://laravel.com/docs/7.x/database#introduction
MySQL 5.6+, PostgreSQL 9.4+, SQLite 3.8.8+, SQL Server 2017+
Each drivers are fully compatible with Eloquent, including Migrations
Therefore, in your database config file use 'default' => 'sqlsrv', and you should be good to go 👍

How can I add Salesforce as a data source in Datagrip?

I use Datagrip for SQL development. Recently I've had to work with Salesforce SQL (aka SOQL), but there doesn't seem to be an IDE as useful as Datagrip.
So: I'd like to add Salesforce as a data source to Datagrip, just as I would a Postgres or MySQL database.
Is this possible to do, with an extension or otherwise?
I know https://jetforcer.com/ exists, but it seems to fall short on two counts:
(a) it's apparently just a UI that lives in JetBrains apps, so I don't think it'd fit as seamlessly in Datagrip workflow as I'd like
(b) It costs $60. I don't need to do any actual Salesforce development, so paying $60 just to run queries against Salesforce isn't ideal.
DataGrip can support any database that have JDBC driver.
First of all, you need to find JDBC driver for the database. In your case that can be:
http://reliersoft.com/download/salesforce-jdbc-driver/
Then follow the instructions of generic-JDBC data source configuration:
https://www.jetbrains.com/help/datagrip/connecting-to-a-database.html#vertica_as_unsupported_dbms
URL should be like jdbc:sforce://<hostname>
(More options are available in driver's docs http://reliersoft.com/salesforce-jdbc-driver-documentation/)
After that you can run queries and view data.
If something does not work as expected, please file an issue in our bug tracker

How to connect Solr 4.4.0 to java application i have created and search data?

I am new user to solr,I want to access and search the MYSQL database tables in java applications via solr.i am able to index my table in solr admin interface. Can anyone tell me how to connect and access MYSQL tables in java application so that i can search data fastly ? I was not able to understand tutorials whatever i found.
Solr provides client libraries in java, ruby and other languagues to help you connect to Solr and query it.
Check for the Java library Solrj to connect and query Solr.
If you are using Frameworks with your projects you might want to check for Spring data as well which will help you seamlessly query and transform Solr response.
So you will need to set up an instance of a Solr Server, SOlr will store and indexes from your database using the DataImportHandler.
http://amac4.blogspot.co.uk/2013/08/configuring-solr-4-data-import-handler.html
Solr creates indexes using Lucene, so you have two options, you can use classes from the Lucene jar file or SolrJ to search your indexes.
OR
You can query Solr by sending http requests. I set-up a Java Web Service so you can snatch some of my code if you need to.
http://amac4.blogspot.co.uk/2013/07/restful-java-web-service-for-solr.html

how to query SQL Server via REST to get XML

We have been using a web application framework to build apps that need to be able to query a SQL Server database and get the results as XML.
In the past, the framework provided that capability. But that capability is now deprecated.
So we were thinking, the framework allows us to easily query a REST service over HTTP, so why not use a SQL Server HTTP Endpoint. However, we then read that HTTP Endpoints are deprecated, as of SQL Server 2008. Not a platform on which to design an architecture for the future.
Azure (formerly SQL Data Services) was going to offer similar services, but now only supports the TDS protocol, not http. So no REST to be found in Azure.
The suggested alternative is to develop a custom app using WCF Data Services (formerly ADO.NET Data Services). But that would mean a whole additional app to develop, deploy, and maintain, presumably with its own authentication setup separate from SQL Server's, and its own source code repository... using a technology we have no experience with, therefore with its own pretty deep learning curve.
Can you suggest any other way to query a SQL Server database via REST/HTTP, that is not deprecated, and that would return results as XML?
Thanks for any help.
Read here: Creating an OData API for StackOverflow including XML and JSON in 30 minutes. Basically, the road forward is for REST to be offered by app layer (WCF powering EF that provides the OData mapping). IMHO straight HTTP access into the engine was a very bad idea to start with, nobody liked the HTTPEndpoints of SQL Server 2005 and they were as misguided as it gets. One cannot map the HTTP error model, security, type system into SQL and expect a smooth interoperability. Having the HTTP layer live in a dedicated app pushes the responsibility of handling the HTTP ecosystem into a component specialized in that (WCF), and the logic of mapping the REST model to the DB model ina component specialized in that job (EF).
It sounds like you may be wedded to an MS stack but if you're not, you can use restSQL in a Java EE container (Tomcat, WebLogic, etc.) on top of MySQL or PostgreSQL. restSQL has a full HTTP API with JSON or XML encoding. It offers two twists: updatable composite views and hierarchical composite views. The framework is extensible to other databases and addition of SQL Server is in its supported evolution. Check out http://restsql.org.
Another option is something like Dreamfactory. They have a SOAP to REST solution that allows you to connect to any database or service. I have used their free hosted solution in the past for projects. They also have an open source solution available. The cool thing about the service is that they use Swagger 3.0 to create service definitions in a nice front-end solution so you can test and create new endpoints.
I have used the OpenAPI 3.0 definitions to connect to 3rd party SOAP and REST services as well. They also support stored procedures and server-side scripting in the SQL Server environments.
Anyways, might be another option for you.

Google Big table

I created one project.i want to use google Big table as my database.
so that i used JPA datastore.I created one JPA program(using eclipse) in that i selected ODBC database.I display lot of option like MySQL etc.. What option i select to interact with Bigtable.
Yes, you an use JPA with App Engine's data store. There is no connection to MySQL.

Resources