Select to view content in your preferred language

Use database view as domain

373
1
06-08-2023 09:26 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

It would be great if we could use the rows from a database view as a domain, as an optional alternative to storing domain values in the GDB_ITEMS XML table.

For example, a SQL database view that gets the rows from this table, where WMS_DIVISION = ROADS. Use those rows as the domain values.

Bud_0-1686241178030.png

select distinct
    type as code,
    wms_classification as description
from
    atn_type_translation
where
    wms_division = 'ROADS'

Bud_1-1686241415831.png

Related: Use SDE table as Domain Table

1 Comment
Bud
by

If performance of the view is ever a concern, then in enterprise geodatabases, we have options available, such as materialized views in Oracle and indexed views in SQL Server.