Select to view content in your preferred language

Join between multiple tables

2147
4
01-27-2012 02:28 PM
ForamParikh
Regular Contributor
Hello i want to create one page in that page user will click on button and all features should display on map with different different symbol means my one table is point table which is spacial table and another table is project details which is simple data table and i have one field is common between two is location_id now i want like if user click on button user will see all projects now in project table there is one field status which are having values like completed ,pending so user will see green color for completed and red color point for pending.how i can implement it?I was thinking to use joint table map service and then doing simple query and then for each graphic's attribute just to check the status if it is completed then graphic will be green and other wise it will red but the problem is i want to implement one to many join but it seems like it is not possible in arcmap 10.because i can see only first record i have multiple records in project table with same location id.if i do opposite join means project to point then i can see all records but in that case its just tabular information i am not receiving any graphic.so what is the best solution for this requirement?when i did join between point and project it says to impletement one to many join better to relate both tables and then use identity tool to got all information but if i do relationship between both of them i will not get all columns i will get columns only of point table i want to do something i want to combine both of them at the same time i want all fields and also geometry means spacial record.so is there any way to get spacial data with all tabular data with in one query?

Please help,

Thanks
Foram
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Looks like your model is more a n-m relation than a one to many.
I mean that nothing prevents to have multiple projects with the same LOCATION_ID and multiple points with the same LOCATION_ID (perhaps not the case with your data but it looks the case for the model point of view).

In this case, it's perhaps easier to manage the join by the database and to expose the join as a service.
0 Kudos
ForamParikh
Regular Contributor
Thanks dbroux,

But i don't understand manage the join by the database and to expose the join as a service?can you please explain me in details?

Thanks
Foram
0 Kudos
ForamParikh
Regular Contributor
there is only one to many relationship between tables let me explain you.my first table is point table which is spacial table in this table fields are location_id and object_id.in which location_id is unique.there is another table named project.which is tabular table.it contains location_id and other fields but this time location_id may be duplicate so here is records

point:-

location_id object_id
1                  1
2                  2
3                  3

Project table


location_id project_id
1                  1
1                  2
2                  3
2                  4
2                  5
3                  6

so it is one to many relationship not many to many.

Please help,
How to solve it?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
there is only one to many relationship

location_id object_id
1 1
2 2
3 3


I missed probably something but what in your model prevents to have a 4th row such as :
3 4  i.e a second object with the same location_id?
0 Kudos