1

I've been looking and can't find anywhere that list the benefits of using an updatable view (one that can be modified with the modifications affecting the target table).

I understand why materialized views are useful (speed, security, etc) but since updatable views can't contain joins and other useful optimizations...

Can anyone list why they might be useful? I'm sure Oracle has a good reason for implementing them.

DanielST
  • 13,783
  • 7
  • 42
  • 65

1 Answers1

2

Updateable views can indeed contain joins. They must also have constraints so that an update cannot be ambiguous - every value updated must be guaranteed not to be updated to multiple values.

David Aldridge
  • 51,479
  • 8
  • 68
  • 96
  • I was sure that I had just read they couldn't contain joins... but I see that I misread. Thanks. – DanielST Apr 25 '13 at 20:02
  • You can also delete from a view as well, with similar restrictions -- the table from which rows are deleted is that with the foreign key to the other, so handy for deleting child records based on a predicate against the parent table. – David Aldridge Apr 25 '13 at 22:56