<html><head></head><body>Beyond just PostGIS, postgresql is a much better database on most fronts than mysql.<br>
<br>
If you have two tables, one with geometries and one with densities, they both need to have the same id somewhere. Once you have the join key, you can perform a join , not a union, to get a result set containing both the geometry and the density. You can use raw SQL in qgis, but I tend to create a view in the database based on the query and the qgis will treat that as a table, more or less.<br>
<br>
Jim<br><br><div class="gmail_quote">On August 1, 2016 7:35:18 PM EDT, Chuck Young <wylie1066@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div><div><div>I have been using databases for years and have used QGIS since 1.8 for general mapping. I know it can use additional data attached to the geographic data via a union query to display lots of different things. I have map areas where population density would be nice to display using different background fill colors bases on that density. I just need a bit of a boost getting the idea as to how to start and which way to go.<br /><br /></div>I have been using the program with SpatiaLite database. Do I need to go tto the PostGis db? Most of my other data is currently in MySQL. <br /><br /></div>Thanks for amy advice / guidance!!<br /><br /></div>Chuck<br /></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />Qgis-user mailing list<br />Qgis-user@lists.osgeo.org<br />List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>