0

I'm working on a project and I have been using MySQL as the primary database for a number of entities with their respective relations in place. The purpose of the project is to rate neighbourhoods in my hometown based on a number of criteria, one of which is house prices. I have an excel sheet with 36,000 + records of house sales, their prices and the lat and long of the house. A user will search a location, and a latitude and longitude will be calculated. I aim to return all the lat, long and house price values from the records of house sales within a radius of 1km so I can calculate the average house price for that respective area. Please see the screenshot below for a visual aid of what I'm talking about.

Screenshot of Application

Based on research it seems that maybe the PostGIS extension for Postgresql is the way to go as it has a lot of tools for querying data based on geographic criteria.

As I have a MySQL DB already in place and I have no intention of creating a relationship between the entities in that DB and the house prices in a potential Postgresql DB can I and/or is it possible to have 2 separate databases in one MVC spring project or should I include everything in just one DB?

Charles
  • 69
  • 11
  • You can use two database engines, I recomended you to add some ORM like hibernate to handle both connections and sessions. – mvlaicevich Jan 19 '18 at 12:59
  • @mvlaicevich thanks for the reply! Would you be familiar with a resource I could look at that might help to get me started on that. I have hibernate added already just unfamiliar with how I would get two database engines integrated into the project. – Charles Jan 19 '18 at 13:10
  • look at this: https://stackoverflow.com/questions/1921865/how-to-connect-to-multiple-databases-in-hibernate – mvlaicevich Jan 19 '18 at 13:11
  • @mvlaicevich can I have both MySQL and PostgreSQL listening on the same 8080 port? – Charles Jan 19 '18 at 13:37
  • Each connection has its own port for db connection, 8080 is for application, and yes, you can have both connections on same application running – mvlaicevich Jan 19 '18 at 13:39

0 Answers0