[Qgis-user] Attribute Table - Primary key

Ujaval Gandhi ujaval at spatialthoughts.com
Sat Dec 12 20:19:59 PST 2020


The 'primary key' for vector layer in QGIS could be any column that has
unique values for each feature. Using the fids as primary key is not a good
idea. I would recommend having a 'Parcel ID' column in your vector layer.
For a 1-to-1 join, you don't need to do anything special to designate that
column as your primary key. You can setup a join between the parcels layer
and the database table using 'Join Properties'
https://docs.qgis.org/3.10/en/docs/user_manual/working_with_vector/vector_properties.html?highlight=join#joins-properties

QGIS has a relation manager that allows you to create one-to-many joins.
See
https://docs.qgis.org/3.10/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=foreign%20key#creating-one-or-many-to-many-relations




[image: Logo] <https://spatialthoughts.com/>
Ujaval Gandhi
Spatial Thoughts
mobile: +91-8095684687
email: ujaval at spatialthoughts.com
[image: LinkedIn icon] <https://www.linkedin.com/in/spatialthoughts/>  [image:
Twitter icon] <https://twitter.com/spatialthoughts>



On Sun, Dec 13, 2020 at 3:14 AM <Iain at jcis.net.au> wrote:

>
>
> Cheers
>
>
>
> *Dr Iain Stuart*
>
> *JCIS Consultants *
>
> P.O. Box 2397
>
> Burwood North
>
> NSW, 2134
>
>
>
> (02) 9701 0191
> (0413) 380116 (m)
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201213/0c7778c3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 26078 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201213/0c7778c3/attachment-0001.png>


More information about the Qgis-user mailing list