OOW 2009: The killer feature of Oracle Database 11gR2 – Edition Based Redefinition (or database object versioning)
Today I presented on what is possibly the hottest story on the Oracle Database 11gR2 release: Edition Based Redefinition (EBR). EBR allows us to add a whole new dimension to the database – the Edition (that complements the existing dimensions of schema and object type). Every database object (well, almost every database object – not tables!) can have different implementations/incarnations/versions in various editions. The object versions are all in the same schema – they only differ in the Edition they are created in.
The Edition Based Redefinition has us create Editions in the database – cross database object spaces where new versions of existing database objects can be created – and others can just be inherited from previous editions. We can construct an Edition in isolation – no one is impacted by us creating new objects and versions of objects; objects can be invalid in that edition and no one will know anything about it. Only once the edition is complete, valid and tested can we make it available to new user sessions to work against. Using a simple alter session set edition statement, sessions can specify which edition they want to run against. That is: after the user has been granted access to that particular edition.
There are some mechanics that you should know about of course.
Especially the way tables are dealt with. Basically, the table will no longer exist as far as applications and PL/SQL code is concerned. Everything you used to do with and against tables will now be with or against Editionable Views. A thin wrapper around the table – that does not impact performance. This EV can only project columns – expose a subset of the columns from the table using column aliases – not use functions, constants, where clause or any other query facilities. The EV is the construct that can be editioned. And since all applications only see the view and no longer the table, it will appear as if the "table" is editioned – has different incarnations in different editions.
There is also a new type of trigger – the cross edition trigger – that is used to synchronize DML from a previous edition with the current state of the table (forward cross edition) and to do vice versa: synchronize DML against a new edition with the expectations in older editions. The presentation shown below demonstrates how this works. Note: the forward cross edition trigger can also be used to do the conversion of the existing data to the table definition as introduced in the new edition.
The presentation is shown here:
Review of my presentation ‘from the audience’: Editions Of You – Edition Based Redefinition
- Introducing Oracle 11gR2 Edition Based Redefinition or: On Parallel Application Universes
- OOW 2009: Introducing SOA and Oracle SOA Suite 11g for Database Professionals
- Oracle releases Raptor – free tool for Database Development (SQL, PL/SQL, database object browsing)
- Oracle RDBMS 11gR2 – alter or replace user defined types even when there are dependencies
- Enabling Role-based security management in Oracle Designer 6i/9i/10g through the Repository Object Browser
- Steven Feuerstein Master Class. Anti-Pattern PL/SQL Programming + 12c New PL/SQL Features, December 12 and 13 2013
- The AMIS Summary of Oracle OpenWorld 2013 is available for download – 60-page white paper
- The road ahead for WebLogic 12c
- Enriching XMLType data using relational data – XQuery and fn:collection in action
- OOW13 and JavaOne 13: Notes from a Conference – Part Two
- You consolidated your applications in one database, but now one application needs recovery…
- OOW13: Sneak Preview of the Major Announcements?! In-Memory Database, PaaS (Database and Java) and M6 big memory machine
- Quick & Easy migrate VM from Oracle VM 2.x to 3.x
- Het Oracle OpenWorld Preview Evenement (5 september 2013) – 15 sprekers & sessies
- Oracle Database SQL – Recursive Subquery to inspect events in football matches – find the MVP