ArcSDE spatial view problem

1368
7
04-06-2011 11:15 PM
AndreiGosman
New Contributor II
Hi All,

I'm running ArcSDE 9.3.1 on Oracle 10g.

I have a spatial view, created with sdetable -o create_view, from a feature class and a table.
I have one feature in the feature class and 3 corresponding records for it in the table.
After I create the view, in Oraccle it show 3 records (which is normal and correct), all with same geometry.
But when I load it in ArcCatalog or ArcMap, it show only one record (the first), the other 2, with duplicate geometry are not shown. The view, by default, it's made with INNER JOIN.

Has someone any idea why that's happening?
I really have to shown also records with duplicate geometry, even if they are overlapping. I can have the same parcel belonging to 2 groups, in the same time.

Regards
Andrei Gosman
0 Kudos
7 Replies
VinceAngelo
Esri Esteemed Contributor
ArcGIS requires that ArcSDE layers have unique objectid values.  When you construct
a one-to-many view, you risk breaking that requirement if you are not careful.

There are two solutions: If you have ArcEditor or ArcInfo you can create a relationship
class to manage the 1:M relationshp outside a view, or you can create a view that
preserves the objectid uniqueness requirement by adding a USER-set or SDE-set
objectid column on the many side, and referring to that in the create_view column list.

- V
0 Kudos
AndreiGosman
New Contributor II
Hi,

Thank you for your answer.
My problem seems to be a bit more complicated. I've figured out the part with objectid, but my "many" side is view created in Oracle, outside ArcSDE and I cannot register it to geodatabase (error: not supported on view).
I think the only solution would be to recreate all tables for the "many" view in ArcCatalog and then recreate the "many" view with objectid.
That would be my idea
0 Kudos
VinceAngelo
Esri Esteemed Contributor
I'm not a fan of having multiple copies of the same data. In a perfect world you could
have the view changed so it contained a unique key which is seen by ArcSDE as INT32
[e.g., NUMBER(38) or NUMBER(10)]. If you don't need realtime access to changes you
can create a table which contains the natural compound key to the many view, plus a
unique ID, and drive the view access through this table (updating the table with a regular
process which identifies INSERT and DELETE requirements).  Or you can just configure
a relationship class (ArcView can read them but it takes Editor or higher to create one).

- V
0 Kudos
AndreiGosman
New Contributor II
Unfortunately, I need live data.
I've managed to put in the "many" side an uniqueid (rownum) to use it as OBJECTID, but in the FC side I have GlobalID and ArcSDE seems to ignore OBJECTID when having GlobalID, still not showing duplicate entries
Thanks anyway for your support
0 Kudos
VinceAngelo
Esri Esteemed Contributor
No, you cannot use ROWNUM. The value must uniquely represent the row, not any row
returned in some order. This is necessary to tie the attribute table to the map display
(click on one, flash in the other).

You should drop out the UUID column from the view.

Relationship classes exist to resolve the 1:M parcel/owner problem.

- V
0 Kudos
AndreiGosman
New Contributor II
Can you please go into details,please, with relationships topic regarding this problem?
Thank you
0 Kudos
VinceAngelo
Esri Esteemed Contributor
The documentation is much better than any explanation I could provide.

- V
0 Kudos