Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 views
in Technique[技术] by (71.8m points)

oracle - Difference between editionable and editioning views?

In the syntax diagram of create view we see three ways for create:

Blockquote

  • EDITIONING
  • EDITIONABLE EDITIONING
  • NONEDITIONABLE

What is the difference between create editioning and create editionable editioning?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

These clauses relate to Edition-based redefinition.

This introduces the concept of an edition. This extends the namespace for objects in Oracle Database. So the fully qualified name of an object is now

edition_name.schema_name.object_name

So one object can have many definitions in the same schema. The edition_name is part of your session's settings; you can't specify it directly.

Editioning views are a special type of view used to support zero-downtime schema changes. You place these on your tables and change the application code to access these views instead of the base tables. They are subject to a number of restrictions:

  • Within any edition, you can create only one editioning view for any single table.

  • You cannot specify the object_view_clause, XMLType_view_clause, or BEQUEATH clause.

  • You cannot define a constraint WITH CHECK OPTION on an editioning view.

  • In the select list of the defining subquery, you can specify only simple references to the columns of the base table, and you can specify each column of the base table only once in the select list. The asterisk wildcard symbol * and t_alias.* are supported to designate all columns of a base table.

  • The FROM clause of the defining subquery of the view can reference only a single existing database table. Joins are not permitted. The base table must be in the same schema as the view being created. You cannot use a synonym to identify the table, but you can specify a table alias.

  • The following clauses of the defining subquery are not valid for editioning views: subquery_factoring_clause, DISTINCT or UNIQUE, where_clause, hierarchical_query_clause, group_by_clause, HAVING condition, model_clause, or the set operators (UNION, INTERSECT, or MINUS)

You can create cross-edition triggers on editioning views. You use these to maintain columns present in one edition but not another.

The editionable/noneditionable keywords apply to regular views. They define whether each edition can have its own version of a view (it's editionable) or if all editions must have the same edition of the view (it's noneditionable)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...