Skip to main content

Questions tagged [many-to-many]

n:m. One, or more, rows in one table is linked (or related) to one, or more, rows in another table using a "key" column

Filter by
Sorted by
Tagged with
1 vote
0 answers

Managing PostGIS many-to-many relationships between several tables with different geometry types from QGIS

I have this data set stored in a PostGIS (16+3.4) database: Each category of items being stored in its own table: CREATE TABLE public.rock ( id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, ...
swiss_knight's user avatar
  • 10.4k
5 votes
1 answer

QGIS - many to many relations - query expression

I have a polygon layer with area geometries of parcels and tables with contracts, with owners / users linked by means of a link table in many to many relationships. This is because some parcels may ...
Marek's user avatar
  • 537
2 votes
0 answers

How to handle many to many relationship?

I'm dealing with land development, where a land could have multiple investments and the other way around. What I've got: A shapfile with all land informations, each labels an unique id. LAND_ID AREA ...
Cookie's user avatar
  • 355
4 votes
2 answers

QGIS Setup n:m relation to enable cross-layer search

In QGIS I want to set up a n:m relation between two tables "parcels" (polygons) and "owners" (no geometry). Both share a field index1 (containing of numbers and letters) by which ...
sn1ks's user avatar
  • 3,022
0 votes
1 answer

Many to many relationship class with ArcGIS Desktop using only two table

In database discussions, for creating many to many relationship class we must create a third table to relate two other tables. However, in ArcGIS for creating many to many relationship class we just ...
saeedzali's user avatar
8 votes
3 answers

Aggregating result of many to many join of points closest to line in QGIS

I have a layer of points and a second layer of lines. The goal is to know for each line, how many and which points (by "ID") are closest to that line, to then export this information for ...
ZHTank's user avatar
  • 93
1 vote
1 answer

N:M relation in QGIS with custom form in Qt Designer

The manual: describes how to create a N:M relation and how to use it with ...
user104475's user avatar
6 votes
0 answers

QGIS N:M relations - possibility to edit multiple features?

I have a working QGIS project with multiple relations and all is well until I try the Toggle multi edit mode for N:M relations. I'm working with QGIS 3.10+ (3.14.16) and Windows and PostGIS. Is it ...
Sanna Jokela's user avatar
5 votes
0 answers

Creating child entries in QGIS form with Spatialite many-to-many relationship

I am trying to reproduce the example from Introducing many-to-many (N-M) relations using Spatialite. Creating the tables and the relations works fine, but when I try to create a child element in a ...
Jake's user avatar
  • 6,904
1 vote
0 answers

Linking new feature violates foreign check constraint in PostgreSQL database when working in QGIS3

I have set up a spatial database in PostgreSQL in which I have some data/tables that need to be linked by M to N relations. For those occasions I have two tables that contains geometry and a pivot ...
PavelP's user avatar
  • 69
1 vote
0 answers

Many-to-many joins in QGIS

Just want to know if there is a tool to do a many-to-many join in QGIS? I have X number of polygons that I want to join with a CSV table which contains Y number of entries. Essentially I need to have ...
strythe's user avatar
  • 587
6 votes
2 answers

Many-to-many relationship and QGIS Forms

I have a PostgreSQL/PostGIS database with a base table (Pois_points) and two subtables which constitute a many-to-many relationship with the base table, as you can see on the picture below (click on ...
Pim Verver's user avatar
4 votes
1 answer

Setting up and displaying many-to-many relationships with CartoDB

I have to display many-to-many relationships between offices and sub-offices for a client. Each office manages many sub-offices, each sub-office can be managed by many offices. The client is ...
Joshua Swiss's user avatar
5 votes
2 answers

Using the Make Query Table for Querying a Many-to-Many relationship

I have two tables that I have connected via an attributed relationship class of the cardinality Many-to-Many. One is a table of water body (rivers) features and the other is a series of pollutants ...
Mstover's user avatar
  • 51
5 votes
1 answer

Using many-to-many join in ArcMap

I'm working in ArcMap 10 and can move around in R, though am not an expert. I have a shp file and an xlsx file. The shp file is 20,221 rows and includes a field GID (grid ID) which is not unique ...
ecologist1234's user avatar
4 votes
1 answer

Accessing "many to many" relationship class using ArcGIS Identify?

I am trying to create a many to many relationship class in ArcGIS 10.0. When Identifying the features though, I don´t see the associated table values. Here is the Class schema: Destination Table ...
Robert Buckley's user avatar
3 votes
1 answer

How to add data to relationship table in ArcGIS 10.1 database design?

I have created 2 tables HORSE and VENDOR and a relationship table VENDOR_HORSE With the foreign key in Horse being the Primary key in VENDOR (VendorID) and the foreign key in VENDOR being the primary ...
user17681's user avatar