<p dir="ltr">Ho,<br>
How do qgis to analyze the table to retrieve the unique?<br>
A loop on every record or a SQL to count distinct ?</p>
<p dir="ltr">A.</p>
<div class="gmail_quote">Il 04/set/2015 08:01, "Bernhard Ströbl" <<a href="mailto:bernhard.stroebl@jena.de">bernhard.stroebl@jena.de</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Am 03.09.2015 um 23:41 schrieb Sandro Santilli:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Sep 02, 2015 at 08:48:34AM +0200, Bernhard Ströbl wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 01.09.2015 um 17:49 schrieb Matthias Kuhn:<br>
</blockquote>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. If there are tables without a PK open a second modal dialog with an<br>
explanation of the problem and offer to select a pk from a combobox.<br>
</blockquote>
<br>
I hope you mean "relation" not table, a table should always have a<br>
PK.<br>
</blockquote>
<br>
It's not mandatory for a table to have a PK.<br>
I guess by "tables without a PK" he means table for which no PRIMARY<br>
KEY constraint is explicitly defined (should an UNIQUE key be<br>
considered equally valid?).<br>
<br>
</blockquote>
<br>
It is not mandatory, of course, that's why I wrote "should", but IMHO it is very bad database design to not define one.<br>
There might be several UNIQUE constraints on one table but there can be only one PK constraint. So in case of only a UINIQUE constraint the table would be handled as any other without PK constraint (or QGIS needs to analyse how many fields have a UNIQUE constraint).<br>
<br>
Bernhard<br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus signature database 12200 (20150904) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<a href="http://www.eset.com" rel="noreferrer" target="_blank">http://www.eset.com</a><br>
<br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>